System design interviews
Practise big-tech style system design interviews: a paced 45- or 60-minute framework with a mock interviewer, random questions and a self-scoring rubric, a back-of-the-envelope estimator, 38 reference architectures (likes, web search, webhooks, group chat, Kafka- and Dynamo-style stores, maps, a matching engine and more) as clickable diagrams with model deep-dive answers and interview cards, a live simulation of each one you can overload and break, a searchable question bank with a compare view, runnable building blocks (rate limiters, consistent hashing, Snowflake IDs, Bloom filters, fencing tokens, the outbox pattern and more) with Python, Go and Java versions, and trade-off cards.
Added · updated 30 October 2026
Works with
- Capacity and queueing planner Distributed systemsthe queueing maths behind the simulations, and a planner that turns a p99 target into a server count
- Load balancing and resilience, simulated Distributed systemsbalancing algorithms, retries, hedging and breakers simulated in depth for one tier
- Cache simulator Distributed systemseviction policies and hit ratios behind the cache boxes in these designs
- Kafka, simulated Databases and streamingthe log behind the queues in the feed, notification, metrics and payment designs, simulated broker by broker
- Raft and Paxos, simulated Distributed systemsthe consensus under leader election, leases and the scheduler design
- Partitioning and replication Distributed systemssharding, rebalancing and replication behind the sharded stores here
- Latency numbers every programmer should know Formatting and referencethe latency numbers the estimator quotes, in full and by year
- AWS architecture builder Cloudrebuild a reference architecture with real AWS services
- Coding interviews Interview prepthe coding rounds — patterns, practice problems you can run, and a mock interview
- Distributed patterns on Redis Databases and streamingthe building blocks as Redis commands and Lua — locks, rate limiters, caches, queues, counters, leaderboards — with races to step through
- Relevance and scoring explainer Search and relevancehow a document is scored for a query, the ranking stage of the search engine design
- Postings lab Search and relevanceposting lists, their compression and intersection — the index inside the search engine design
- Elasticsearch, simulated Search and relevancea sharded, replicated search cluster answering queries, like the search design's leaf tier
- Probabilistic data structures Distributed systemsCount-Min, HyperLogLog and Bloom filters behind the top-K, crawler and ad-click designs
- Clocks, CRDTs and gossip Distributed systemsCRDTs and logical clocks behind collaborative editing, chat ordering and ID generators
- Consistency models lab Distributed systemswhat each quorum setting of the key-value store design does and does not guarantee
How to use it
A system design interview asks you to design something large — a URL shortener, a news feed, a payment system — in 45 or 60 minutes, out loud. This tool helps you practise every part of it: pacing the conversation, doing the arithmetic, knowing the standard architectures well enough to explain each box, and understanding how they behave under load and when parts fail. Its question bank covers the kind of questions large tech companies (e.g. Google, Meta) commonly ask, based on publicly discussed interview formats — implementing likes, web-scale search, group chat, durable webhooks and more; the wording and the model answers are original.
How to use it
-
Interview framework — pick a practice question and a 45- or 60-minute slot and start the clock. The interview is split into eight phases (requirements, estimates, API, data model, high-level design, deep dives, bottlenecks and trade-offs, wrap-up); the bar shows the schedule, the black line shows the time, and the tiles say how long is left in your phase and whether you are ahead or behind. Move on with Next phase (or click a phase). Each phase lists the questions to ask yourself, what you should leave it with, and the usual mistakes. Afterwards, score yourself on seven rows of a rubric and save the session; the history shows how you are improving. Mock interview: a random question picks a question for you (by theme, difficulty and style) and resets the clock. The mock interviewer panel then plays the other side: reveal the interviewer’s typical answer to each clarifying question after you have asked it aloud, and in the deep dives let it throw a curveball (“now make it multi-region”, “a celebrity posts”, “the endpoint is down for a day”) for you to answer before opening the suggested answer.
-
Estimator — daily active users, reads and writes per user, record and media sizes, the peak factor, replication and retention give average and peak requests per second, the read-to-write ratio, storage per day, per year and over the whole period, bandwidth in and out, a cache size (the hot share of a day’s reads), servers at 70% utilisation and shards by storage and by write rate. Show the working prints every step. Each architecture has its own preset. Below are powers of two, handy round numbers and latency numbers.
-
Architectures — 38 reference designs. The first fifteen: URL shortener, rate limiter, news feed, chat, notifications, search autocomplete, web crawler, distributed cache, ride-hailing, video streaming, payments, a distributed job scheduler, a metrics and logging pipeline, file sync and ticket booking. Then: likes and reactions, a leaderboard and matchmaking, photo sharing, a web-scale search engine, a recommendation system, group chat at scale, live comments, collaborative document editing, an email service, a distributed key-value store, object storage, a distributed message queue, hotel reservations, a stock exchange matching engine, proximity search, maps and routing, ad click aggregation, top-K and trending, distributed tracing, durable webhooks delivery, a unique ID generator, an online code judge, and feature flags and config. Each has the requirements, API, data model and request paths; click any box in the diagram for its role, technology options and trade-offs, and see the further reading (public papers and engineering posts) and the other tools on this site that go deeper. Deep dives has five to eight of the questions interviewers push on, with model answers to compare with your own.
-
Interview card (a view of every architecture) sets the design out the way an interview runs: the prompt as an interviewer would say it, the clarifying questions a strong candidate asks with the answers an interviewer typically gives, requirements, scale assumptions (with the estimator preset), an API sketch, the data model, the high-level design step by step, the deep dives the interviewer usually pushes on, follow-up curveballs with suggested answers, what separates mid-level, senior and staff answers, and common mistakes.
-
Simulate runs a design: requests flow through the diagram’s boxes, each with replicas, workers, a queue and a service time. Boxes turn amber and red as they get busy, and the bottleneck pulses; charts show throughput, p50 and p99 latency, queue depth and the error rate. Raise or spike the traffic, put a hot key on a shard, lose an availability zone, click a box to kill, slow, scale or re-shard it or change a cache’s hit rate, and turn on retries (with or without backoff and jitter), circuit breakers, a front-door rate limit, longer or shorter timeouts, and message queues between services. Experiments replay a design’s key lesson — a celebrity post, a cold cache, a slow payment provider, an on-sale stampede.
-
Question bank — every design as a question, grouped by theme (counters and social, search and discovery, messaging and real-time, storage and data infrastructure, payments and transactions, geo and maps, media, analytics and streaming, platform and infrastructure), with a difficulty (warm-up, standard, hard) and a style: product architecture rounds lean on the API, the data model and request paths; infrastructure design rounds lean on partitioning, replication, consistency and failure. Search it, filter it, start a random mock interview from the filtered list, or tick up to four designs to compare: a table of the building blocks each one uses, what they all share and what only one needs. Blocks with a runnable version open in Building blocks; Which designs use… lists the designs built on a block.
-
Building blocks — twelve mechanisms that come up again and again: token-bucket and sliding-window rate limiters, consistent hashing with virtual nodes, Snowflake IDs, a Bloom filter, an LRU cache, a leader lease with fencing tokens, idempotency keys, the outbox pattern, geohash, base62 short codes, and exponential backoff with jitter. Each has an explanation, its cost and pitfalls, JavaScript you can edit and run against its tests in the page, and Python, Go and Java versions to read.
-
Trade-offs — nine cards for the decisions interviews keep returning to: SQL or NoSQL, push or pull fan-out, strong or eventual consistency, synchronous or asynchronous, cache-aside, write-through or write-back, sharding strategies, polling, long-polling, WebSockets or SSE, monolith or microservices, and batch or stream — each option with how it works, its pros and cons and when to pick it, a rule of thumb, and what the interviewer is probing for.
Your notes, scores, session history and edited code are kept in this browser only. Everything runs in your browser; nothing is sent anywhere. The first fifteen designs load with the page; the others and the interview cards load from this site the first time you open them.
How the simulation works
It is a discrete-event simulation (the shared engine flowsim-kit.js, built on the distributed
simulators' kit). Clients send requests at the offered rate with exponential gaps (Poisson
arrivals). Each request follows one of the design’s request paths, chosen in proportion. A box
has replicas (and, for stores, shards chosen by the request’s key); each replica has a number of
workers and a first-come-first-served queue, and takes an exponentially distributed service time.
A service keeps its worker while it calls the next box, as a thread-per-request server does, so a
slow database backs up the services that call it. Every call crosses a 1 ms network hop and has a
timeout.
-
Caches: a hit answers at once; a miss (or a cache that is down) makes the caller read the database — cache-aside.
-
Queues: with message queues on, the producer waits only for the broker to accept the message and consumers work through the backlog at their own pace (the hand-off to a consumer has no timeout); with them off, the work happens in the request.
-
Retries: clients retry failed requests up to the chosen count, waiting an exponential backoff (50 ms doubling, capped at 2 s), optionally with full jitter. Load balancers and gateways retry a refused connection on another replica. A load balancer takes a second to notice a dead replica; until then requests sent to it fail.
-
Circuit breakers open in front of a box when at least half of its last 20 or more calls in two seconds timed out, were refused or were shed by that box (failures it only passes up from further down do not count), refuse calls for three seconds, then let one probe through.
-
Rate limit: a token bucket at the front door rejects excess requests with a 429 at once.
-
Bounded queues (where a design sets one) reject work when full — load shedding.
-
A box is a bottleneck when it is at least 85% busy, when one of its replicas or shards is saturated, when its queue keeps growing, or when it is down.
The engine is unit-tested: Little’s law holds at every box, a single server matches the M/M/1 formula, a saturated server’s queue keeps growing, removing a replica raises latency, a higher hit rate takes load off the database, a breaker opens and closes, and retries without backoff multiply the load on a failing dependency.
Limits
-
Rates are scaled down so the simulation runs in a browser: one simulated request stands for many real ones. Service times, worker counts and replica counts are plausible but invented; use the shapes — where load piles up, how latency bends near saturation, what a failure does — not the absolute numbers.
-
The simulation ignores network bandwidth, CPU sharing between workers, garbage collection, connection pools, autoscaling and the cost of moving data when you re-shard (it moves instantly). Writes always go to a shard’s first live replica; reads go to the least busy one.
-
The estimator uses decimal units (1 KB = 1,000 bytes) and simple averages. The cache size is the classic upper bound (the hot share of a day’s reads, as if every read were a different item).
-
The model answers are one good way to answer, not the only one. Interviewers at different companies weight the phases differently; adjust the slot to your own interview.
-
The rubric is for honest self-assessment, not a hiring bar, and the level descriptions on the interview cards are a guide to depth, not any company’s levelling criteria.
-
The question bank lists the kind of questions commonly discussed for big-tech system design rounds; it does not claim that any company asks a particular question. Difficulty tags are a rough guide.
-
The compare view’s building blocks are a judgement of which mechanisms each reference design leans on; another good design for the same question may use different ones.
Sources
-
J. Dean, “Designs, Lessons and Advice from Building Large Distributed Systems”, LADIS 2009 keynote — the “numbers everyone should know” latency table. Powers of two and round numbers are standard arithmetic.
-
J. D. C. Little, “A Proof for the Queuing Formula: L = λW”, Operations Research 9(3), 1961 — checked by the engine’s tests.
-
M. Brooker, “Exponential Backoff and Jitter”, AWS Architecture Blog, 2015 — full jitter.
-
M. Fowler, “Circuit Breaker”, 2014 — the closed, open and half-open states.
-
D. Karger et al., “Consistent hashing and random trees”, STOC 1997 — consistent hashing.
-
B. H. Bloom, “Space/time trade-offs in hash coding with allowable errors”, CACM 13(7), 1970.
-
M. Kleppmann, “How to do distributed locking”, 2016 — fencing tokens.
-
G. Niemeyer, geohash (2008); the published examples
ezs42andu4pruydqqvjare used in the tests. -
Twitter’s Snowflake ID layout (41-bit timestamp, 10-bit machine, 12-bit sequence), announced on the Twitter engineering blog in 2010 (the 2010 code).
-
Each of the later architectures lists the papers and engineering posts it draws on under Further reading in its design view. Among them: S. Brin and L. Page, “The Anatomy of a Large-Scale Hypertextual Web Search Engine”, 1998; L. A. Barroso, J. Dean and
-
Hölzle, “Web Search for a Planet”, 2003; F. Chang et al., “Bigtable”, OSDI 2006; J. C. Corbett et al., “Spanner”, OSDI 2012; N. Bronson et al., “TAO: Facebook’s Distributed Data Store for the Social Graph”, USENIX ATC 2013; R. Nishtala et al., “Scaling Memcache at Facebook”, NSDI 2013; G. DeCandia et al., “Dynamo”, SOSP 2007;
-
H. Sigelman et al., “Dapper”, 2010; T. Akidau et al., “The Dataflow Model”, VLDB 2015; G. Cormode and S. Muthukrishnan, the Count-Min sketch, 2005; Stripe, “Designing robust and predictable APIs with idempotency”; Discord, “How Discord stores billions of messages” and “…trillions of messages”;
-
Fowler, “The LMAX Architecture”; and
-
Geisberger et al., “Contraction Hierarchies”, WEA 2008.
-
Linking to an example
Share link copies a URL that reopens the tool with its settings. Hand-written links work too;
add the tab after #: framework, estimate, archs, bank, blocks or tradeoffs. For example
?arch=news-feed&view=sim#archs or
?dau=50M&rpu=10&wpu=1#estimate.
| Parameter | Meaning | Example |
|---|---|---|
|
Framework: the practice question (an architecture id) and the slot, |
|
|
Estimator: daily active users, reads and writes per user per day, bytes per record, media bytes per write, peak ÷ average, replication factor, years kept, share of reads to cache, requests/s per server, GB per shard, writes/s per shard |
|
|
Architecture: |
|
|
|
|
|
Simulation: offered load (req/s), client retries, base backoff (ms, |
|
|
Run the design’s experiment with this number (from 0) |
|
|
Building block id and listing language: |
|
|
Question bank: search words; theme |
|
|
Question bank: up to four architecture ids to compare, separated by commas |
|
|
Trade-off card: |
|
|
One of the presets below; parameters written beside it override the preset’s |
|
Presets (?example=…, which also opens the right tab):
example= |
Shows |
|---|---|
|
A 45-minute mock interview on the URL shortener (open) |
|
A 60-minute mock interview on a news feed (open) |
|
A feed at 300 million daily users: posts, images, storage and servers (open) |
|
The URL shortener with a cold cache: the database becomes the bottleneck (open) |
|
A news feed: a celebrity posts and the fan-out workers fall behind (open) |
|
Payments: the payment provider goes down and clients retry at once, three times (open) |
|
Ticket booking: a big on-sale piles onto one event’s inventory (open) |
|
The token-bucket rate limiter, in Python (open) |
|
Consistent hashing with virtual nodes, runnable (open) |
|
The push-or-pull fan-out card (open) |
|
A 60-minute mock interview on a web-scale search engine (open) |
|
The interview card for durable webhooks delivery (open) |
|
The question bank’s messaging and real-time questions (open) |
|
Likes: a viral post on one counter shard, absorbed by write-behind aggregation (open) |
|
Webhooks: a customer’s endpoint goes down and instant retries flood the delivery workers (open) |
|
Search engine: one slow index shard sets the tail latency of every query (open) |
|
Likes, a news feed, top-K and a leaderboard compared block by block (open) |
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.