Skip to content
Knowledge Hub

Playground: learn by making decisions Basic

Reading about race conditions is very different from picking the wrong option yourself and watching 40 orders oversell your stock. Each page here is a small scenario: you make a decision, and the system reacts immediately.

Loading diagram…

Scale Lab is a system design game on a canvas: drag servers, load balancers, caches, CDNs and queues onto the board, wire them up, press Run and watch traffic flow through your design. Load grows every round, and some rounds bring incidents (a server dies…).

When the design breaks, the failed box is circled in red with an explanation. There are 8 Learn rounds, 4 multi-round interview problems (URL shortener, Notifications, Concert ticketing, Realtime chat), and a Sandbox where you set traffic, bots and incidents yourself.

Four game types: Scenario (choose how to respond over several steps), Design (drag and drop an architecture), Ordering (put steps in the right order) and Matching (solution ↔ problem).

Game Type You practice Time
Flash sale oversells stock Scenario Lost update, holding a lock while calling payment, retries creating duplicate orders ~5 min
Query slowly gets slower Scenario pg_stat_statements, reading EXPLAIN, composite index, keyset pagination ~6 min
Migration locks the whole table Scenario Lock queue, lock_timeout, which DDL rewrites the table, NOT VALID ~6 min
Tenant data leak Scenario Missing tenant_id filter, RLS bypassed by the table owner / BYPASSRLS, session SET leaking on pooled connections ~7 min
Choose a lock/isolation level Matching Atomic UPDATE, FOR UPDATE, SKIP LOCKED, SERIALIZABLE, advisory lock… ~6 min
Choose an index type Matching B-tree, composite, partial, expression, covering, GIN, BRIN ~6 min
Create an index online Ordering CREATE INDEX CONCURRENTLY, INVALID index, confirming the plan ~3 min
Rename a column with zero downtime Ordering Expand–contract during a rolling deploy ~3 min
Game Type You practice Time
Build a URL shortener Design CDN, cache, replica, capacity within budget ~5–10 min
Asynchronous checkout Design Outbox, broker, idempotency, retry/DLQ, the dual write and 2PC traps ~10 min
Image & video upload Design Presigned URL, multipart, object storage, transcode worker, CDN signed cookie ~10 min
Celebrity post Scenario Fan-out on write vs read, write amplification, the hybrid threshold for large accounts ~6 min
Saga compensation Ordering A payment fails mid-saga: persist state, stop forward steps, compensate in reverse, notify ~3 min
Payment timeout Scenario Unknown outcome after a gateway timeout, same idempotency key, late webhook, reconciliation and correcting ledger entries ~7 min
Pick the HTTP status code Matching 400 vs 422, 401 vs 403 vs 404, 409, 412, 429, 503, 202 per RFC 9110 ~5 min
Pick the Cache-Control Matching no-store vs no-cache, private, s-maxage, immutable, stale-while-revalidate per RFC 9111 ~5 min
Choose a design pattern Matching Strategy, Adapter, Decorator, Observer, Factory, Facade ~5 min
Game Type You practice Time
Kafka consumer lag keeps growing Scenario Hot partition, rebalance storm, poison message, scaling partitions ~6 min
Schema compatibility Matching Avro/Protobuf changes: backward, forward, full or breaking, and which side deploys first ~5 min
Cache stampede Scenario Hot key expiry, singleflight, invalidation race, negative cache ~6 min
Game Type You practice Time
The 3 a.m. incident Scenario Mitigate first, communicate, evidence-based root cause, postmortem ~6 min
Retry storm Scenario Retries multiplying load across tiers, backoff + jitter, retry budget, deadline ~6 min
Node.js memory leak Scenario OOMKilled, safe heap snapshots, unbounded Map, --max-old-space-size ~6 min
CPU throttling Scenario p99 spikes at 40% CPU: CFS quota, throttled periods, threadpool bursts, limits vs requests ~6 min
Cascading probe restarts Scenario Liveness calling the database, CrashLoopBackOff, designing probes correctly ~5 min
Incident response order Ordering The steps from receiving the page to the postmortem ~3 min
Graceful shutdown Ordering Pod termination: preStop, SIGTERM, drain, SIGKILL ~3 min
Canary & feature flags Ordering Ship dark, SLO-based stop criteria, cohort ramp-up, flag removal ~3 min
Game Type You practice Time
Leaked JWT Scenario Token revocation, blast radius, weak secret, redesign ~6 min
OAuth PKCE flow Ordering Authorization Code + PKCE, state/nonce, token exchange, API-side checks ~4 min
API leaks data Scenario BOLA/IDOR, mass assignment, blast radius from access logs, data-layer authz ~6 min
Log, metric or trace? Matching Picking the right signal, SLO burn-rate alerts, the cardinality trap ~5 min
  • Drag and drop with a mouse or finger. If dragging is awkward, tap to select, then tap where you want to place it. Keyboard: Enter to select and place.
  • Metric colors: green means passing, orange means near the threshold, red means broken. The bold mark on a bar is the target.
  • Progress is saved in your browser. No account needed, nothing is sent anywhere.

The numbers in the games come from a simplified model meant to show trends, not benchmarks. Every game links to an article with real measurements and official sources.