Learn system design: 40 free interactive lessons
Short lessons where every idea is an animated diagram you step through: load balancing, caching, sharding, consensus, queues and whole-system designs, from one server to millions of users.
Do it in the browser: a real system design tool, a short mission and instant feedback. No install. Optional certificate at the end of the course.
Open the courseLessons
- How a request travelsFollow one page load hop by hop and see where the milliseconds go.
- Latency and throughputTwo different meanings of “fast”, and why a busy system gets slow.
- Back-of-the-envelope mathEstimate traffic, storage and servers in two minutes, before you design anything.
- Vertical or horizontalBuy a bigger machine or add more machines? Each path has a ceiling.
- Load balancingOne front door for many servers, and the rules for who gets each request.
- Stateless servicesWhy servers should forget you between requests, and where your session goes instead.
- CachingKeep hot answers close and cheap, and decide when they go stale.
- Content deliveryCopy your files to servers near your users, so distance stops hurting.
- SQL vs. NoSQLTables with joins or documents by key? Pick by access pattern, not by fashion.
- IndexesTurn a full scan of millions of rows into a handful of page reads.
- Storage enginesB-trees update in place; LSM trees append and merge. Each favors a different workload.
- ReplicationKeep copies of the data on several machines, for safety and for more reads.
- ShardingWhen one machine cannot hold the writes or the data, split them across many.
- Consistent hashingAdd or remove a node and move only a small slice of keys.
- Unique IDs at scaleGenerate millions of unique, sortable IDs per second without a central counter.
- CAP and consistencyWhen the network splits, choose: refuse requests or risk stale answers.
- Consensus and leadersHow a group of machines agrees on one leader and one order of events — even when some fail.
- Transactions and isolationAll-or-nothing changes, and what concurrent transactions are allowed to see.
- Files and mediaKeep big binary files out of the database: object storage, direct uploads and processing pipelines.
- REST, RPC and GraphQLThree styles for services to talk, and when each one fits.
- Message queuesHand slow work to a queue: absorb spikes, survive failures, reply to users faster.
- Pub/Sub and eventsAnnounce what happened once; let any number of services react on their own.
- Real-time updatesPolling, long polling, server-sent events and WebSockets: pushing data the moment it changes.
- Redundancy and failoverAssume every part will fail. Have a spare ready and a way to switch to it.
- Rate limitingCap how fast any one client can call you, so one misbehaving caller cannot sink everyone.
- Timeouts and retriesNever wait forever, retry with care, and stop calling what is already broken.
- ObservabilityMetrics tell you something is wrong, traces tell you where, logs tell you why.
- Monolith vs. microservicesOne deployable or many? Split along team and data boundaries, and only when it pays.
- Service discoveryInstances come and go every minute. How does one service find a healthy copy of another?
- Sagas and distributed transactionsNo single transaction spans services. Chain local steps and undo them when something fails.
- Batch and stream processingCrunch big data once a night, or continuously as events arrive — or both.
- AuthenticationProve who is calling: passwords done right, sessions vs tokens, and delegating login.
- AuthorizationWho may do what to which resource — checked on the server, every time.
- Encryption and secretsProtect data on the wire and on disk, and keep keys and passwords out of your code.
- TestingA pyramid of fast, focused tests — plus contract and load tests for distributed systems.
- CI/CD and deploysShip small changes many times a day, safely: pipelines, rolling and canary releases, feature flags.
- HLD and LLDA repeatable way to design: requirements, estimates, high-level boxes, then the details that matter.
- Design a URL shortenerBillions of redirects, short unique codes, and almost no writes.
- Design a news feedShow each user the latest posts from everyone they follow, in milliseconds.
- Design a chat systemMillions of open connections and one promise: every message arrives, in order, exactly once on screen.