System design interview questions
26 questions, from a first pastebin to fan-out at Twitter scale. Read the brief, draw the system on the board, answer the questions, and get it graded against the same things an interviewer pushes on.
26 of 26 questions
Design Pastebin
Design a service where someone pastes a block of text and gets back a link anyone can open. Editing and accounts are out of scope.
BeginnerDesign an image upload service
Design a service that accepts an uploaded photo and serves it back in several sizes — a thumbnail, a medium, and the original.
BeginnerDesign a game leaderboard
Design a leaderboard for a mobile game: players submit scores and can see the global top 100 and their own rank.
BeginnerDesign an uptime monitor
Design a service that checks whether websites are up. Customers add URLs, the system checks each one on a schedule, and alerts them when one fails.
BeginnerDesign a rate limiter
Design a rate limiter that sits in front of an API and caps how many requests each customer may make. It runs across many API servers at once.
BeginnerDesign a notification service
Design a service other teams call to send a notification to a user — push, email or SMS. Choosing what to send and when is out of scope; delivering it is not.
BeginnerDesign a view counter
Design the thing that counts views on an article or a video and shows the count back to the reader. Per-user analytics and charts are out of scope.
BeginnerDesign a comment system
Design the comments under an article: people post comments, reply one level deep, and read the newest twenty first. Voting and ranking are out of scope.
IntermediateDesign a URL shortener
Design a service that turns a long URL into a short one and redirects visitors back to the original. Assume it is read-dominated and that redirects have to feel instant.
IntermediateDesign Dropbox
Design a file sync service: files put in a folder on one device appear on the others. Sharing and permissions are out of scope.
IntermediateDesign a web crawler
Design a crawler that walks the web from a set of seed URLs, stores what it finds, and keeps going. Ranking and search are out of scope.
IntermediateDesign search autocomplete
Design the suggestion box that completes a search query as someone types: the top ten completions for whatever prefix they have entered so far. Ranking the search results themselves is out of scope.
IntermediateDesign a distributed cache
Design the cache itself, not a system that uses one: a fleet of in-memory nodes that other services get and set keys against. Persistence to disk is out of scope.
IntermediateDesign a message queue
Design a durable message queue in the shape of Kafka: producers append to a topic, several independent consumer groups read it, and nothing is lost when a broker restarts.
IntermediateDesign Airbnb
Design the search-and-book half of a stay booking service: find listings in a city for a set of dates, then book one. Pricing, reviews and messaging are out of scope.
IntermediateDesign Yelp
Design "find restaurants near me": given a location and a radius, return the places nearby. Reviews, photos and ranking quality are out of scope.
AdvancedDesign a photo feed
Design the home feed for a photo-sharing app: users post images and see a feed of posts from the people they follow. Assume some accounts have very large follower counts.
AdvancedDesign YouTube
Design a video platform: people upload videos, and anyone can watch them on any device and connection. Recommendations and comments are out of scope.
AdvancedDesign WhatsApp
Design a messaging service: one-to-one chats delivered in real time, surviving a phone that is offline for a day. Group chats and calls are out of scope.
AdvancedDesign Uber
Design the matching half of a ride-hailing service: drivers report where they are, riders request a ride, and the system pairs them. Pricing and payments are out of scope.
AdvancedDesign Ticketmaster
Design seat booking for live events. Tickets for a popular event go on sale at a fixed time and a million people arrive at once. Seat maps and pricing tiers are out of scope.
AdvancedDesign Twitter
Design the home timeline for a microblogging service: people post short messages and see a timeline of posts from the accounts they follow. Some accounts have tens of millions of followers. Search and ads are out of scope.
AdvancedDesign Google Docs
Design collaborative document editing: several people type in the same document at once and see each other’s changes within a second, without losing anyone’s work. Comments and formatting are out of scope.
AdvancedDesign a payment system
Design the service that charges a customer’s card for an order: it talks to an external payment provider, and it must never charge twice or lose track of a payment. Fraud scoring and payouts are out of scope.
AdvancedDesign an ad click aggregator
Design the system that counts ad clicks and shows advertisers how many clicks each campaign got, minute by minute, within about a minute of them happening. Ad serving and targeting are out of scope.
AdvancedDesign an LLM inference API
Design the serving system behind a large language model API: a request arrives with a prompt, and tokens stream back from a model running on a pool of GPUs. Training and fine-tuning are out of scope.