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.
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.
Upload and share large files with resumable transfer, versions and safe metadata changes.
Turn uploads into playable renditions and serve viewers through unreliable networks.
Return useful prefix suggestions quickly while refreshing rankings and removing unsafe entries.
Separate reservation, payment and confirmed purchase during a 50,000-person launch.
Reconcile conflicting edits and large photo uploads without losing submitted inspections.
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.
Building a timeline when someone opens the app means reading from everyone they follow and merging — slow, and slowest for the most active users. Building it when someone posts makes reads a single lookup, but one post by an account with fifty million followers becomes fifty million writes.
Any request can time out after the server has already acted. The client cannot tell that from a request that never arrived, and the only safe response to uncertainty is to retry — which, without help, charges the card twice.
To push a message to someone you must find the one server out of hundreds that currently holds their connection — and connections are long-lived, unevenly distributed, and disappear without warning.
Scarce inventory — a seat, a room, the last unit — with far more buyers than units. Holding a database row for the minutes someone takes to pay does not scale, and checking availability before writing is a race that sells the same seat twice.
Streaming multi-gigabyte uploads through application servers wastes the most expensive capacity in the system on copying bytes, and ties up a request for minutes on a connection that may drop.
Google Calendar-style events with recurrence, RSVPs and on-time reminders, using CDC for change notifications and a delay queue for reminders.
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 strangers' code safely in single-use microVMs, return verdicts within 5 seconds, and rank 100,000 contestants live.
Hold seats with one conditional write, pay by authorize and capture, and put ten million fans in a fair waiting room without selling a seat twice.
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.
Price a trip, match a rider to a nearby driver who has ten seconds to accept, and never give one driver two rides.
Show what 10,000 small warehouses can deliver within the hour in under 100 ms, and take multi-item orders without ever selling a unit twice.
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.
Live prices to five million phones through per-symbol pub/sub, and market and limit orders over FIX that are never lost, sent twice or overspent.
Photos and videos for 500 million daily users: presigned multipart uploads, a processing pipeline, CloudFront and a hybrid fan-out feed.
Collect from 20,000 publishers by push, polls and crawls, file each article once into feeds by region and category, and serve a billion pages a day from the edge.
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.