Caching Strategies
Cache-aside, read-through, write-through and where each belongs.
7 to work through
-
advanced
A discussion platform has a handful of extremely popular threads receiving most reads and writes, and individual cache nodes become bottlenecks. How should hot-key detection, caching, coalescing, partitioning and asynchronous writes combine?
3 min answer -
advanced
A popular cache key expires at peak. A thousand concurrent requests miss and hit the database simultaneously, and it falls over. Name three fixes and pick one to deploy first.
3 min answer -
advanced
A quick-commerce platform holds inventory across hundreds of dark stores that changes continuously. Which inventory data must be strongly consistent, which can be cached, and what should happen at checkout when the cached view is stale?
2 min answer -
advanced
A social platform has 1% of content receiving 90% of requests. How should adaptive caching, hot-key replication, request coalescing and partitioning work together?
2 min answer -
advanced
Chat clients download the full workspace user and channel directory on connect. For large workspaces this is slow and expensive. A CDN does not help. Why, and what does?
2 min answer -
advanced
Design read receipts and unread counts for a messaging product. Why is this harder than it looks?
2 min answer -
advanced
Uber's Docstore (a sharded MySQL-backed document store) serves reads dominated by recently active trips. CacheFront put Redis in front of it. Why build the cache into the storage layer rather than leaving it to each caller, and how must invalidation, read-your-writes and post-failover warming behave?
3 min answer
6 terms in this topic
Bloom Filter Cache Guard
Placing a Bloom filter in front of an expensive lookup so that keys which certainly do not exist never reach it.
patternCaching Strategies
Which cache pattern to use, how staleness is bounded, and the failure modes that only appear under load.
patternCaching Strategies in Practice
The write and read strategies, the stampede that takes down origins, and why cache invalidation deserves its reputation.
patternIntegrated Cache Tier
Placing the cache inside the storage layer's own client rather than in each calling application, so invalidation is driven by the change stream and c…
practiceRequest Coalescing
Collapsing many concurrent requests for the same missing resource into a single upstream fetch, with the rest waiting on its result.
case-studySlack Flannel: Caching at the Edge for a Chat Client
Slack pushed user and channel metadata into an application-aware edge cache because clients were downloading enormous amounts of it on every connection.
Neighbouring topics
Data Architecture
General material on structuring, storing and governing data.
Relational Modelling
Normalisation, keys, constraints and the invariants a schema enforces.
NoSQL Stores
Key-value, document, wide-column and graph — what each buys and forbids.
Indexing
Designing indexes per query shape, and paying for them on every write.
Query Optimisation
Reading a plan, fixing statistics, and finding the real bottleneck.
Transactions & Isolation
ACID, isolation levels, and the anomalies each level permits.
Replication
Primaries, replicas, lag, and synchronous versus asynchronous durability.
Partitioning & Sharding
Splitting data across machines, and the one-way door of a partition key.
Cache Invalidation
Stampedes, penetration, staleness windows and versioned keys.
CQRS
Separating the write model from the read models that serve queries.
Event Sourcing
Storing the change log as the system of record, and what that costs forever.
Change Data Capture
Turning a database's replication log into a stream, and its coupling risk.
Data Warehousing
Dimensional modelling, star schemas and analytical workloads.
Data Lakes & Lakehouses
Open formats on object storage with transactional metadata on top.
ETL & ELT
Where transformation happens, and how much raw history you keep.
Streaming Data
Windowing, watermarks, late arrivals and exactly-once semantics.
Data Governance
Ownership, lineage, quality, catalogues and who may see what.
Data Lifecycle & Retention
How long data is kept, where it ages to, and how it is actually deleted.
Polyglot Persistence
Choosing a store per workload, and the operational cost of variety.