SlideShare a Scribd company logo
Evolving Your Distributed Cache In a
Continuous Delivery World
Tyler Van Gorder
@tkvangorder
Build.com, Principal Software Engineer
PRESENTED BY
1 The Early Days
Who we are and how our systems have evolved
2 Today’s Architecture
A peek into our current system architecture
3 Unified Caching Model (Live Coding Example)
Solving Caching Problems in a Continuous Delivery Environment
Agenda:
4 Questions
A personalized, online, home
improvement shopping experience
Tyler Van Gorder
Principal Software Engineer
https://github.com/tkvangorder
@tkvangorder
BUILD.COM AT A GLANCE
109K
Professional Tradespeople
91M
Annual Visits
>569K
Annual Customer Chats
>1.3M
Customer Calls Annually
#72
Top 100 Internet
Retailers in the US
710+
Employees
PRESENTED BY
The Early Days
Started as a single web site
The site and company grew rapidly
Even the CEO helped with coding (oh dear)
Deployment were done at night
Performance issues
There were several distributed
caching options
We tried a Java-based distributed
cache first
We decided to use Redis
Caching?
Round 1 - Fight!
https://pixabay.com/users/12019-12019/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=115800
It’s hard to argue with the results
Why Redis?
Redis can be clustered
Redis is blazingly fast
Easy to maintain/upgrade
Built-in support in for Spring.
Introducing a cache proved very effective.
We did deployments at night
Deployment meant purging the cache
It worked for a while
And we continued to grow
Caching To Rescue
https://pixabay.com/vectors/superhero-super-hero-hero-figure-304713
Distributed
Cache!
Multiple web storefronts
We put more data into cache
Sites were really slow after deployment
We introduced cache priming
Held our breath as morning arrived
We need to fix this!
We Are Killing Ourselves
Story Time
https://pixabay.com/vectors/superhero-super-hero-hero-figure-304713
Two identical environments (prod./dark)
Both environments use the same data stores
Deploy to the dark servers in the day
Still had to purge and prime the cache
Blue / Green Deployments
https://pixabay.com/vectors/superhero-super-hero-hero-figure-304713
Production traffic continued to grow
We still had two different redis clusters
Internal canary
Difficult to move to continuous delivery
Story Time
We Need a “Shared” Cache
PRESENTED BY
Today’s Architecture
Consumer Store Nodes
Mobile API
Internal Tools
Platform API Services
System
Architecture
Data Access
Common Business Logic
Security
Caching!
Platform API
Image by PIRO4D from Pixabay
Load Balancing
System Metrics
Log Aggregation
Twelve-Factor Applications
Circuit breakers
Rolling deployments
https://12factor.net/
Push code to production often
Changes are smaller/less risk
Immediate user feedback
Continuous Delivery
Automate the process
Monitor for issues
Need the ability to rollback
https://harness.io/
Rolling Deployments
The Trouble Spots In Rolling Deployment
System must be resilient to having two versions of your application running concurrently.
Both versions of the application need to play nice when they are sharing a cache.
PRESENTED BY
Unified Caching Model
The application is caching customer data
Version 1 has basic customer object
Version 2 adds address information to the
customer
Demo Setup
Round 2 - Fight
(and a demo?)
https://pixabay.com/users/12019-12019/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=115800
https://github.com/tkvangorder/redis-shared-cache-sample
What can go wrong?
https://github.com/tkvangorder/redis-shared-cache-sample
Cache Serialization “Checksum”
https://github.com/tkvangorder/redis-shared-cache-sample
V1.0 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put
V1.1 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put
V1.0 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put
V1.1 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put
V1.0 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put
V1.1 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put
V1.0 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put
V1.1 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put
Cache Thrashing
Insanity:
Doing the same thing
over and over again
and expecting
different results.
- Albert Einstein
https://github.com/tkvangorder/redis-shared-cache-sample
Cache Thrashing In The Wild
https://github.com/tkvangorder/redis-shared-cache-sample
Caching Version Buckets
https://github.com/tkvangorder/redis-shared-cache-sample
Cache Promotion
Version cache miss, look for another version’s copy
If the checksum is successful, copy is compatible
Promote that copy into cache for the new version
https://github.com/tkvangorder/redis-shared-cache-sample
PRESENTED BY
1 Use a serialization checksum
The use of an incrementing uid for each complex object insures changes to nested objects are also
detected. This requires a change in the development process!
2 Use a build number as your nested hash key
Each active build will have it’s own version of a cached object. Automate the injection of this build
number into your software artifacts!
3 Attempt a cache promotion on a cache miss.
If a new build does not have a copy of the cached value, attempt to deserialize the previous version. If
there are no structural changes, promote!
Summary:
PRESENTED BY
1 What about cache eviction?
The root key is still pinned to the record, eviction in one version will evict ALL copies.
2 Time to live helps manage the overall resource requirements
Multiple copies of the same object requires more resources for you Redis cluster. In practice, we have
found this to be a non-issue in our environment.
3 We have written the unified cache implementation twice
We originally extended the default Redis cache implementation in Spring Boot 1.5.x, now we have our
own cache implementation.
Final Notes:
4 Open Source?
All of the sample code, including the unified cache library demonstrated here are available for your
use. If there is enough interest, we may make an official open source offering.
PRESENTED BY
Questions?
Tyler Van Gorder
Principal Software Engineer
https://github.com/tkvangorder
@tkvangorder
Thank you!
Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder

