The other pages in this category work through seven problems in full. These prompts are for practice on your own. Set a 45-minute timer, run the six steps of the Interview Approach on a blank page, and only then read the concept notes for the parts you got stuck on.
The "focus" column is the part most interviewers push on. Don't read it as the answer: it's the step 6 question you should expect.
Storage and files#
Prompt
Focus
Design a file system
How directories and file metadata are stored, how large files split into blocks, and what happens when two writers touch the same file
Design a photo sharing service
Uploads straight to blob storage, thumbnails made in the background, and serving images through a CDN
Design a key-value store
Partitioning with consistent hashing, replication, and what a read returns while replicas disagree
Real-time and presence#
Prompt
Focus
Design a presence service (online/offline status)
Heartbeats with a timeout, storing status with a short TTL, and fanning status changes out to friends without flooding them
Design a live comments feed for a stream
Pushing new comments to many viewers over WebSockets or server-sent events, and sampling when a stream gets too busy
Design a notification service
One request fanned out to email, SMS and push, with retries, user preferences and no duplicate sends
Devices and background work#
Prompt
Focus
Design a device firmware-update system
Rolling an update out in stages, devices that are offline for weeks, verifying the download, and rolling back a bad version
Design a job scheduler
Running each job once at the right time across many workers, retries, and what happens when a worker dies mid-job
Design a web crawler
A URL frontier with politeness per site, skipping pages already seen, and spreading the work across machines
Reads at scale#
Prompt
Focus
Design a news feed
Building feeds when a post is written versus when a feed is read, and the special case of accounts with millions of followers
Design search autocomplete
A prefix structure or index, ranking by popularity, and answering in well under 100 ms
Design a ticket booking system for concerts
A burst of buyers for a few seats, holding a seat for a few minutes, and never selling one seat twice
How to practice#
Say each step out loud, as you would in the room. Silent practice hides gaps.
Write the non-functional requirements with numbers before you draw anything. Use Number Estimation only where it changes a decision.
Keep step 5 boring and correct. Save caches, queues and sharding for step 6, each tied to a requirement.
Afterwards, list the one thing you'd do differently, then try the same prompt again a week later.
Revision notes · 1 min Revision modeCore idea#
Practice prompts to run through the six steps of the Interview Approach on your own, in 45 minutes, before reading any notes.
Prompts and what interviewers push on#
Prompt
Focus
File system
Metadata, blocks, concurrent writers
Photo sharing
Blob storage, background thumbnails, CDN
Key-value store
Consistent hashing, replication, disagreeing replicas
Presence service
Heartbeats, TTL status, fan-out to friends
Live comments
WebSockets or SSE, sampling busy streams
Notification service
Fan-out to channels, retries, no duplicates
Firmware updates
Staged rollout, offline devices, rollback
Job scheduler
Run once on time, retries, dead workers
Web crawler
Frontier, politeness, dedup, distribution
News feed
Write-time vs read-time fan-out, celebrity accounts
Autocomplete
Prefix index, ranking, under 100 ms
Concert tickets
Bursts, seat holds, no double-selling
Pitfalls#
Practicing silently. Say each step out loud.
Drawing before the non-functional requirements have numbers.
Adding caches and queues in step 5 instead of step 6.
Short line#
Timer on, six steps out loud, focus question in step 6, retry a week later.