Caching
Cache-aside, write-through, eviction and invalidation strategies.
All topics · 2 lessons · 51 resources
Learn Caching on System Design Atlas
- 01CachingHow keeping popular data in fast memory makes systems quicker, and the invalidation problems that come with it.System Design Foundations · 11 min read · start here
- 02Why Redis is fast, and Redis versus MemcachedIn-memory storage, a single-threaded event loop and rich data structures, plus how persistence and replication work.Core Concepts: How Things Actually Work · 8 min read
Related topics
These share a lesson with Caching.
Curated Caching resources
YouTube
- Ashish Pratap SinghSystem design concepts, low-level design and interview problems explained from first principles.Ashish Pratap Singh
- ByteMonkShort animated explainers of system design concepts, distributed systems and how large platforms are built.ByteMonk
- Hello Interview: System Design WalkthroughsStructured mock-interview style designs with explicit trade-off discussion.Hello Interview
- Tech Dummies: System Design Case StudiesLong-form breakdowns of how large products scale, with a focus on architecture trade-offs.Tech Dummies
- ByteByteGo: System Design Video SeriesAnimated, diagram-first explainers on caching, API design, databases and real-world architectures.ByteByteGo
Blogs
- Scalable Web Architecture and Distributed SystemsA full chapter on the building blocks of large websites: availability, performance, reliability, scalability, caches, proxies, indexes, load balancers and queues. Free to read here under CC BY 3.0.The Architecture of Open Source Applications
- Redis BlogRedis features, data structures and use cases.Redis Ltd.
- Meta Engineering BlogInfrastructure, data and networking posts from Meta's engineers.Meta
- High ScalabilityLong-running blog dissecting the architectures of large internet companies.High Scalability
- Netflix Technology BlogEngineering posts on resilience, streaming, data and chaos engineering at Netflix.Netflix
Courses
- Backend Developer RoadmapA visual guide to the skills a backend engineer builds, from databases to caching and APIs.roadmap.sh
- Redis UniversityFree courses on Redis data structures, search, and caching patterns.Redis Ltd.
- Hello Interview: System Design in a HurryFree written guide covering the delivery framework, core concepts and key technologies.Hello Interview
Podcasts & Newsletters
Case Studies
- CDN Services at SpotifySpotify built its business on flawless content delivery. Our streaming platform serves up more than 50 million tracks (plus an array of images and other assets) to more than 230 million monthly active users around the world — making us one of the world’s leading streaming services. With content that feels instant…Spotify
- Cross-Region Caching Library at WixAt the Wix server infrastructure group we work daily on a set of tools that help make the lives of our backend developers easier, while also helping them deliver their code to production faster and safer. Wix handles huge traffic with more than 500 billion HTTP requests and 30 billion Kafka events messages daily…Wix
- Distributed Cache at ZalandoUsing Akka cluster-sharding and Akka HTTP on KubernetesZalando
- Distributed Cache for S3 at ClickHouseClickHouse Cloud now has a distributed cache for object storage: shared, low-latency, and built for speed. This post dives into the architecture, why it matters, and how it performs.ClickHouse
- Distributed CachingThis blog post is part 2 in the “Scaling Wix to over 100M Users” series. Read part 1 here. When Wix started, we used the Tomcat, Hibernate, and Ehcache stack with a MySQL database and Flash front end. Why did we choose that stack? Simply because our first backend developer had experience with that stack from his…Wix
- Estimating the Cache Efficiency using Big Data at AllegroCaching is a good and well-known technique used to increase application performance and decrease overall system load. Usually small or medium data sets, which are often read and rarely changed, are considered as a good candidate for caching. In this article we focus on determining optimal cache size based on big…Allegro
- Flannel: An Application-Level Edge Cache to Make Slack ScaleWhy Slack put a cache close to users to avoid loading all workspace data at startup, and how it keeps it fresh.Slack
- Memory Optimization in Redis at WattpadA real-world engineering write-up from Wattpad on distributed Caching.Wattpad
- Memsniff: Robust Memcache Traffic Analyzer at Box“Box is the leader in Intelligent Content Management. Its platform enables organizations to fuel collaboration, manage the entire content lifecycle, secure critical content, and transform business workflows with enterprise AI.”Box
- Moving persistent data out of Redis at GithubHistorically, we have used Redis in two ways at GitHub: We used it as an LRU cache to conveniently store the results of expensive computations over data originally persisted in…Github
- Optimizing Redis Storage at DeliverooCounting unique users, checking if a credit card has already been used, or checking if this is a mobile user’s first visit ever — all of these require maintaining a large set of fingerprints (unique visitor ID, card fingerprint, IDFVs depending on the use case). Because this usually needs to be queried very…Deliveroo
- Prefetch Caching of Items at eBayWith 1.4 billion listings on eBay, improving the speed to render these listings at scale and accuracy is a huge engineering challenge. We have taken major steps to cache item data, which brings great speed improvements.eBay
- Pycache: In-process Caching at QuoraWhen rendering a Web page, Quora webservers need to access many different kinds of data. Some are easy to compute (what's the name for the user with ID 2667222?), and some are more difficult (how many users follow any of the topics that this question is associated with?). We store these facts in ...Quora
- Ratings & Reviews (2 parts) at FlipkartThis article follows from the Ratings & Reviews @ Flipkart [Part 1]. In the previous article we discussed about the architecture of the…Flipkart
- Redis at TrivagoA real-world engineering write-up from Trivago on distributed Caching.Trivago
- Redis Fleet at HerokuHow the Heroku Data infrastructure team manages large fleet operations, such as this one required by a recent Redis remote code execution vulnerability.Heroku
- Reduce Memcached Memory Usage by 50% at TrivagoIf you’ve never heard about Memcached, it is simply a high-performance, distributed memory caching system which uses a key-value store for strings and objects. Usually, it serves for saving data originally retrieved from a database or external services. As simple as it is, it can improve the performance of your…Trivago
- Scaling Job Queue with Redis at SlackSlack uses a job queue system for business logic that is too time-consuming to run in the context of a web request. This system is a critical component of our architecture, used for every Slack message post, push notification, URL unfurl, calendar reminder, and billing calculation. On our busiest days, the system processes over 1.4…Slack
- Scaling Redis at TwitterYao Yue has worked on Twitter’s Cache team since 2010. She recently gave a really great ...Twitter
- Service Workers at SlackWe recently rolled out a new version of Slack on the desktop, and one of its headlining features is a faster boot time. In this post, we’ll take a look back at our quest to get Slack running quickly, so you can get to work. The rewrite began as a prototype called “speedy boots” that aimed…Slack
- Solving Remote Build Cache Misses (2 parts) at SoundCloudPart of a build engineer’s role is to speed up builds. Improving build performance and avoiding work with caching is one way to achieve this, but another tool in the build engineer’s belt is that of disallowing slow builds. This is part two in a series about solving Gradle remote build cache misses.SoundCloud
- Standardize and Improve Microservices Caching at DoorDashDoorDash's in-house caching system offers backend developers a fast, safe, and efficient way to introduce new caches.DoorDash
- TAO: The power of the graphA readable overview of how Facebook serves the social graph with a caching layer over MySQL.Meta
- tCache: Scalable Data-aware Java Caching at TrivagotCache takes a creative approach for near lock-free evictions and supports data-aware evictions. Its key features are:Configuration of features is individual per Cache instance, by using ...Trivago
- YouTube ArchitectureA look at YouTube's early scaling decisions around MySQL, caching and video serving.High Scalability
Papers
- Consistent Hashing and Random Trees (paper)The original consistent-hashing paper, written for distributing web caches.MIT
- Scaling Memcache at Facebook (paper)How Facebook grew a simple memcached cache into a global system: leases against stampedes, regional pools, and keeping caches consistent with the database.Meta (Facebook)
- TAO: Facebook's Distributed Data Store for the Social Graph (paper)A read-optimised graph store layered over MySQL and caches that serves billions of social-graph reads per second.Meta (Facebook)
Documentation
- MDN: HTTP cachingCache-Control, validation and shared versus private caches.Mozilla
- Cloudflare Learning Center: What is a CDN?Plain-language explanation of CDNs, edge caching and DNS.Cloudflare
- Redis DocumentationData types, persistence, replication, clustering and caching patterns.Redis Ltd.
- Azure Architecture CenterReference architectures, cloud design patterns and best-practice guides.Microsoft Azure
GitHub
- RedisThe source of the in-memory data store, a compact C codebase worth reading.Redis Ltd.
- Awesome System Design ResourcesConcepts, patterns and case-study links organised for interview preparation.ashishps1
- Awesome ScalabilityCurated reading list of articles on the architecture of scalable, reliable systems.binhnguyennus
- System Design 101Visual cheat sheets explaining complex systems in simple terms.ByteByteGoHq
- The System Design PrimerThe most-starred system design study guide: scalability concepts, trade-offs and Anki flashcards.donnemartin