Playground
Each lab runs a real mechanism from a seeded simulator. Change a parameter and the system reacts. The same seed always gives the same run.
p99 latency · 8 servers · 4 strategies Lab 01
Load balancing
Send random arrivals to servers that run at different speeds, and watch queues, tail latency and throughput react to the strategy you pick.
Open the labhit rate · 50-key cache · skewed requests Lab 02
Cache eviction
Zipf-distributed requests hit a fixed-size cache. Compare FIFO, LRU, LFU and a TinyLFU-style admission policy, then move the hot keys mid-run to see which policies adapt.
Open the labhash ring · 5 nodes · arc colour = owner Lab 03
Consistent hashing
Place nodes and virtual nodes on a hash ring, add and remove nodes, and compare how many keys move against the naive hash mod N rule.
Open the labwrite latency by replication mode Lab 04
Replication and lag
A leader streams writes to followers over a network that is slow and uneven. Pick when the leader acknowledges, watch lag, write latency and stale reads, then kill the leader.
Open the labstale reads · 5 replicas · four R and W settings Lab 05
Quorums
Write to W of N replicas, read from R of them. Tune R and W, break nodes, slow some down, and see staleness, latency and availability trade against each other.
Open the labrequest share per partition · range · skewed Lab 06
Partitioning keys
Spread keys over partitions by key range or by hash, under uniform, skewed and sequential traffic. See hot partitions, the cost of a range scan, and what splitting a hot range does.
Open the labwait in seconds · overloaded queue · by capacity Lab 07
Queue buffer
Bursty producers feed a bounded queue drained by a few consumers. Watch depth, wait time, drops and Little's law while you change the load, the buffer and what happens when it fills.
Open the lablost or repeated per 100 messages · 15% crashes Lab 08
Delivery guarantees
Consumers that crash around the acknowledgement. Compare acking before the work, acking after it, and adding an idempotency key, then count lost messages and duplicate side effects.
Open the lablag per partition · one hot key Lab 09
Partitioned log
A keyed topic split into partitions and read by a consumer group. Watch ordering, lag, idle consumers, a hot key, a rebalance pause and a replay from the start.
Open the labmost admitted in any 20 ticks · limit 20 Lab 10
Rate limiter algorithms
Send the same traffic through a fixed window, a sliding log, a sliding counter, a token bucket and a leaky bucket, and compare what each admits, rejects and remembers.
Open the labgoodput · 1.5x capacity · 4 policies Lab 11
Load shedding
Push more traffic at a server than it can serve, and compare an unbounded queue with a bounded queue, deadline-aware drop and adaptive LIFO by the work that finishes in time.
Open the labrequests that succeed after the incident ends Lab 12
Retries and circuit breakers
Degrade a dependency at a chosen moment and watch six client policies react. Compare how many attempts each sends, how much load the dependency sees and whether it ever recovers.
Open the labfalse alarms by timeout · pauses up to 1 s Lab 13
Failure detection
One node sends heartbeats over a jittery network and sometimes pauses. A fixed timeout and a phi accrual detector watch it. See how fast each notices a real crash, and how often each cries wolf.
Open the labraft · 5 nodes · one leader per term Lab 14
Raft consensus
A cluster of three to seven nodes elects a leader and replicates a log. Crash nodes, cut the network, submit writes, and watch terms, votes and commit indexes keep the log consistent.
Open the labcorrupting writes · 60 s · stalled clients Lab 15
Locks, leases and fencing
Clients take a lease-based lock and write to storage. One stalls past its lease and writes anyway. Compare storage that trusts the lock with storage that checks a fencing token.
Open the lablatency in ms · mean against percentiles Lab 16
Latency percentiles
A stream of requests with a small slow share. Read the mean, median, p95, p99 and p99.9, average percentiles across hosts, bucket them coarsely, and measure them with a load generator that waits.
Open the labrequests hit by a slow call · 1% of calls slow Lab 17
Distributed tracing
A request fans out across services with sequential and parallel calls. Read the span waterfall and its critical path, measure the tail at scale against the formula, and compare head and tail sampling.
Open the laberror budget left over 30 days Lab 18
SLOs and burn-rate alerts
A 99.9 percent SLO over 30 days, simulated minute by minute, with a short outage, a slow burn and noise. Compare a threshold alert, a single-window burn-rate alert and a multi-window multi-burn-rate alert.
Open the labbytes written per byte of record Lab 19
B-tree page writes
Insert keys into a B-tree and count the pages it splits, the pages it must write and the bytes written for each byte of record, with the write-ahead log on and off.
Open the labwrite and space amplification by policy Lab 20
LSM compaction
Write to an in-memory table that flushes to sorted files, and compact those files either by levels or by tiers. Read write, read and space amplification as the files merge.
Open the labfalse positives by bits per key Lab 21
Bloom filters and indexes
Fill a Bloom filter and measure its false positive rate against the formula, then add secondary indexes to a table and count what they do to the cost of a write.
Open the labtransactions turned away by held locks Lab 22
Two-phase commit
Run transactions across several participants, crash the coordinator after the votes, and watch the locks it leaves behind. Compare waiting, asking the other participants, and aborting on a timeout.
Open the labsaga outcomes and dirty reads Lab 23
Saga compensation
Run a chain of steps with an undo for each. Make steps and undos fail, switch between orchestration and choreography, and watch readers see work that is later taken back.
Open the labwrong outcomes per order Lab 24
Idempotency keys and the outbox
Take orders from clients that retry, and publish an event for each one. Compare a dual write with a transactional outbox, idempotency keys with different lifetimes, and a consumer that does or does not drop repeats.
Open the labedge hit ratio Lab 25
CDN edge cache
Send skewed traffic through edge caches in front of an origin. Change the TTL, the cache key, the number of edges and a shield, and watch hit ratio, origin load and stale responses move.
Open the labseconds of errors after a failure Lab 26
DNS failover and TTLs
Fail one endpoint on a schedule and let DNS move clients to the other. See how the TTL and resolvers that ignore it set how long users keep hitting the dead one, and how weighted answers split traffic.
Open the lab99th percentile latency, one connection Lab 27
Connection pools and head-of-line blocking
Send requests over a pool of connections. Compare handshakes on every request with reuse, a pool that is too small, HTTP/1.1 with HTTP/2, and what packet loss does to streams that share one TCP connection and to QUIC.
Open the labshare of draws that collide Lab 28
Short ID collisions
Create short links with random codes or a counter, and send skewed clicks through a cache. Change the code length, the cache size and the redirect status, and watch collisions, hit ratio and what the server can count.
Open the lab99th percentile write lag in ticks Lab 29
Feed fan-out
Build feeds for 1,000 users by pushing posts, pulling at read time, or both. Raise the follower skew and watch the write cost, the write backlog and the read latency move.
Open the labmessages shown out of order Lab 30
Chat delivery
Send messages to 30 users through four gateways with packet loss, gateway crashes and users who go offline. Compare showing messages on arrival with holding them for order, and duplicate checks on and off.
Open the lab
Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms