Mock round
Pick a prompt and start the clock. Work it through the six steps in order, writing notes as you go. When time is up, or you say you are done, the model answer opens beside your notes and you mark each step yourself.
The six steps
The minutes are a suggested split: the lessons give the order, not the time.
System Design, from Design the Whole Thing
- Clarifywhat it does, how fast it must be, how available it must be. Ask, don't assume.about 5 min
- Estimaterequests per second, read-to-write ratio, storage. The numbers decide the rest.about 8 min
- APIthe two or three requests the outside world can make, and what each returns.about 5 min
- Datawhat you store, and the one lookup that must be fast.about 5 min
- Designthe simplest thing that works: client → load balancer → app → cache → database.about 10 min
- Scalefind each bottleneck, add the one component that removes it.about 12 min
Low-level design, from Who Owes Whom
- Clarifyask until every answer lands on a class: sizes, rules, what is refused.about 5 min
- Entitiesone sentence per class, with no "and". Cross out the nouns that are values.about 5 min
- Class sketchwho holds whom and how many, each fact in one place.about 8 min
- The tricky part, in codewrite the one method the design hinges on, and run a case through it.about 15 min
- Follow-upguess the next requirement and count what changes: a field, a class, a line.about 7 min
- Concurrencytwo callers at once: what can break, and what keeps it whole.about 5 min
Pick a prompt
System Design
Surprise meRead-heavy systems
- Design a URL shortener that handles 100 million new links a month.
- Design the home timeline for a social network with 100 million daily users.
- Design search typeahead: suggest completions as the user types.
- Design an image hosting service: users upload photos and share links that anyone can view.
- Design a pastebin where each paste can expire after a chosen time.
Write-heavy and streaming systems
- Design a metrics and alerting system for a fleet of 10,000 servers.
- Design a system that counts ad clicks in real time, per ad per minute, for billing and a live dashboard.
- Design a notification system that sends push, email and SMS for a product with 100 million users.
- Design a centralized logging pipeline for 10,000 containers, searchable by engineers during an incident.
- Design a web crawler that fetches 1 billion pages a month.
Storage and consistency
- Design a distributed key-value store: a billion keys, values around 1 KB, 200,000 operations a second at peak.
- Design a distributed cache in front of a database that serves a million reads a second.
- Design a rate limiter for a public API: 100 requests a minute per user, 10 million users, 500,000 requests a second through the gateway.
- Design a service that hands out unique IDs: 64 bits, roughly sortable by time, 100,000 IDs a second across many machines.
- Design a payment system that must never charge a customer twice, even when requests are retried.
Real-time and location
- Design a chat app like WhatsApp or Slack, with online presence: the green dot next to each friend.
- Design the dispatch system for a ride-hailing app: a rider requests a ride and we match them to a nearby driver.
- Design "find nearby places": given my location, show the 20 closest restaurants within 5 km.
- Design a collaborative document editor like Google Docs, where several people type into the same document at once.
- Design a video streaming service like YouTube or Netflix.
Many hands on few rows
- Design ticket booking for a concert on-sale: a 50,000-seat stadium, and 2 million fans arrive in the first minute.
- Design a flash sale: 10,000 units of one phone go on sale at noon, and a million users hit buy in the first 10 seconds.
- Design a hotel reservation system for 10,000 hotels.
- Design a real-time leaderboard for a game with 10 million daily players: the top 100, and every player's own rank.
- Design the order matching engine for a stock exchange.
Low-level design
Surprise meClasses on the whiteboard
- Design a parking lot: several floors, bikes, cars and trucks, a ticket on entry and a fee on exit.
- Design an elevator for one building: buttons inside the car, up and down buttons on each floor.
- Design seat booking for a cinema: pick a seat, pay, get a ticket.
- Design an app that splits shared expenses in a group of friends and tells each person who owes whom.
- A shop charges delivery as standard, express or store pickup, and the code is a long if/else on the delivery kind. Redesign it.
- Design a library's book: members borrow, return and reserve it, and people waiting are told when it comes back.
- Design an LRU cache with get and put, both O(1).
- Design a vending machine: coins in, pick a product, get the item and any change, cancel for a refund.
- Design a rate limiter: each API key may make a limited number of requests, and the caller gets a yes or no.
- Design a logger: levels, several destinations, and a different format per destination.
- Design chess for two players online: the pieces, the board, the rules, and undo.
- Design snake and ladder for two to four players, and make it testable.