More Related Content

PDF
Making Friendly Microservices by Michele Titlol
PPTX
Database CI/CD Pipeline
PDF
DCSF 19 Developing Apps with Containers, Functions and Cloud Services
PDF
DockerCon EU 2015: Official Repos and Project Nautilus
PPTX
Presentation for git jira and linux
PPTX
Azure dev ops
PPTX
App Modernization: From 0 to Hero
PDF
How do you protect a hybrid PaaS-IaaS solution, built entirely in the cloud
Making Friendly Microservices by Michele Titlol
Database CI/CD Pipeline
DCSF 19 Developing Apps with Containers, Functions and Cloud Services
DockerCon EU 2015: Official Repos and Project Nautilus
Presentation for git jira and linux
Azure dev ops
App Modernization: From 0 to Hero
How do you protect a hybrid PaaS-IaaS solution, built entirely in the cloud

What's hot (20)

PDF
Kubernetes vs App Service
PDF
DCSF19 Containerized Databases for Enterprise Applications
PPTX
CI CD using Docker and Jenkins
PDF
Continuous Integration
PPTX
Introduction to Containers & Diving a little deeper into the benefits of Con...
PPTX
Docker for the Enterprise with Containers as a Service by Banjot Chanana
PDF
Building a Secure Supply Chain with Docker
PDF
DockerCon SF 2015: How to Build a Secure DevOps Environment for the Government
PDF
Standardizing Jenkins with CloudBees Jenkins Team
PDF
Kubernetes made easy with Docker Enterprise - Tech deep dive on Docker/Kubern...
PDF
Dockercon 2018 Announcement
PPTX
DockerCon 2016 - Structured Container Delivery
PDF
Scaling Jenkins
PDF
How to containerize at speed and at scale with Docker Enterprise Edition, mov...
PDF
Jenkins + Docker = Continuous Improvement
PPTX
Louisville Software Engineering Meet Up: Continuous Integration Using Jenkins
PPTX
Docker and Devops
PPTX
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
PPTX
JENKINS Training
PPTX
A map for DevOps on Microsoft Stack - MS DevSummit
Kubernetes vs App Service
DCSF19 Containerized Databases for Enterprise Applications
CI CD using Docker and Jenkins
Continuous Integration
Introduction to Containers & Diving a little deeper into the benefits of Con...
Docker for the Enterprise with Containers as a Service by Banjot Chanana
Building a Secure Supply Chain with Docker
DockerCon SF 2015: How to Build a Secure DevOps Environment for the Government
Standardizing Jenkins with CloudBees Jenkins Team
Kubernetes made easy with Docker Enterprise - Tech deep dive on Docker/Kubern...
Dockercon 2018 Announcement
DockerCon 2016 - Structured Container Delivery
Scaling Jenkins
How to containerize at speed and at scale with Docker Enterprise Edition, mov...
Jenkins + Docker = Continuous Improvement
Louisville Software Engineering Meet Up: Continuous Integration Using Jenkins
Docker and Devops
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
JENKINS Training
A map for DevOps on Microsoft Stack - MS DevSummit
Ad

