4. Design a Notification System
Deliver email, push and SMS with preferences, retries and honest delivery status.
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.
Deliver email, push and SMS with preferences, retries and honest delivery status.
Build a paginated feed that handles high-fan-out authors, fresh posts and visibility changes.
A service commits to its database and then publishes an event. If it dies in between, the row exists and no one hears about it. Publishing first has the mirror problem: an event for a write that never happened. There is no ordering of two independent systems that makes this safe.
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.
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.
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 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.
A partitioned, replicated append-only log: a million messages a second, order per key, nothing acknowledged ever lost, a week of replayable history.
A stateful stream processor: dataflow graphs, keyed state in RocksDB, event time and watermarks, windows, barrier checkpoints, exactly-once into Kafka.
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.
Turn 10 pushes a second into job graphs on ephemeral runners, with fair queues per pool, leases fenced by attempt and live logs.
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.
Signed HTTPS callbacks for a billion events a day, at least once, retried for three days, with no endpoint able to slow another.
Define a feature once, train on point-in-time correct history and serve 200 fresh values in under 10 ms.
A chat assistant on models we train and serve: next-token framing, three training stages, resumable SSE streams, prefix caching, token quotas, safety, evaluation.