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.

Lab 01

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 read
Lab 02

Capacity estimator

Turn users and request sizes into QPS, storage, bandwidth and server counts.

2 min read
Lab 03

Consistent hashing

Add and remove nodes on a hash ring and see how few keys have to move.

2 min read
Lab 04

Cache eviction

Replay the same traffic through LRU, LFU, FIFO and random eviction.

3 min read
Lab 05

Load balancing

Compare round robin, least connections, hashing and weighted routing under load.

3 min read
Lab 06

The load curve

See why response time explodes near full utilisation, and how adding servers moves you back.

3 min read
Lab 07

Replication

Write to a primary, read from replicas, then crash the primary and count what is lost.

3 min read
Lab 08

Sharding strategies

Split 600 users across shards by range, hash or lookup table and see which one tips over.

2 min read
Lab 09

Unique ID generation

Make IDs with a counter, ticket servers, UUIDs and Snowflake, then break the clock, the database and the configuration.

8 min read
Lab 10

Queues and back pressure

Make a producer faster than its consumers and watch the queue fill, drop, or push back.

2 min read
Lab 11

Rate limiting

Send the same requests through a fixed window, a sliding log, a sliding counter, a token bucket and a leaky bucket.

5 min read
Lab 12

Idempotency 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 read
Lab 13

DNS lookup

Walk a lookup from browser to authoritative server and see how caches skip the walk.

3 min read
Lab 14

CDN edge caching

Request a file from three continents with no CDN, a pull CDN and a push CDN.

3 min read
Lab 15

TCP vs UDP

Send the same packets over a lossy link and compare what arrives, and when.

3 min read
Lab 16

Quorum 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 read
Lab 17

CAP in practice

Partition a three-node store and watch it choose between consistency and availability.

1 min read
Esc
↑ ↓ to move↵ to open