System design course
Learn System Design by Playing With It
Designs4Systems teaches system design with simulators instead of walls of text. Every lesson starts from an everyday picture, lets you play with a working model, and ends with the trade-offs you would explain in an interview. There are 78 playable lessons across 10 paths, from how one bit is stored to designing WhatsApp and Uber.
Everything is free, needs no sign-up, and can be read in English or Hinglish. Every technical word has a plain-language card.
Foundations
The vocabulary and habits behind every design: how to approach a problem, scale, availability, latency and quick estimates.
- How to approach a design interviewA repeatable template: time budget, requirements that change the design, estimation drill, a sketch that grows from a baseline, trade-offs with numbers, and the skipped question.
- Scaling: up vs out, stateless vs statefulWhy one machine hits a ceiling, why more machines are not free, stateless vs stateful servers, read-replica limits, headroom, and scaling into a wall.
- Availability and the ninesThe nines in minutes, chained dependencies, redundancy and its ceiling, failover time, a simulated lifetime, and the cascade.
- Latency, throughput and percentilesLittle's law, batching, why averages lie, latency budgets, the queueing hockey stick, merging percentiles correctly, and the slow-one-in-a-hundred fan-out.
- Back-of-envelope estimationSizing users, QPS, storage, bandwidth, cache and servers in two minutes, with worked sheets for four systems and the slips that make an estimate ten times wrong.
Memory & Storage
How a computer remembers: cache, RAM, SSD and hard disk, from the physics of one bit to why each is fast or slow.
- How memory really worksHow RAM, flash and magnets each store, read and write a bit, and what happens when you press Save.
- The memory ladderCPU cache, RAM, SSD, disk and cloud: the speed, size and price of each, and which to use when.
- Inside disks: HDD vs SSDWhy a spinning disk crawls on random reads, why flash cannot overwrite, IOPS, and hot-warm-cold tiers.
- Virtual memory and page tablesSplitting a real x86-64 virtual address, why page tables are trees, TLB reach and huge pages, what a page fault costs, the thrashing cliff, and fork() with copy-on-write doubling memory.
Caching & Databases
Making data fast: caches, Redis, indexes, what a database does on every read and write, and how to choose one.
- CachingHit ratio, eviction, write patterns, layers of caches, when to cache, and the stampede.
- IndexesThe book-index idea, binary search, B-trees, the query planner and what every index costs.
- Why reads and writes costPages, WAL and fsync, MVCC, B-tree vs LSM, Bloom filters, row vs column, and the cost of one write.
- One lookup, the whole machineFollow one indexed lookup from a page number to a disk track, RAM and the CPU cache.
- Redis: the in-memory data serverType real commands, then break it: the one-thread trap, RDB and AOF, failover, cluster slots, eviction and the hot key.
- SQL vs NoSQLThe five database families by what they are good at, embedding versus joining, scatter-gather tail latency, graph traversal cost, how many nodes you really need, and the team that ended up writing joins by hand.
- Normalization vs denormalizationUpdate, delete and insert anomalies in a wide table, the normal forms step by step, the read-versus-write cost of joins and copies, materialised-view staleness, snapshotting history, and copies that drift apart.
- Transactions, ACID and isolation levelsA real tiny transaction engine that replays dirty reads, lost updates, phantoms and write skew under four isolation levels, the grid of what each level allows, the cost of retries, and the cheap fixes for lost updates.
Scaling Data
When one database is not enough: replication, sharding, consistent hashing, IDs, object storage and search.
- Replication: leaders, followers and lagAsync vs sync writes, stale reads and read-your-writes, why lag grows, failover and lost writes, multi-leader conflicts, and split brain.
- Sharding and partitioningHow many shards, range vs hash, hot keys, scatter-gather queries, what moves when you add a shard, and rebalancing under load.
- Consistent hashingWhy mod N reshuffles everything, a real ring, virtual nodes, replicas and weights, ring vs rendezvous vs jump vs slots, and the cascade.
- Unique ID generationWhy counters break, the birthday bound, IDs and the index, a real Snowflake generator, UUID v7 and friends, and the clock that steps back.
- Object storage and blobsWhy blobs ruin a database cache, replication versus erasure coding and how many nines you get, multipart uploads, content-defined chunking and deduplication, pre-signed URLs, and the orphaned files nobody points to.
- Search and inverted indexesA real inverted index with postings lists, analyzers and stemming, BM25 versus TF-IDF ranking you can tune, sharded relevance with local statistics, near-real-time segments and merges, and the deep-paging query that sinks a cluster.
- Data lakes, warehouses and CDCWhy OLTP and OLAP want opposite layouts, full versus incremental pipelines, change data capture against polling, partitioning and the small-files problem, warehouse versus lake versus lakehouse, and change events that arrive out of order.
Networking & Traffic
How a request travels and gets managed: DNS, TCP, load balancers, proxies, API gateways, CDNs, rate limits and API styles.
- DNS, HTTP, TCP and UDPWhat happens when you hit Enter: round trips, DNS and TTL, TCP slow start, why games use UDP, HTTP/1.1 vs 2 vs 3, and the DNS outage.
- Load balancersFive algorithms measured, health checks, layer 4 vs 7, sticky sessions, who balances the balancer, and the black-hole server.
- Proxies and API gatewaysForward vs reverse proxies, the request pipeline, a real signed JWT, canary routing, aggregation and the starved connection pool.
- CDNWhy distance is the cost, edge hit ratio and shield tiers, cache keys that wreck hit ratios, purge vs versioned files, expiry stampedes, and a personal page in a shared cache.
- Rate limitingFixed window, sliding window and token bucket on the same traffic, shared limits with Redis, 429s, and the retry storm.
- REST, gRPC and GraphQLOver-fetching with measured JSON sizes, a working protobuf encoder, streaming calls, offset vs cursor paging, evolving a contract without breaking old clients, and GraphQL query explosions.
- Real-time: polling, SSE and WebSocketsFour ways to push updates compared by cost, the polling delay-vs-load curve, holding a million connections, fan-out across servers, resuming after a drop, and reconnect storms.
Queues & Streaming
Letting services talk without waiting: queues, logs, Kafka, events, and delivery guarantees.
- Message queues and workersAnswer now, work later: queue depth, visibility timeouts, idempotent handlers, dead-letter queues, ordering and the growing backlog.
- Why Kafka?Tightly coupled services, queue vs log, partitions, consumer groups, lag and hot partitions.
- Delivery semantics and idempotencyWhat a consumer crash does under at-most-once and at-least-once, idempotency keys and how long to keep them, operations that are safe to repeat, exactly-once inside a pipeline, retries that reorder messages, and the key and effect written to different stores.
- Pub/sub and event-driven designEvents instead of calls and what it does to latency and availability, fan-out and subscriber lag, the dual-write problem and the outbox, compatible event schemas, replaying the log, and events that trigger themselves.
- Batch vs stream processingHow old a batch answer is, tumbling, sliding and session windows over a real stream, event time with watermarks and late events, checkpoints and recovery, reprocessing history, and the false spike from processing-time windows.
Distributed Systems Core
What changes when many machines cooperate: CAP, consistency, consensus, failure detection, clocks, locks and transactions.
- CAP, PACELC and consistency modelsA partition simulated under CP and AP, a working linearizability checker, the latency price of consistency across regions, quorum availability, CRDT merges, and a cash-machine overdraft.
- Quorums and tunable consistencyStrict vs sloppy quorums, read repair, Merkle-tree anti-entropy, version vectors, consistency levels across regions, and how a sloppy quorum breaks fresh reads.
- Consensus: Raft and PaxosWhy a majority works, a live Raft cluster you can break (elections, replication, partitions), what consensus costs, and why it stops when the majority is gone.
- Heartbeats and failure detectionThe timeout dial measured as false alarms vs detection time, a working phi accrual detector, gray failures and deep checks, monitoring topologies, and a lease outlasted by a pause.
- Gossip protocolA rumour reaching everyone in log N rounds, push vs pull vs push-pull, SWIM failure detection, gossip averaging, why gossip scales, and a corrupted record spreading through a cluster.
- Service discoveryWhy fixed address lists rot, how long clients keep calling a dead instance under DNS, polling and watches, the deploy lifecycle, self-preservation, and reused addresses.
- Clocks, ordering and vector clocksClock drift and NTP skew, timestamps putting a reply before its request, Lamport clocks, vector clocks, hybrid logical clocks and Spanner's TrueTime commit wait, and the leap second that made a duration negative.
- Distributed locks and fencingLost updates without a lock, why every lock needs a TTL, the paused holder that wakes up stale, fencing tokens, Redis versus consensus-backed locks, and the job that outlives its lock.
- Checksums, hashing and data integrityBit rot at scale, real CRC-32 and SHA-256 you can poke, birthday collisions, Merkle trees that find three bad blocks in millions, scrubbing, and why per-hop checks still deliver corrupted files.
- Bloom filters and probabilistic structuresRemembering a billion keys in a few hundred megabytes, how Bloom filters really work, skipping disk reads in LSM trees, Count-Min sketches for heavy hitters, HyperLogLog for distinct counts, and why you cannot delete from a Bloom filter.
- Distributed transactions: 2PC and sagasHalf-done work across services, two-phase commit and its latency, the in-doubt blocking problem, sagas with compensations, the availability cost of atomicity, and an undo that runs twice.
Reliability & Operations
Staying up when things break: timeouts, retries, circuit breakers, observability, SLOs, deployments, disaster recovery and security.
- Timeouts, retries, backoff and jitterChoosing a timeout, how retries multiply across layers, a thundering herd with and without jitter, retry budgets, hedged requests, and the short outage that never ends.
- Circuit breakers and bulkheadsHow one slow dependency eats every thread, bulkheads that contain it, circuit breakers that stop calling a failing service, tuning them against noise, load shedding by priority, and the breaker that counted the wrong errors.
- Observability: logs, metrics and tracesThe three signals, why logs get expensive, why percentiles cannot be averaged, reading a trace waterfall and its critical path, head versus tail sampling, alerts that do not cry wolf, and the label that exploded a metrics system.
- SLIs, SLOs and error budgetsDefining a good request, turning a 99.9% target into a 43-minute budget, burn-rate alerts that page on pace, how many nines you can afford, spending the budget on releases, and the dashboard that stayed green while users were locked out.
- Deployments: canary, blue-green and flagsFive rollout strategies against the same bad release, whether a canary can really see a regression, mixed-version schema changes, feature flags and kill switches, automated rollback, and the migration you cannot undo.
- Autoscaling and capacityWhat a fixed fleet costs, the target-tracking loop and its delays, why spikes beat reactive scaling, flapping and cooldowns, capacity planning with lead times, and the autoscaler that makes the database worse.
- Multi-region, failover and disaster recoveryRPO and RTO for the four disaster-recovery strategies, the speed-of-light cost of distance, DNS versus anycast failover, active-active write conflicts, why untested plans fail, and the survivor region that is too small.
- Chaos engineeringSteady state and hypothesis, the faults worth injecting and what each reveals, ramping the blast radius, how many experiments find a rare bug, fixing what you find, and the experiment nobody turned off.
- Security basics: authN, authZ, TLS, JWT, OAuthWhy passwords need a salt and a slow hash, credential stuffing and MFA, sessions versus JWTs, what PKCE and state stop in OAuth, broken access control, and the certificate that expired at midnight.
Architecture Patterns
The big shapes a system can take: client-server, microservices, serverless, event-driven, peer-to-peer, CQRS and service mesh.
- Client-server and the monolithWhy one program and one database is the right start, what a growing team does to a shared codebase, scaling by cloning until the database says stop, release trains, build time, when to split, and the rewrite that never catches up.
- MicroservicesWhat a chain of services does to latency and availability, composing a page from many services, the distributed monolith, the per-service operations bill, chatty boundaries, and the shared database that undoes it all.
- ServerlessCold starts and how often they happen, per-use pricing against an always-on instance, concurrency limits and the database behind them, the 15-minute ceiling, which workloads fit, and the function that triggers itself.
- Event-driven architectureWhat an event should carry, choreography versus orchestration, why users see stale reads, hot partitions from skewed keys, tracing an event through the system, and the poison event that stalls a partition.
- Peer-to-peer systemsWhy every downloader adds capacity, how a BitTorrent swarm survives its seed leaving, how a DHT finds data in log N hops, replication versus erasure coding under churn, tit-for-tat incentives, and the Sybil attack.
- CQRS and event sourcingSeparate write and read models, state as a fold over an append-only log, rebuilding projections, optimistic concurrency conflicts, idempotent projections and the danger of replaying side effects.
- Service meshWhat a sidecar adds to every call, mutual TLS and certificate lifetimes, why retries at every layer multiply, canary weights and how long they take to tell you, the metric-series bill, and a bad config reaching every proxy.
Design Interviews
Put it all together: the classic full designs, step by step, with the trade-offs an interviewer probes.
- Design a URL shortenerSizing the system, base-62 keys and collisions, an LRU cache under Zipf traffic, 301 versus 302, a Bloom filter in front of the blocklist, and a scanner walking the keyspace.
- Design a rate limiterSizing a limiter service, check-then-set races, local counters versus a central store, retry herds and Retry-After, cost-weighted limits, and what to do when the limiter itself fails.
- Design a chat app like WhatsAppMillions of long-lived connections, acknowledgements and duplicate-proof delivery, ordering when clocks disagree, group fan-out and encryption cost, presence traffic, and a reconnect storm.
- Design a social feed like InstagramReads versus posts and the precomputed timeline, fan-out on write versus read versus hybrid, a ranking latency budget, the photo pipeline, cursor versus offset paging, and a post from an account with 100 million followers.
- Design video streaming like YouTubeIngest versus delivery sizing, parallel chunked transcoding, adaptive-bitrate playback, resumable uploads, tiered CDN caches, and the premiere stampede.
- Design e-commerce like AmazonBrowse versus buy paths, overselling races, cart holds and Little's law, checkout as a saga, stale prices in caches, and the flash-sale hot row.
- Design ride sharing like UberThe location firehose, grid indexes for nearby search, sharding by region versus by cell hash, batched matching, surge pricing as a clearing price, and ghost drivers.
- Design file storage like Google DriveSplitting content from metadata, syncing only changed blocks, deduplication, offline edit conflicts, polling versus push, and the cost of sharing a huge folder.
- Design a web crawlerFetch-rate sizing, a host-aware frontier and politeness, remembering seen URLs with Bloom filters, crawler traps, recrawl freshness, and a crawler that takes a small site down.
- Design a notification systemChannel sizing, priority queues, retries with provider failover and duplicates, batching into digests, local-time scheduling, and a campaign job that restarts mid-run.
- Design logging and monitoringLog and metric volumes, a durable buffer for incident bursts, storage tiers and retention cost, metric rollups, alert thresholds against noise, and logging that takes the application down.
- Design typeahead and search suggestionsKeystroke-driven load, a real trie with precomputed top-k, trending freshness, client debouncing, typo tolerance cost and manipulating suggestions.
- Design a payment systemThe shape and volume of payments, double-entry ledger integrity, idempotent retries, reconciliation against the bank, out-of-order webhooks, and a crash between charging and recording.
- Design a distributed key-value storePartitioning with a hash ring and virtual nodes, tunable quorums and their latency, sloppy quorums, Merkle-tree repair, LSM write and read amplification, and a node returning after a long outage.
- Design a ticket booking systemDemand far above supply, holding seats during payment, bots and per-account caps, broadcasting a seat map, hot sections, and payments that land after a hold expires.
Related guides
Common questions
What is system design?
System design is deciding how the parts of a large software system fit together: where data lives, how requests travel, what happens when a server fails, and how the system grows from a thousand users to a hundred million. It is also the name of the interview round where you are asked to design something like a chat app or a URL shortener.
Is Designs4Systems free?
Yes. All lessons, simulators and the glossary are free and need no sign-up. If you want your progress saved across devices you can sign in, but it is optional.
How is this different from reading a system design book?
Each lesson has simulators you can drag, break and re-run: kill a server, flood a queue, change a cache size, and see the result. Seeing a trade-off happen makes it much easier to remember and to explain in an interview.
Where should a beginner start?
Start with the Foundations path (how to approach a design problem, scale, availability, latency and quick estimates), then move to storage, caching and databases. The paths below are in the order we recommend.
Can I read it in Hindi?
Yes. Switch to Hinglish at the top of any page. It is Hindi grammar written in English letters with simple English technical words.