Similar to Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder (20)

PPTX
Docker & aPaaS: Enterprise Innovation and Trends for 2015
PPTX
Containers: DevOp Enablers of Technical Solutions
PDF
Cloud-Native Fundamentals: Accelerating Development with Continuous Integration
PDF
Demystifying Containerization Principles for Data Scientists
PDF
AZ-400 Exam Dumps Online – Proven by Learners Worldwide
ODP
Keep Your Data Safe in a Containerized Application
PPTX
BGOUG "Agile Data: revolutionizing database cloning'
PDF
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
PPTX
Denver devops : enabling DevOps with data virtualization
PDF
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
PPTX
DOs and DONTs on the way to 10M users
PDF
Bob Eisenmann and Justin Ranta: Automated Application Delivery on AWS using G...
PPTX
Software rotting - DevOpsCon Berlin
PDF
Dockers and kubernetes
PPTX
Webinar Docker Tri Series
PDF
Do modernizing the Mainframe for DevOps.
PDF
CI and CD with Spinnaker
PPTX
DockerCon 15 Keynote - Day 2
PDF
Agile Secure Cloud Application Development Management
PDF
Docker Meetup at Docker HQ: Docker Cloud
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Containers: DevOp Enablers of Technical Solutions
Cloud-Native Fundamentals: Accelerating Development with Continuous Integration
Demystifying Containerization Principles for Data Scientists
AZ-400 Exam Dumps Online – Proven by Learners Worldwide
Keep Your Data Safe in a Containerized Application
BGOUG "Agile Data: revolutionizing database cloning'
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Denver devops : enabling DevOps with data virtualization
DCEU 18: Use Cases and Practical Solutions for Docker Container Storage on Sw...
DOs and DONTs on the way to 10M users
Bob Eisenmann and Justin Ranta: Automated Application Delivery on AWS using G...
Software rotting - DevOpsCon Berlin
Dockers and kubernetes
Webinar Docker Tri Series
Do modernizing the Mainframe for DevOps.
CI and CD with Spinnaker
DockerCon 15 Keynote - Day 2
Agile Secure Cloud Application Development Management
Docker Meetup at Docker HQ: Docker Cloud
Ad

More from Redis Labs (20)

PPTX
Redis Day Bangalore 2020 - Session state caching with redis
PPTX
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
PPTX
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
PPTX
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
PPTX
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
PPTX
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
PPTX
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
PPTX
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
PPTX
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
PPTX
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
PPTX
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
PPTX
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
PPTX
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
PPTX
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
PPTX
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
PPTX
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
PPTX
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
PPTX
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
PDF
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
PPTX
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Redis Day Bangalore 2020 - Session state caching with redis
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...

Recently uploaded (20)

