System design interview examples
The questions that come up again and again, drawn out with the decisions explained. Try one on your own first, then compare, clone it and defend your changes.
News feed, like TwitterFan-out on write or on read? Timelines in a cache, the celebrity problem, and how a post reaches millions of followers.
News feed, like TwitterFan-out on write or on read? Timelines in a cache, the celebrity problem, and how a post reaches millions of followers.
URL shortener, like BitlyThe first system design interview question: key generation, heavy reads, a cache in front, and click analytics off the request path.
Ride hailing app, like UberMatching riders and drivers: live locations in a geo index, dispatch, surge, trips and payments. A classic system design interview.
Video calls, like ZoomPeer to peer for two, an SFU for a meeting, signaling and what happens on a bad network.
Rate limiterToken bucket or sliding window? Where it runs, how nodes share counts and what happens when the limiter itself is down.
File sync, like Dropbox or Google DriveChunking, deduplication, syncing across devices and resolving conflicts.
Stays marketplace, like AirbnbSearch by place and date, reserve without double-booking, pay out to hosts after the stay.
Notification systemPush, email and SMS from one place: templates, preferences, retries and no duplicates.
Web crawlerA frontier of URLs, politeness per domain, deduplication and storage at the scale of the web.
Payment systemIdempotency, a double-entry ledger, webhooks and reconciliation. Where money can go wrong and how not to lose any.
Photo sharing, like InstagramUpload once, resize many times, serve from a CDN, and build a feed that doesn't melt.
Chat app, like WhatsAppOne-to-one and group messages: long-lived connections, delivery receipts, offline inboxes and end-to-end encryption.
Search autocompleteSuggestions in under 100 ms: a trie built offline, served from memory, with trending terms on top.
Ticket booking, like TicketmasterA million people, ten thousand seats, one minute. Holding seats without double-selling, and a waiting room to survive the rush.
Video streaming, like NetflixUpload, transcode into many qualities, push to a CDN and adapt to the network. Why almost all the traffic never reaches your servers.