Labs
Learn by poking at it
Small simulations that run in your browser. Change a setting, watch what breaks, and carry the intuition into the interview.
From one user to millions
Follow one product as it grows, nine stages at a time, and see which problem each building block solves.
4 min readLab 02Capacity estimator
Turn users and request sizes into QPS, storage, bandwidth and server counts.
2 min readLab 03Consistent hashing
Add and remove nodes on a hash ring and see how few keys have to move.
2 min readLab 04Cache eviction
Replay the same traffic through LRU, LFU, FIFO and random eviction.
3 min readLab 05Load balancing
Compare round robin, least connections, hashing and weighted routing under load.
3 min readLab 06The load curve
See why response time explodes near full utilisation, and how adding servers moves you back.
3 min readLab 07Replication
Write to a primary, read from replicas, then crash the primary and count what is lost.
3 min readLab 08Sharding strategies
Split 600 users across shards by range, hash or lookup table and see which one tips over.
2 min readLab 09Unique ID generation
Make IDs with a counter, ticket servers, UUIDs and Snowflake, then break the clock, the database and the configuration.
8 min readLab 10Queues and back pressure
Make a producer faster than its consumers and watch the queue fill, drop, or push back.
2 min readLab 11Rate limiting
Send the same requests through a fixed window, a sliding log, a sliding counter, a token bucket and a leaky bucket.
5 min readLab 12Idempotency and retries
Fail a payment at every point and see when a retry charges twice, then watch 1,000 clients retry after an outage.
7 min readLab 13DNS lookup
Walk a lookup from browser to authoritative server and see how caches skip the walk.
3 min readLab 14CDN edge caching
Request a file from three continents with no CDN, a pull CDN and a push CDN.
3 min readLab 15TCP vs UDP
Send the same packets over a lossy link and compare what arrives, and when.
3 min readLab 16Quorum reads and writes
Choose N, W and R and see when a read is guaranteed to see the latest write, and how many failures each survives.
2 min readLab 17CAP in practice
Partition a three-node store and watch it choose between consistency and availability.
1 min read