PPTX
Machine Learning_overview_presentation.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Cloud computing and distributed systems.
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Machine Learning_overview_presentation.pptx
cuic standard and advanced reporting.pdf
Empathic Computing: Creating Shared Understanding
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Review of recent advances in non-invasive hemoglobin estimation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectral efficient network and resource selection model in 5G networks
The Rise and Fall of 3GPP – Time for a Sabbatical?
Unlocking AI with Model Context Protocol (MCP)
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Cloud computing and distributed systems.
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Chapter 3 Spatial Domain Image Processing.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Electronic commerce courselecture one. Pdf
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Evolving Your Distributed Cache In A Continuous Delivery World: Tyler Vangorder

  • 1. Evolving Your Distributed Cache In a Continuous Delivery World Tyler Van Gorder @tkvangorder Build.com, Principal Software Engineer
  • 2. PRESENTED BY 1 The Early Days Who we are and how our systems have evolved 2 Today’s Architecture A peek into our current system architecture 3 Unified Caching Model (Live Coding Example) Solving Caching Problems in a Continuous Delivery Environment Agenda: 4 Questions
  • 3. A personalized, online, home improvement shopping experience Tyler Van Gorder Principal Software Engineer https://github.com/tkvangorder @tkvangorder
  • 4. BUILD.COM AT A GLANCE 109K Professional Tradespeople 91M Annual Visits >569K Annual Customer Chats >1.3M Customer Calls Annually #72 Top 100 Internet Retailers in the US 710+ Employees
  • 6. Started as a single web site The site and company grew rapidly Even the CEO helped with coding (oh dear) Deployment were done at night Performance issues
  • 7. There were several distributed caching options We tried a Java-based distributed cache first We decided to use Redis Caching? Round 1 - Fight! https://pixabay.com/users/12019-12019/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=115800
  • 8. It’s hard to argue with the results Why Redis? Redis can be clustered Redis is blazingly fast Easy to maintain/upgrade Built-in support in for Spring.
  • 9. Introducing a cache proved very effective. We did deployments at night Deployment meant purging the cache It worked for a while And we continued to grow Caching To Rescue https://pixabay.com/vectors/superhero-super-hero-hero-figure-304713 Distributed Cache!
  • 10. Multiple web storefronts We put more data into cache Sites were really slow after deployment We introduced cache priming Held our breath as morning arrived We need to fix this! We Are Killing Ourselves Story Time https://pixabay.com/vectors/superhero-super-hero-hero-figure-304713
  • 11. Two identical environments (prod./dark) Both environments use the same data stores Deploy to the dark servers in the day Still had to purge and prime the cache Blue / Green Deployments
  • 12. https://pixabay.com/vectors/superhero-super-hero-hero-figure-304713 Production traffic continued to grow We still had two different redis clusters Internal canary Difficult to move to continuous delivery Story Time We Need a “Shared” Cache
  • 14. Consumer Store Nodes Mobile API Internal Tools Platform API Services System Architecture
  • 15. Data Access Common Business Logic Security Caching! Platform API Image by PIRO4D from Pixabay
  • 16. Load Balancing System Metrics Log Aggregation Twelve-Factor Applications Circuit breakers Rolling deployments https://12factor.net/
  • 17. Push code to production often Changes are smaller/less risk Immediate user feedback Continuous Delivery Automate the process Monitor for issues Need the ability to rollback https://harness.io/
  • 19. The Trouble Spots In Rolling Deployment System must be resilient to having two versions of your application running concurrently. Both versions of the application need to play nice when they are sharing a cache.
  • 21. The application is caching customer data Version 1 has basic customer object Version 2 adds address information to the customer Demo Setup Round 2 - Fight (and a demo?) https://pixabay.com/users/12019-12019/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=115800 https://github.com/tkvangorder/redis-shared-cache-sample
  • 22. What can go wrong? https://github.com/tkvangorder/redis-shared-cache-sample
  • 24. V1.0 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put V1.1 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put V1.0 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put V1.1 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put V1.0 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put V1.1 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put V1.0 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put V1.1 : Cache Get, Cache Hit, Checksum Failure, Retrieve, Cache Put Cache Thrashing Insanity: Doing the same thing over and over again and expecting different results. - Albert Einstein https://github.com/tkvangorder/redis-shared-cache-sample
  • 25. Cache Thrashing In The Wild https://github.com/tkvangorder/redis-shared-cache-sample
  • 27. Cache Promotion Version cache miss, look for another version’s copy If the checksum is successful, copy is compatible Promote that copy into cache for the new version https://github.com/tkvangorder/redis-shared-cache-sample
  • 28. PRESENTED BY 1 Use a serialization checksum The use of an incrementing uid for each complex object insures changes to nested objects are also detected. This requires a change in the development process! 2 Use a build number as your nested hash key Each active build will have it’s own version of a cached object. Automate the injection of this build number into your software artifacts! 3 Attempt a cache promotion on a cache miss. If a new build does not have a copy of the cached value, attempt to deserialize the previous version. If there are no structural changes, promote! Summary:
  • 29. PRESENTED BY 1 What about cache eviction? The root key is still pinned to the record, eviction in one version will evict ALL copies. 2 Time to live helps manage the overall resource requirements Multiple copies of the same object requires more resources for you Redis cluster. In practice, we have found this to be a non-issue in our environment. 3 We have written the unified cache implementation twice We originally extended the default Redis cache implementation in Spring Boot 1.5.x, now we have our own cache implementation. Final Notes: 4 Open Source? All of the sample code, including the unified cache library demonstrated here are available for your use. If there is enough interest, we may make an official open source offering.
  • 30. PRESENTED BY Questions? Tyler Van Gorder Principal Software Engineer https://github.com/tkvangorder @tkvangorder