Caching & read paths
Design a URL shortener
Turn long links into short, shareable URLs and redirect visitors quickly.
2 worked approachesWalkthrough reading
SYSTEM DESIGN PRACTICE
Pick a system design question, sketch your approach on a blank board or a printed sheet, and explain your choices. Then compare with worked approaches. Free and open source.
No account, no sign-up. Sketches save in this browser. How that works
55 original prompts with real numbers, from URL shorteners to payment ledgers.
Open a blank board, or print a two-page sheet and use a pencil.
Reveal interviewer questions one at a time. Cross things out. Explain why.
Reveal worked approaches and alternatives, then go deeper with reviewed reading.
THE QUESTION BANK
Every question starts with a blank board.
Prefer paper? Print the prompt.
Tags come from a public catalog and are unverified unless a candidate report backs them. How we label evidence
Caching & read paths
Turn long links into short, shareable URLs and redirect visitors quickly.
2 worked approachesWalkthrough reading
Storage & data modeling
Store pasted text behind an unguessable link, serve it fast, and make expired pastes disappear on time.
2 worked approachesWalkthrough reading
Feeds & social graphs
Let people post photos from their phones, follow each other, and scroll a home feed of the people they follow.
2 worked approachesWalkthrough reading
Storage & data modeling
Keep a folder in sync across laptops and phones: upload only what changed, and never silently lose an edit.
2 worked approachesWalkthrough reading
Real-time delivery
Deliver messages between two people, including across reconnects, without losing or duplicating any.
2 worked approachesWalkthrough reading
Feeds & social graphs
Deliver short posts to every follower's home timeline when some accounts have a hundred million followers.
3 worked approachesWalkthrough reading
Caching & read paths
Accept creator uploads, turn them into adaptive streams, and start playback fast for millions of viewers.
2 worked approachesWalkthrough reading
Search & ranking
Suggest the most likely completions as someone types, within tens of milliseconds, from billions of past queries.
2 worked approachesWalkthrough reading
Security & reliability
Enforce per-key request limits across hundreds of gateway nodes without adding noticeable latency.
3 worked approachesWalkthrough reading
Observability
Store tagged time series at high write rates, roll them up for long retention, and answer dashboard queries fast.
2 worked approachesWalkthrough reading
Queues & streams
Build a durable, replayable event log with per-key ordering, consumer groups and offsets that survives broker failures.
3 worked approachesPartial reading
Distributed infrastructure
Build a partitioned, replicated key-value store that keeps taking writes when nodes and zones fail.
2 worked approachesWalkthrough reading
Data pipelines & analytics
Show the top 10 most-shared articles for the last 5 minutes, hour and day from a high-rate stream of share events.
2 worked approachesWalkthrough reading
Distributed infrastructure
Fetch a billion pages a month politely: respect robots.txt and per-host limits, skip duplicates, and recrawl wisely.
2 worked approachesWalkthrough reading
Feeds & social graphs
Assemble a personalized, ranked feed from friends, pages and groups while respecting who is allowed to see each post.
2 worked approachesWalkthrough reading
Geospatial & marketplaces
Find restaurants and shops near a point or inside a map view, filtered and ranked, over mostly static places.
2 worked approachesWalkthrough reading
Observability
Get CPU, memory, disk and app metrics off 40,000 hosts reliably, cheaply and without melting the pipeline.
2 worked approachesWalkthrough reading
Scheduling & coordination
Store one-off and recurring events across time zones, send invitations, show free/busy, and fire reminders on time.
2 worked approachesWalkthrough reading
Queues & streams
Route messages to queues, hand each to one worker, redeliver what is not acknowledged and park poison messages safely.
3 worked approachesWalkthrough reading
Data pipelines & analytics
Collect page views from a JS snippet on 200,000 sites, build sessions, and serve fast traffic dashboards to site owners.
3 worked approachesWalkthrough reading
Data pipelines & analytics
Sort far more data than any machine can hold, across a cluster, with skewed keys and slow or failing machines.
2 worked approachesWalkthrough reading
Search & ranking
Publish hourly top-200 charts per category and country that reflect real demand, resist install fraud and do not flap.
2 worked approachesWalkthrough reading
Scheduling & coordination
Run cron-style and one-off jobs on time across a fleet, at least once, without losing schedules when machines fail.
2 worked approachesWalkthrough reading
Queues & streams
Send push, email and SMS on behalf of other teams, honoring preferences, without duplicates, through unreliable providers.
2 worked approachesWalkthrough reading