1. Design a URL Shortener
Create short links, resolve them quickly and handle expiry without sending users to the wrong destination.
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.
Create short links, resolve them quickly and handle expiry without sending users to the wrong destination.
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.
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.
Upload and share large files with resumable transfer, versions and safe metadata changes.
Google Calendar-style events with recurrence, RSVPs and on-time reminders, using CDC for change notifications and a delay queue for reminders.
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.
Run 10,000 jobs a second within two seconds of their time, at least once, with retries, fairness between tenants and exactly-once effects.
Run strangers' code safely in single-use microVMs, return verdicts within 5 seconds, and rank 100,000 contestants live.
Price a trip, match a rider to a nearby driver who has ten seconds to accept, and never give one driver two rides.
Photos and videos for 500 million daily users: presigned multipart uploads, a processing pipeline, CloudFront and a hybrid fan-out feed.
Search 10 million businesses by place, words and category, keep every average rating exact, and keep fake reviews out.
Search a billion posts a day by keyword, newest or most liked first, with an inverted index you build yourself.
Stacks of nearby people in under 300 ms, 2 billion swipes a day, and a match never missed even when both like at once.
Record runs and rides on the phone without signal, upload each once, show them to friends and rank athletes by week, month and year.
Live comments for millions of viewers: SSE streams, a Redis channel per video with co-located viewers, sampling and CDN snapshots for hot videos.
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.
Sell 10,000 units to a million people at noon with a lottery waiting room, a Redis gate before an Aurora ledger and holds that expire.
Serve a product page a million times a second: a cheap query, replicas, Redis and the edge, with hot keys, stampedes and invalidation handled.
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.
A leaderless wide-column store: a token ring with virtual nodes, consistency tuned per query, an LSM write path and repair that keeps replicas converged.
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.
Radius, k-nearest and map-box search over places that rarely move and drivers that ping every few seconds: R-trees, geohash, H3 and S2 cells, Redis GEO and OpenSearch. One-hour boards for junior, senior and staff, with the theory.
The database under a metrics platform: a WAL and head block, compressed chunks, a label index, rollups, compaction and blocks in S3.