System design lessons you can play
87 hands-on lessons, from your first server to apps that run around the world. Each one is a short read here and a design you build, run and break in the game.
Start Level 1From one user to millions
- Your first users: You just launched. About 300 requests per second arrive from users.
- Separate the database: Traffic grew to 1,500 req/s, and your data lives on the same machine as your code. You want to be able to replace or…
- Scale out: You hit the news. 6,000 req/s arrive and one app server handles about 2,000. Press Run traffic to watch it fall over.
- Add a cache: 20,000 req/s at peak, 95% of them reads, and the machine budget is $1,800/month. Adding more and more replicas is…
- CDN, queues and no single point of failure: 30,000 req/s. Half are images and scripts, and writes trigger slow work like emails. Nothing may go down if one…
- Move files off your servers: A photo app: 36,000 req/s, and 8 in 10 are photos. Each photo sits on the disk of whichever server took the upload.…
- Survive a crash: Launch day: 10,500 requests per second. Machines die all the time. Any single one may crash, and once failover ends,…
- Say no to a flood: Tickets go on sale: 9,000 req/s hit your 2 app servers, and the budget can't buy a third. You can't answer everyone,…
- Split the database: Your app went write-heavy: 20,000 req/s, and 40% are writes. That's 8,000 writes/sec, and the biggest primary handles…
- One shard on fire: Dinner rush at a food delivery app: 25,000 req/s, and 40% are new orders. Orders are already split across 4 of the…
- Pick the shard key: The app keeps growing: 40,000 req/s, and 25% are new orders. The rest open My orders, which must show an order the…
- Stop managing shards: A flash sale: 30,000 req/s, and 60% are cart updates. That's 18,000 writes/s. Every cart belongs to one user and is…
- One event, many readers: 10,000 req/s and 25% are new orders. Each order must be saved, emailed to the customer and added to analytics. Three…
- Find anything, fast: A shop with 10,000 req/s adds a search box. 4% of requests are searches, 400 a second, and each one makes the database…
- Take the money: A sale brings 4,000 req/s, and 4% are people paying: 160 charges a second at the peak. Your app calls the payment…
- When one service takes you down: 6,000 req/s. Every request now checks who the user is, and every page asks a Recommendations service what to show.…
- Five million people online: Your chat app has 5 million people online at the peak. They make 5,000 requests a second, and 1,500 of those are new…
- Pay for nothing when nobody comes: A side project with 20 requests a second at its busiest, and almost nothing overnight. Two servers sit idle for most…
- Ask in plain words: Your help centre gets 1,000 req/s, and 5% are people asking questions in their own words: 50 a second. Keyword search…
- Run it at night: A daily job updates every customer's invoice. Someone set it to 20:00, right on top of your evening peak, and now the…
- Numbers as they happen: 20,000 sensors report in: 3,000 readings a second at the peak. You need to store them, show live totals and let…
- SQL that grows by itself: A bank-like app: 30,000 req/s and 30% are writes, 9,000 a second. Your orders need joins and real transactions, so…
- People you may know: A social app with 5,000 req/s. 4% are "people you may know" lookups: 200 a second, each walking friends of friends. In…
- Ready for launch: The design holds up at 5,000 req/s. But nobody can reach it by name, nothing blocks attacks, the passwords are in the…
- Go worldwide: Half your users are now outside the US: 30% in Europe and 20% in Asia. A read from Mumbai to Virginia takes about 190…
Design skills
- Ask before you build: An interviewer says: design a link shortener. You ask, and learn it gets 5,000 req/s, and people open links about 99…
- Do the maths first: 10 million people use your app each day and make 20 requests each. Work out the traffic before you build. A day has…
- Shape the data and the API: You're building a shop. With bots included, 9,000 req/s arrive, far more than your two servers can answer. Before the…
- Fresh or fast: People change their shipping address, reload the page and see the old one. Your replicas are a moment behind the…
- Add a machine, keep your data: Traffic has reached 9,000 req/s and your one cache needs company. Last time you added a machine, nearly every key…
- One order, many services: An order touches payments, stock and delivery, and each has its own database. The card was charged, then the stock…
- Count the nines: Sales wants to promise customers 99.9% uptime, which people call three nines. Your design has one load balancer, one…
- Undo a mistake: At 2 p.m. an engineer runs a delete without its filter, and every order is gone. Your database has a standby and a…
- Three copies, no leader: A shopping cart is kept on 3 machines, and none of them is in charge: any of them takes a write. Right now a write…
- Is that server alive?: One of your 6 servers crashes at 3 a.m. Your load balancer has no health checks, so it keeps sending that server a…
- Push or poll: A live cricket score app has 3 million people watching. The app asks your servers for the score every few seconds, and…
Keep it running
- The cache that took down the database: 12,000 req/s, and the cache answers 4 in 5 reads, so the database is calm. Then the home page's cached answers all…
- Pay for the peak only at the peak: Traffic peaks at 20,000 req/s for one hour each evening, and is under half that the rest of the day. Four servers melt…
- When retries make it worse: 9,000 req/s on five servers. One server crashes, and the four left are a little short. That should cost you about one…
- Serve some, not none: A flood: 16,000 req/s arrive, and six servers can answer 12,000. There's no time to add machines. Right now every…
- The release that broke everything: 8,400 req/s on five healthy servers. On Friday a new version goes out to all five at once. It has a bug that makes…
- Two primaries: Your database has two machines: a primary and a standby. The network between them drops for a minute. The standby…
- Someone else's limit: A delivery app on a Saturday evening: 7,000 req/s, and about 1 in 110 asks for a route quote while the customer waits.…
- The PDF that ate the quota: Your app answers questions about documents: 2,000 req/s, and 1 in 200 asks the model something, 10 calls a second.…
Real outages
- Microsoft 365: the servers that dropped out: On 12 November 2026, Outlook, Teams and the rest of Microsoft 365 went down for most of a day. Microsoft said a number…
- Cloudflare: one bad file, everywhere: On 18 November 2025, a large part of the web returned errors for hours. Cloudflare's bot detection reads a small file…
- AWS: everything in one region: On 20 October 2025, AWS's oldest region, US East, was disrupted for over 14 hours. A bug left its database service,…
Real apps
- Netflix: 65 million at once: At its biggest live event, Netflix reached 65 million streams at the same moment. You're running one thousandth of…
- Amazon: Prime Day: On Prime Day 2025, DynamoDB peaked at 151 million requests a second. You're running one ten-thousandth of that: 15,100…
- Flipkart: the sale opens: When Big Billion Days opened in 2026, Flipkart reported 6.3 million people on it at once. You're running one hundredth…
- Swiggy: New Year's Eve: Swiggy hit 9,500 food orders a minute on New Year's Eve: 158 a second. Here that's real size, not scaled down. With…
- Instagram: 3 billion people: Instagram says 3 billion people use it every month. You're running a small slice of that: 30,000 req/s. Most of it is…
- ChatGPT: 2.5 billion prompts a day: OpenAI says ChatGPT gets 2.5 billion prompts a day, about 29,000 a second. You're running one hundredth of that:…
- GTA VI: launch night: GTA VI unlocks at midnight, one region at a time. Its 212 GB are already on every console from the pre-load, but the…
- Fortnite: 3.4 million at once: In February 2018 Fortnite hit 3.4 million players at once, and its services fell over six times in one weekend. You're…
- Hotstar: 25 million watching: On July 10, 2019, India played New Zealand in the World Cup semi-final and 25.3 million people watched on Hotstar at…
- UPI: 25 billion payments a month: In October 2026 UPI handled 25.47 billion payments, close to 10,000 every second on average and far more on a festival…
- Stripe: the order that never shipped: From Black Friday to Cyber Monday 2025, businesses on Stripe took more than 578 million payments, up to 152,000 a…
Big architectures
- Video platform: upload to play: You run a video site with 25,000 req/s at the evening peak. Most of it is people watching, a few are searching, and…
- Chat app: 6 million online: Your chat app has 6 million people online at the peak, sending 6,000 req/s. 12% are new messages, 720 a second, and a…
- Ticket sale: one show, everyone at once: Tickets for the year's biggest tour go on sale at 10:00. 50,000 req/s arrive in the first minute, for 60,000 seats.…
- Ride hailing: a driver in two seconds: 60,000 drivers are on the road, each sending their position every 4 seconds: 15,000 updates a second. Riders open the…
- Live match: a goal in the final: 8 million fans have the app open for the final. Every goal, card and substitution must reach all of them within a…
- Bank transfers: money never vanishes: A bank app with customers around the world: 6,000 req/s, and 30% move money. A balance must never be out of date, a…
- Card fraud: a verdict in 100 ms: A card network sees 5,000 req/s. 20% are payments waiting for a yes or no, and the shop's till won't wait more than…
- Game leaderboard: 2 million players: A mobile game has 2 million players online. They send 20,000 req/s, and half are score updates. A famous streamer just…
- Smart home: a million devices: A million thermostats and plugs report in every few minutes: 4,000 req/s at the evening peak, 80% of them readings.…
- News site: every view counted: A news site gets 30,000 req/s on a big news day. Half are images. A third of the rest are page view events, and…
- Black Friday, worldwide: A shop with customers in America, Europe and Asia. On Black Friday 30,000 req/s arrive, half of them images, and…
- Watch next: a row for every person: A streaming app at the evening peak: 12,000 req/s. A quarter are home screens asking what this person should watch…
- Payouts: every cent accounted for: A marketplace that pays its sellers: 2,000 req/s, and 4% are payments, 80 a second, charged by the Payment API while…
Core concepts
- How a request travels: You launch shop.example to 5,000 req/s. Nobody can find it by name yet, and half of every page is images and scripts…
- Forget the user between requests: Each server keeps its users' logins in its own memory. When one crashes, everyone on it is logged out, and a new…
- Pick the right key: Orders are stored in a NoSQL DB split by country, and 30% of orders come from one country. 12,000 req/s arrive, and…
- Built for writes: Delivery vans send their location every few seconds: 20,000 req/s, and 90% are new readings. Your Postgres primary is…
- Who's in charge?: Your database has a primary and one standby. When the network between them broke, both thought they were in charge and…
- All or nothing: A wallet app moves money between accounts: 10,000 req/s, and 60% are transfers. Every transfer must take from one…
- Last one in stock: A phone launch: 7,500 req/s, and 20% are people pressing Buy on the same phone, 1,500 a second. Last launch, the shop…
- Two transfers, stuck forever: An app for friends splitting bills: 4,000 req/s, and 30% are transfers. Friends often pay each other back at the same…
- The worker that woke up late: Workers rebuild each shop's invoices. Only one may work on a shop at a time, so each takes a lock first. Last week a…
- The crawler that empties the cache: A news site: 24,000 req/s, nearly all reads, and the cache usually answers 85% of them. Every hour a search engine…
- One slow export jams a server: A team dashboard: 7,000 req/s on 4 app servers, which adds up to more than enough. But 1 request in 10 is a CSV export…
- The burst at the window edge: A public API: 12,000 req/s, most of it scrapers. Your gateway lets 7,000 a second through, which 4 servers can carry.…
- Let real users burst: A team dashboard: 3,000 req/s, well under your gateway's limit. But opening the dashboard fires 30 calls at once, and…
- How services talk: Your shop has grown into an app plus an internal Orders service. Phones, the website and partners all call in, 6,000…
- Who are you, and what may you do?: Your app checks passwords itself, and the database password is written in the code. 5,000 req/s arrive, and every one…
- See inside your system: Users say the app is slow sometimes. Your servers handle 5,000 req/s and look fine, but you have no numbers, no logs…