Complete

System Design

Networking, caching, databases, queues and distributed systems, then full case studies like a URL shortener and a food delivery app. Beginner to interview-ready in 14 units. The whole course is written and open, with new case studies added after launch. Each unit is a district of your city: finish its lessons and its lights come on.

Units
14
Lessons
125
Free lessons
13
New to the jargon? Open the glossary168 system design terms in plain words, searchable, each linked to the unit that teaches it.

Ready to rehearse? Try a written mock interview: a timed design question with follow-ups and a report.

The districts

  1. District 0 · Open

    Start here

    What system design is, how to approach a design question, and the numbers every engineer should know.

    Show 5 lessons
    1. What system design isTwo apps do the same thing. One works for 100 users. The other works for 100 million. The code for the feature is almost identical. So what's different?Free
    2. The 6-step approach"Design a photo-sharing app." Forty-five minutes on the clock. Where do you even start?Free
    3. The client–server modelYou tap "Like" on a photo. Within a blink, a friend on another continent sees the heart. Where did that like actually go?Free
    4. Latency numbers every engineer should knowReading a value from memory takes about 100 nanoseconds. Sending a request across the ocean takes about 150 milliseconds. That's over a million times longer. Your design has to know the difference.Free
    5. Estimation basicsYour boss asks: "Can one server handle the launch?" You have two minutes and no spreadsheet. A few rounded numbers are all you need.Free
  2. District 1 · Open

    How the web talks

    DNS, HTTP, TCP and UDP, API styles, and real-time connections.

    Show 7 lessons
    1. Network layers and IP addressesWhen you load a web page, your request is chopped into packets that cross dozens of networks. Some get lost, some arrive out of order, and the page still loads. Who's in charge of that?Free
    2. DNSYou type shop.example.com. Your computer has no idea where that is. A fraction of a second later it has an address on the other side of the world. Who did it ask?Free
    3. TCP vs UDPA bank transfer must arrive perfectly, even if it takes a moment longer. A video call must arrive now, even if a few pixels are lost. They use different transport protocols for exactly that reason.Free
    4. HTTP and HTTPSAlmost everything your phone does online is the same tiny conversation: "Please give me this." "Here you go." Repeated billions of times a second.Free
    5. REST vs RPC (gRPC) vs GraphQLYour mobile app needs a user's name and their last three orders. One API makes it take three round trips. Another gives it back in one. A third does it faster between servers. Same data, three styles.Free
    6. Polling, long polling, WebSockets and SSEHTTP only speaks when spoken to. So how does a chat app show Bob's message the instant he sends it, when your phone never asked for it?Free
    7. WebhooksA customer pays. The payment provider knows instantly. Your shop doesn't, unless someone tells it. Asking "has it been paid yet?" every second would be silly. So the provider calls you instead.Free
  3. District 2 · Open

    Scale basics

    Scalability, latency and throughput, horizontal scaling, availability.

    Show 7 lessons
    1. Performance vs scalabilityYour app answers in 80 milliseconds when you test it alone. On launch day, with a hundred thousand people, the same page takes eight seconds. Did the code get slower?Paid plan
    2. Latency vs throughputA cargo ship carries 20,000 containers but takes three weeks to cross the ocean. A courier plane carries a few boxes and lands tomorrow. Which one is faster?Paid plan
    3. Vertical vs horizontal scalingYour one server is maxed out. You can buy a server twice as big, or a second server just like the first. Which one should you buy?Paid plan
    4. Concurrency vs parallelismOne barista takes your order, starts the milk, takes the next order, then pours your coffee. Two baristas each make a drink at the same time. Both serve more people. They are not doing the same thing.Paid plan
    5. Stateless servicesYou add a fifth server during a traffic spike. Within seconds it's handling requests from users it has never seen before, and none of them notice. How can a brand-new server know who they are?Paid plan
    6. Availability and the ninesYour cloud provider promises 99.9% uptime. That sounds like almost never down. It actually allows almost nine hours of outage a year. Is that good enough for you?Paid plan
    7. Single points of failureYou run ten app servers so that no single crash can take you down. Then the one load balancer in front of them reboots, and the whole site goes dark. What did you miss?Paid plan
  4. District 3 · Open

    Traffic management

    Load balancers, reverse proxies, CDNs, API gateways and rate limiting.

    Show 7 lessons
    1. Load balancersYour site runs on five servers, but users only ever type one address. Something has to decide, thousands of times a second, which server gets each request, and notice when one of them dies.Paid plan
    2. Load balancing algorithmsServer A is idle. Server B is grinding through nine slow reports. "Take turns" sends the next request to B anyway. Can the load balancer do better?Paid plan
    3. Reverse proxiesYour app has exactly one server, so you don't need a load balancer. Yet almost every production setup still puts Nginx in front of it. What is it doing there?Paid plan
    4. Content delivery networksYour server is in Virginia. A user in Sydney loads your homepage, which needs 40 files. Each trip across the Pacific and back takes about 200 milliseconds. How do you make the page feel local?Paid plan
    5. API gatewaysYour app has grown into twelve small services. Each one checks login tokens, applies rate limits and logs requests, in its own slightly different way. A security fix now means twelve deploys. There has to be a better place for this.Paid plan
    6. Rate limiting algorithmsOne customer's buggy script calls your API 5,000 times a second. Your servers slow down for every other customer too. You need a rule like "100 requests a minute each". How do you actually count that?Paid plan
    7. Case study: design a rate limiterInterview question: design the rate limiter for a public API with 10 million API keys, handling 50,000 requests a second across 20 gateway servers. Every key has its own plan limit. Where do you start?Paid plan
  5. District 4 · Open

    Caching

    Where to cache, caching strategies, eviction and invalidation.

    Show 7 lessons
    1. Why cache, and whereThe most-read page on your site asks the database the same question 3,000 times a second and gets the same answer every time. What if you only asked once?Paid plan
    2. Cache-asideYour product page reads the same price from the database 50,000 times a minute. The price changes twice a day. Something is wasteful here.Free
    3. Write-through, write-behind and refresh-aheadCache-aside waits for a reader to miss before it fills the cache. What if your writes kept the cache up to date instead, or your cache refreshed popular items before they expired?Paid plan
    4. Eviction policiesYour cache has room for one million items. Item one million and one just arrived. Something has to go. What should it be?Paid plan
    5. Invalidation and cache stampedesYour homepage query takes 2 seconds and is cached for 5 minutes. At 12:05:00 the entry expires. In that same second, 4,000 users load the homepage. What does your database see?Paid plan
    6. Distributed cachingYour cache needs 400 GB of memory and handles 1 million reads a second. No single cache server can do that. How do you spread one cache across many machines, and what happens when one of them dies?Paid plan
    7. Redis vs Memcached"Just add Redis" is the most common answer in system design interviews. But Memcached ran some of the biggest sites on the internet. When does the simpler one win?Paid plan
  6. District 5 · Open

    Data storage

    SQL and NoSQL, indexes, replication, sharding, blob storage and IDs.

    Show 13 lessons
    1. SQL vs NoSQLYour team is starting a new product and someone says "just use MongoDB, SQL doesn't scale". Someone else says "just use Postgres for everything". Who's right?Paid plan
    2. Database indexesYour login query took 2 ms in testing. With 50 million users in production it takes 9 seconds. One line of SQL brings it back to 2 ms. What is that line?Paid plan
    3. B-trees vs LSM treesPostgres and Cassandra both store data on disk, but one is happiest with reads and the other swallows hundreds of thousands of writes a second. The difference is how they lay data out on disk.Paid plan
    4. ACID transactions and isolationYour server crashes after taking $100 out of Alice's account but before adding it to Bob's. The $100 has vanished. How do databases make sure this never happens?Paid plan
    5. ReplicationYour database server's disk dies at 3 a.m. Do you lose everything since last night's backup, or does a copy take over in seconds? That depends on replication.Paid plan
    6. ShardingYour database is on the biggest machine money can rent, and writes are still maxing it out. Replicas don't help, because every write still goes to one leader. What now?Paid plan
    7. Consistent hashingYou have 4 cache servers and add a fifth for the holiday rush. Suddenly almost every lookup misses and your database falls over. Adding a server made things worse. Why?Paid plan
    8. The NoSQL families"We use NoSQL" tells you almost nothing. Redis, MongoDB, Cassandra and Neo4j are all NoSQL, and they're as different from each other as they are from Postgres.Paid plan
    9. Denormalization and federationYour feed page runs a five-table join for every post, a million times a minute. Storing the author's name in every post would make it one read. Is copying data ever the right call?Paid plan
    10. Blob storageUsers upload 2 million photos a day. Putting them in your database would make it enormous and slow. So where do the photos go, and how does the app find them again?Paid plan
    11. Generating unique IDsOn one database, AUTO_INCREMENT hands out 1, 2, 3... Split the data across 16 shards and two of them happily give different tweets the id 1,042. How do big systems make IDs that never clash?Paid plan
    12. Case study: design a URL shortenerInterview question: design a service like bit.ly. Users turn long links into short ones, and 100 million new links a day must redirect in milliseconds for years. Where do you start?Paid plan
    13. Case study: design PastebinInterview question: design Pastebin. People paste text, get a link, and share it. Pastes can expire. Ten million pastes a day. It sounds like the URL shortener, so what's different?Paid plan
  7. District 6 · Open

    Async & messaging

    Queues, pub/sub, logs, delivery guarantees and back pressure.

    Show 13 lessons
    1. Why asyncYour checkout button takes nine seconds, because it charges the card, builds a PDF receipt, sends an email, calls the warehouse and updates analytics before it answers. Only one of those had to happen before the customer saw "Thank you". Which one?Paid plan
    2. Message queuesYour email service keeps pending emails in memory. It crashes during a deploy, and 2,000 sign-up emails vanish. Nobody notices for a week. A message queue exists so that work survives crashes, waits its turn and gets done by whoever is free.Paid plan
    3. Task queues and background jobsEvery night at midnight, a job emails each user their weekly summary. You add a second server for redundancy, and the next morning every user has two summaries. Background jobs look simple until they run in the wrong place, at the wrong time, or twice.Paid plan
    4. Publish and subscribeWhen an order is placed, the order service calls email, analytics, the warehouse and loyalty points. Each new team that wants to know asks the order team to add one more call. Pub/sub flips it: the order service announces what happened, once, and anyone who cares listens.Paid plan
    5. Push vs pull consumersOn Black Friday, the broker pushes 5,000 messages a second at a consumer that can handle 500. It runs out of memory, restarts, and is pushed 5,000 a second again. Whether the broker pushes or the consumer pulls decides who sets the pace.Paid plan
    6. Kafka and the logA bug in billing miscalculated discounts for three days. You've fixed it, but the queue deleted every message the moment it was processed, so there's nothing to run again. A log keeps messages after they're read, which changes what you can do.Paid plan
    7. Change data captureYour app saves a product to the database, then updates the search index. One day it crashes in between, and search shows the old price for a week. Writing the same change to two places from your code will eventually disagree. Change data capture reads the change from the one place it's guaranteed to be.Paid plan
    8. Delivery guaranteesA broker's marketing page promises "exactly-once delivery". Your payments team is delighted. But over a network that can lose any message, including the reply that says "got it", no system can promise that a message arrives exactly once. Here's what they really mean, and what you have to build yourself.Paid plan
    9. IdempotencyA customer presses Pay. The request times out on their train's patchy signal, so the app retries, and the card is charged twice. Retries are everywhere in async systems, from clients, load balancers, queues and workers. Idempotency is what makes them safe.Paid plan
    10. Back pressureA service accepts every request into an in-memory queue. At the evening peak, the queue reaches two million items, each request waits forty minutes, and then the process runs out of memory and loses all of them. When work arrives faster than you can do it, something has to give. Back pressure is deciding what, before the rush.Paid plan
    11. Batch vs stream processingA fraud check runs every night at midnight. A stolen card is used at 10 a.m., and by the time the job flags it, the thief has had fourteen hours. Some answers can wait until tomorrow, and some can't. That's the choice between batch and stream processing.Paid plan
    12. Case study: design a notification systemInterview question: design the system that sends push notifications, texts and emails for an app with 50 million users. Some messages are one-time passwords that must arrive in seconds. Others are a weekly digest. Where do you start?Paid plan
    13. Case study: design a news feedInterview question: design the home feed for a social app with 300 million daily users. Each person follows a few hundred accounts, and a few accounts have 50 million followers. Opening the app must show fresh posts in a blink. Where do you start?Paid plan
  8. District 7 · Open

    Distributed systems

    CAP, consistency models, quorums, consensus and distributed transactions.

    Show 13 lessons
    1. When the network liesYou send a request to another service and hear nothing back. Did it crash? Is it just slow? Did it do the work, and only the reply got lost? You can't tell, and every distributed system has to be built around that.Paid plan
    2. Clocks and orderingTwo servers save the same profile a second apart, and the database keeps the one with the later timestamp. But one server's clock runs three seconds fast, so the older edit wins and the newer one silently disappears. In a distributed system, you can't trust the time.Paid plan
    3. CAP and PACELCYour app runs in two data centres, and the link between them is cut. Both halves are still running, and both are still getting requests. Do they keep answering, and risk disagreeing? Or do they refuse until the link is back? There's no third option.Paid plan
    4. Consistency modelsYou post a comment, refresh, and it's gone. Refresh again, and it's back. Nothing is lost. You're reading from different copies, and the system never promised which one you'd get.Paid plan
    5. Conflicts and CRDTsTwo people edit the same document on a plane, with no signal. When they land, both versions sync. Whose changes win? If the answer is 'whoever landed last', someone's work just vanished.Paid plan
    6. Leader election and leasesA job runs every night to charge subscriptions. You run three copies of it for safety. One night, all three think they're in charge, and every customer is charged three times. Some work must be done by exactly one machine at a time.Paid plan
    7. Consensus with RaftFive servers must agree on the order of every change, even while some of them crash and the network drops messages. If two of them disagree about what happened, which one is right? Consensus algorithms make sure that question never comes up.Paid plan
    8. Distributed locks and fencingTwo copies of a job both think they hold the lock on the same file, and both write to it. The lock service did nothing wrong. One of them was simply paused for a few seconds at the worst moment. How do you stop it?Paid plan
    9. Two-phase commitA bank transfer takes money out of an account on one database and puts it into an account on another. If the first succeeds and the second fails, money vanishes. How do you make two machines commit together, or not at all?Paid plan
    10. SagasPlacing an order touches four services: orders, payments, stock and delivery. Each has its own database, and there's no transaction that covers them all. Payment succeeds, then stock runs out. How do you put things back?Paid plan
    11. Case study: design a distributed key-value storeInterview question: design a key-value store that holds a billion keys across dozens of machines, keeps working when machines die, and answers in a few milliseconds. It's the classic test of everything in this unit. Where do you start?Paid plan
    12. Case study: design a chat systemInterview question: design a chat app for 500 million daily users, with one-to-one and group chats, online status, and delivered and read ticks. Messages must arrive in a blink, in the right order, and never get lost when a phone is offline. Where do you start?Paid plan
    13. Case study: design a payment systemInterview question: design the payment system for an online marketplace. Buyers pay by card, sellers get paid, the marketplace keeps a fee, and an outside provider moves the actual money. A payment must never be charged twice or lost, even when calls time out. Where do you start?Paid plan
  9. District 8 · Open

    Architecture styles

    Monoliths, microservices, event-driven systems, CQRS and serverless.

    Show 10 lessons
    1. Monoliths and modular monolithsShopify powers millions of online shops from a single Rails codebase. Amazon's Prime Video team rebuilt one service as a single process and cut its costs by 90%. Is the monolith the problem, or the way it's built?Paid plan
    2. MicroservicesUber once ran about 2,200 microservices. Netflix runs over a thousand. Most startups run one app. What do the big ones get from splitting, and what does it cost them every day?Paid plan
    3. Finding service boundariesTo sales, a customer is a lead with a phone number. To billing, it's an account with a card. To support, it's a ticket history. Should all three teams share one Customer table? Getting this wrong is how microservices turn into a distributed monolith.Paid plan
    4. How services talkThe checkout page calls pricing, which calls tax, which calls the address service. Each is up 99.9% of the time. How often is checkout up? And how does pricing even find tax, when its machines change every hour?Paid plan
    5. Service mesh and sidecarsEvery one of your 80 services needs retries, timeouts, encryption between services, metrics and tracing. Written in five languages, by twelve teams. Do you build that 80 times, or take it out of the services altogether?Paid plan
    6. Event-driven architectureWhen an order is placed, should the order service tell the warehouse to pack it, or just announce that it happened and let the warehouse decide? That one choice shapes how your whole system grows.Paid plan
    7. Event sourcingYour database says the account balance is £40. A customer asks how it got there, and support asks what it was last Tuesday. A normal table can't answer either question. What if you stored every change instead of the result?Paid plan
    8. CQRSWriting an order needs strict rules and a tidy, normalised model. Reading orders needs a dozen different shapes: by customer, by day, by product, full-text search. Why force one model to do both jobs badly?Paid plan
    9. ServerlessYour image-resizing job runs a few thousand times a day, in bursts. Do you keep servers running all night just in case, or pay only for the milliseconds it actually runs?Paid plan
    10. Case study: design a food delivery appInterview question: design a food delivery app. Customers browse menus and order, restaurants cook, couriers pick up and deliver, and everyone watches the food move on a map. It touches every lesson in this unit. Where do you draw the lines?Paid plan
  10. District 9 · Open

    Search & special data structures

    Inverted indexes, tries, Bloom filters and geospatial indexes.

    Show 10 lessons
    1. Inverted indexesA shop has 50 million product descriptions, and a shopper types 'red waterproof jacket'. Scanning every description would take minutes. Search engines answer in milliseconds. What are they reading instead?Paid plan
    2. Ranking and relevanceA search for 'garden flat with parking' matches 40,000 listings. The user will look at the first ten. Which ten, and in what order? That choice is most of what makes search feel good.Paid plan
    3. Search at scaleFifty million products don't fit on one search server, and a hundred thousand searches a second wouldn't either. How do you split an index across machines and still return the best ten results in milliseconds?Paid plan
    4. Tries and typeaheadA user types 'how t' and, before they type the next letter, sees 'how to tie a tie'. Suggestions must appear within about a hundred milliseconds of the user pausing, from billions of past searches. What structure makes that possible?Paid plan
    5. Bloom filtersA database has a thousand files on disk. To read one key, it would like to open only the files that might hold it. Is there a tiny summary that can say 'definitely not here' without storing the keys?Paid plan
    6. HyperLogLog and count-min sketchHow many different people visited today? Which hashtags are trending this minute? Exact answers mean remembering every ID or keeping a counter for every item. For billions of events, a small, nearly right answer is often worth far more.Paid plan
    7. Geospatial indexesFind coffee shops within a kilometre of me, out of a hundred million places, in under a hundred milliseconds. A normal index on latitude returns a whole band around the planet. How do maps and delivery apps do it?Paid plan
    8. Case study: design a nearby places serviceInterview question: design a service that finds places near you, like cafés, gyms and petrol stations, with ratings and reviews. A hundred million people a day, answers in under 200 ms. Which index, and where does it live?Paid plan
    9. Case study: design typeaheadInterview question: design the suggestions under a search box. Half a billion searches a day, and as each person types, the five most popular ways to finish their words must appear before they type the next letter. Where do you start?Paid plan
    10. Case study: design a web crawlerInterview question: design the crawler that feeds a search engine. Start from a few seed pages, follow every link, and fetch a billion pages a month, without knocking over anyone's website. Where do you start?Paid plan
  11. District 10 · Open

    Reliability & operations

    Observability, SLOs, retries, circuit breakers, safe deploys, disaster recovery and incident response.

    Show 10 lessons
    1. Observability, logs, metrics and tracesCheckout got slow at nine o'clock. Nothing crashed, no alarms fired, and forty services are involved. You can't attach a debugger to production. What would you need to have recorded, before it happened, to find the cause?Paid plan
    2. SLOs, error budgets and alertingYour team promised 99.9% availability. Last night one request failed and someone was woken at 3 a.m. Next week a slow leak of errors went unnoticed for days. Both are alerting failures. How do you decide what's worth waking a person for?Paid plan
    3. Retries, deadlines and hedgingA payment call times out. Retrying might fix it, or charge the customer twice, or pile more load onto a service that's already drowning. Retries are the most common reliability tool and a common cause of outages. When should you retry, and how?Paid plan
    4. Circuit breakers, bulkheads and fallbacksThe recommendations service slows to a crawl. Within minutes checkout stops too, though it barely needs recommendations. Nothing in checkout broke. Its threads were all stuck waiting. How does one slow part sink everything, and how do you build walls against it?Paid plan
    5. Graceful degradation and overloadBlack Friday traffic hits five times normal, faster than you can add servers. Should the whole site slow down for everyone, or should something give? And once the rush passes, why do some systems stay broken anyway?Paid plan
    6. Safe deploymentsMost outages start with a change: a deploy, a config tweak, a migration. You can't stop changing things, because that's the job. So how do you change a live system without breaking it for everyone at once?Paid plan
    7. Backups and disaster recoveryAt noon, a bad migration deletes half the customer table. The replicas copied the delete within milliseconds. How much data can you get back, and how long will it take? The answer was decided months ago, by whoever designed the backups.Paid plan
    8. Incident response and postmortemsAt 2 a.m. a burn-rate alert pages you: checkout errors are climbing. Five engineers join the call, everyone starts debugging, and nobody tells customers anything for an hour. The system is fixed eventually. What should the first ten minutes have looked like, and what happens afterwards so it doesn't repeat?Paid plan
    9. Case study: design a metrics monitoring systemInterview question: design the system that watches all the other systems. Ten thousand servers, half a million readings a second, and it must page someone within minutes when things break. And when the monitoring itself breaks, who notices?Paid plan
    10. Case study: design a video streaming serviceInterview question: design a service like YouTube. Creators upload half a million videos a day, and viewers watch half a billion a day on phones, laptops and TVs, over fast and slow networks. Uploads must never be lost, and playback must never freeze. Where do you start?Paid plan
  12. District 11 · Open

    Security essentials

    Authentication, authorization, tokens, encryption and secrets.

    Show 8 lessons
    1. Authentication, passwords and sessionsA database of user passwords leaks. If the passwords were stored well, the attackers learn almost nothing. If not, millions of accounts across the web are at risk, because people reuse passwords. What makes the difference?Paid plan
    2. OAuth 2.0 and OpenID ConnectA photo printing app asks for your cloud photos password, so it can fetch your holiday pictures. Handing it over gives the app everything in your account, until you change the password. How do apps get just what they need instead?Paid plan
    3. Authorization and access controlA user changes the number at the end of a link from 1001 to 1002, and sees someone else's invoice. They didn't hack anything. They were signed in, and the server checked that. What did it forget to check?Paid plan
    4. Encryption in transit, at rest, and key managementA backup of your customer database goes missing from a courier's van. Is that a disaster, or a shrug? It depends on choices you made long before the van left.Paid plan
    5. Secrets managementA developer pastes a database password into the code, just to test. Weeks later the repository is public for one afternoon. Bots that scan public code find the password within minutes. Now what?Paid plan
    6. Common web vulnerabilitiesSomeone types a quote mark and a few words into a login box, and the server returns every user in the database. The attacker only typed data. Why did the server run it as a command?Paid plan
    7. Defence in depth and zero trustIn 2013, attackers used a heating contractor's stolen login to get onto a big US retailer's network, and from there reached the payment tills in its stores. How did one small side door lead almost everywhere?Paid plan
    8. Case study: design a login and single sign-on serviceInterview question: design login for a company with 50 million users and twenty apps. Sign in once, use them all. If login is slow, every app is slow, and if it's down, everything is down. Where do you start?Paid plan
  13. District 12 · Open

    Cloud design patterns

    Migration, sidecars, IaC, autoscaling, costs, multi-tenancy, cells and multi-region.

    Show 10 lessons
    1. Migrating with the strangler figNetflix spent about seven years moving its service from its own data centres into the cloud, and members kept streaming the whole time. How do you replace a system that can't be switched off?Paid plan
    2. Sidecar, ambassador and adapterA ten-year-old billing app must now use TLS, retry a flaky partner and send metrics your way. Nobody dares touch its code. What can you change instead?Paid plan
    3. Infrastructure as codeAt two in the morning, an engineer fixes a production server by hand. Months later the server dies, and nobody knows how to build it again. What should have been written down?Paid plan
    4. Autoscaling in practiceTickets for a big tour go on sale at nine, and traffic jumps fifty times in a minute. Your new servers take four minutes to start. What happens at one minute past nine?Paid plan
    5. Designing for cloud costsA startup's cloud bill doubles in a month, but nobody launched anything new. Where did the money go, and who should have noticed?Paid plan
    6. Multi-tenant architectureOne customer of your business software runs a huge report, and every other company using it slows to a crawl. They've never met, yet they share your servers. How do you keep them apart?Paid plan
    7. Cell-based architectureA bad config change reaches your one big database, and every customer in the world goes down at once. Could the same mistake have reached only a few of them?Paid plan
    8. Running in multiple regionsYour whole service runs in one region, in Virginia. A user in Sydney waits about 200 ms for every round trip, and one bad day in Virginia takes everyone down. What would a second region fix, and what new problems would it bring?Paid plan
    9. Case study: design a multi-tenant SaaS helpdeskInterview question: design a customer support ticket service sold to twenty thousand companies, from two-person shops to a bank with ten thousand agents. One big customer must never take the others down. Where do you start?Paid plan
    10. Case study: design a file sync serviceInterview question: design a service like Dropbox. Save a file on your laptop and it appears on your phone and your work computer, even if you edited it offline on a plane. Fifty million users, and not one edit may be lost. Where do you start?Paid plan
  14. District 13 · Open

    Putting it together

    How interviews are levelled, three classic cases that cut across units, and a full 45-minute interview, minute by minute.

    Show 5 lessons
    1. Interview levels: junior to staffTwo candidates draw the same boxes for the same URL shortener. One is levelled mid, the other senior. The diagram didn't decide it. What did?Paid plan
    2. Case study: design a ride-hailing serviceInterview question: design a ride-hailing app. A rider taps a button and a nearby driver arrives within minutes, while a million drivers' phones report where they are every few seconds. How do you find the right driver, fast, without ever giving one driver two trips?Paid plan
    3. Case study: design a ticketing systemInterview question: design ticket sales for a concert company. Fans pick seats on a map, hold them while they pay, and get tickets. For the year's biggest show, 2 million fans arrive in the first minute for 60,000 seats. How do you sell every seat exactly once, and make it feel fair?Paid plan
    4. Case study: design a leaderboardInterview question: design the leaderboard for a mobile game with 50 million daily players. Show the top ten, your own rank among 100 million, and boards that reset every day and every week. A database ORDER BY works for a thousand players. What do you do for 100 million?Paid plan
    5. A 45-minute interview, minute by minuteInterview question: design a collaborative document editor, like Google Docs. You have 45 minutes and a blank whiteboard. Here's the whole interview, minute by minute: what to say, what to draw, and where candidates usually go wrong.Paid plan