3. Design a Distributed Cache
Partition cached data, survive node loss and keep cache misses from overwhelming the source of truth.
Start with a template. Work through each step. Ask Coach when you need a second opinion.
Company tags are community-reported. Counts on cards show how many people reported that design.
Partition cached data, survive node loss and keep cache misses from overwhelming the source of truth.
A live TV vote at a million writes a second: spread by key, buffer in Kafka, aggregate the hot counter in two stages, shed what can wait.
An in-memory data store like Redis, from one event loop to Redis Cluster to a durable platform.
Search a billion documents in 200 ms: inverted indexes, analysers, Lucene segments, shards and replicas, query then fetch with BM25, fed by CDC.
A key-value store like DynamoDB, from one durable node to Paxos-replicated partitions to global tables run for thousands of tenants.
Ten charities, three days, $100 M: charge through a third-party processor exactly once, queue the broadcast spikes, keep live totals on sharded counters. One-hour boards for junior, senior and staff, with the theory behind them.