2. Design a Distributed Rate Limiter
Enforce tenant quotas across servers while making burst behavior and outage policy explicit.
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.
Enforce tenant quotas across servers while making burst behavior and outage policy explicit.
Partition cached data, survive node loss and keep cache misses from overwhelming the source of truth.
Deliver email, push and SMS with preferences, retries and honest delivery status.
Send durable messages, reconnect devices and explain ordering and delivery receipts.
Build a paginated feed that handles high-fan-out authors, fresh posts and visibility changes.
Reconcile desired workloads, schedule containers and recover from failed nodes safely.
Count every ad click once, fast enough to chart live and exactly enough to bill. One-hour interview boards for junior, senior and staff: requirements, data layer, low-level design and what goes wrong at every component.
Collect 5 million samples a second from 500,000 hosts, store them as time series, chart them and page people.
The K most-viewed videos for the last hour, day, month and all time from 700,000 views a second, exactly and in milliseconds.
Watch prices on 500 million products with a polite crawler and a million browsers, verify what you are told, and notify subscribers within minutes of a drop.
Take bids on 10 million live auctions with one consistent highest bid, lose none, push the price to every watcher and end each auction fairly.
Charge cards through the networks exactly once: idempotency keys, a card vault, timeouts as unknowns, signed webhooks, a double-entry ledger and reconciliation. One-hour boards for junior, senior and staff, with the theory behind them.
Search a billion posts a day by keyword, newest or most liked first, with an inverted index you build yourself.
A hundred people typing in one document, every copy converging, nothing acknowledged lost: one owner per document, an op log with snapshots, and fenced failover.
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 partitioned, replicated append-only log: a million messages a second, order per key, nothing acknowledged ever lost, a week of replayable history.
A key-value store like DynamoDB, from one durable node to Paxos-replicated partitions to global tables run for thousands of tenants.
A relational database like PostgreSQL: WAL and MVCC on one server, quorum replication and failover, then a sharded fleet.
A stateful stream processor: dataflow graphs, keyed state in RocksDB, event time and watermarks, windows, barrier checkpoints, exactly-once into Kafka.
A coordination service like ZooKeeper: znodes, sessions and watches, a ZAB quorum of five with observers, and the recipes for elections and locks.
Every committed change in Aurora and DynamoDB, read from the log and delivered in order per row to search, caches, Redshift and an S3 lake.
Dish reviews only from customers who ordered them, votes counted from a change stream, reviews ranked by the Wilson bound, payouts made exactly once.
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.
Rank 200 million players in real time with sharded Redis sorted sets, count every game exactly once, and close a season fairly.
Count 4 million moving drivers per map cell from a million pings a second, and serve the density to a million viewers as cached map tiles.
Ten terabytes of logs an hour from host agents through Kafka into tiered OpenSearch and S3, with regex search, live tail and exceptions grouped into issues.
Billions of files, hundreds of petabytes, one strongly consistent tree: a namespace partitioned by directory, chunk servers, replication, repair, erasure coding. One-hour boards for junior, senior and staff, with the theory behind them.
Signed HTTPS callbacks for a billion events a day, at least once, retried for three days, with no endpoint able to slow another.