3. Design a Distributed Cache
Partition cached data, survive node loss and keep cache misses from overwhelming the source of truth.
Pick a system. Work through the problem. Compare your approach.
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.
The classes and code behind the ad click aggregator: signed click tokens, a redirect that never waits on the log, and a stream counter that de-duplicates and handles late clicks. Tests run all of it.
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.