sd-prep
System-design interview prep. Main version per topic: Hello Interview flow with ADHD-board rules.
Checking the offline copy...
Timed practice
Full 45-minute attempt
The whole question on one canvas, 45 minutes on the clock.
Practice one step
One part of one topic with the rest given, 5 to 15 minutes.
Blank canvas
Draw anything, with an optional timer. Not graded, kept in this browser.
The questions (17)
3Wallet transfers + analytics
open the main page6Ticketmaster (event ticketing)
open the main pagecovers:
seat holds with hold_id fencing, the deliberate two-transaction gap, on-sale waiting room,
seat-map staleness, outbox and compensation
7Facebook Messenger
open the main pagecovers:
the connection fleet vs the service fleet, the session registry, the per-conversation seq,
idempotent sends, multi-device sync, group fan-out, delivery cursors and presence
8User tracking events (top K by type)
open the main pagecovers:
1,000 types means exact counts not a sketch, one row per bucket, local-global aggregation for the
hot event type, aligned bucket decomposition, late events, GDPR by crypto-shredding
9Fraud prevention on a trading platform
open the main pagecovers:
three tiers by latency, the reversibility asymmetry (orders fail open, egress fails closed),
the 10 ms budget, settlement clock and beneficiary cool-off, entity resolution for rings,
false positives and the analyst loop
10End-to-end CI/CD for client updates
open the main pagecovers:
build once and promote, canary waves and draining a stateful fleet, 4 PB of patch egress,
download early and activate late, version skew and expand-migrate-contract,
flags as the client's rollback
11Dating app geolocation (Tinder / Bumble)
open the main pagecovers:
fifteen-minute staleness as the budget that buys everything, cells not radii and the
neighbour boundary bug, density from Manhattan to Montana, target a count not a distance,
the cached deck so swipes cost nothing, and trilateration
12UGC asset delivery (avatars and skins)
open the main pagecovers:
refusing the delivery-versus-invalidation trade by naming bytes with their own hash,
a 400 byte manifest in front of an immutable store, the 50M item cold tail and the
regional shield, the hot drop, takedown as refusal not purge, and avatar composition
13Real-time multiplayer (Roblox)
open the main pagecovers:
server as the only truth for anything scored or spent and inputs as the only thing a
client sends for those, matchmaking as placement, the 60 Hz simulate / 20 Hz replicate
loop with prediction and reconciliation, the O(N²) bandwidth math and interest
management, regions and an edge that terminates but does not simulate, crash to
checkpoint to RESUME in ten seconds, cheating versus latency
14Uber (ride-sharing)
open the main pagecovers:
fare, request, match and offer as one multi-step process, 2M location writes a second into
an in-memory geo index with a stale-driver sweeper and an available-drivers filter, one offer
per driver through a lock with a TTL and an exact conditional accept, a regional queue
committed on a durable handoff, durable execution for drivers who never answer, and
sharding by geo cell
15Facebook News Feed
open the main pagecovers:
fan-out on read versus fan-out on write, each feed a Redis sorted set of about 200 post ids
updated by one add-and-trim script, chunked feed workers fed by the post table's change stream,
hybrid feeds that flag huge accounts and merge their RecentPosts at read time, one id cursor
across the merge, and a replicated post cache that spreads a viral post's reads across every copy
16Web Crawler
open the main pagecovers:
a crawler as a data pipeline, fetch and parse stages joined by queues so a failure retries
alone, retries with backoff and an attempts count, robots.txt and a per-domain scheduler for
one request per crawl delay, the bandwidth math for 10B pages in 5 days, DNS, URL and content
dedup, and crawler traps
17Typeahead (search autocomplete)
open the main pagecovers:
ranking ahead of time so a keystroke reads a finished list, a radix tree with a top 10 at
every node in each host's memory, an index built offline into a versioned snapshot that hosts
swap with one pointer after checks and a canary, a trending delta from a 15-minute sliding
window and a blocklist, both applied at request time, a 30-second cache lifetime derived from
the block target, and shards by prefix range where every lookup hits one shard
Drill and reference
Flashcards
drill all seventeen topics →289 cards, generated from the seventeen topic pages above. Drill one topic, or one kind of section across all seventeen (every set of functional requirements, every API, every deep dive).
Kafka for system design
open the reference open the sizing guidecovers:
one topic and five views of it, the execution model, the core objects, keys and ordering
and partitioning, delivery semantics, the patterns interviewers listen for,
cluster and operations, the configuration cheat sheet
sizing guide:
a worked example from traffic to broker count, storage, consumer parallelism and partition
placement, with an MSK Express switch for Express sizing and monthly costs, and adding
brokers to a running cluster
Cassandra for system design
open the guidecovers:
Messenger at 1M writes per second: the node-count and storage math, provisioning and seeds,
bootstrap and cleanup, keyspace then table, primary-key syntax and bucketed partitions,
nodes and tokens and replicas, token-aware clients and LOCAL_QUORUM, the write and read
paths, and which lever fits which bottleneck
DynamoDB for system design
open the guidecovers:
the same Messenger at 1M writes per second, sized in capacity units instead of nodes:
write and read units, provisioned versus on-demand, quotas and warm throughput, partition
and sort keys, hot keys and write sharding, indexes and batches, retained history, and the
scaling levers
Geo services for system design
open the guidecovers:
what "nearby" means for dispatch, discovery, local search and delivery, geohash, H3, S2,
quadtrees and database spatial indexes, cell covers and edge correctness, PostGIS and Redis
GEO, the write and read paths for moving objects, distance versus ETA, hot cells and
regions, the napkin math with a calculator, geofences, failures and location privacy
Redis for system design
open the referencecovers:
one key and six value shapes, the single-threaded execution model, the commands worth
knowing per structure, expiry and eviction, the atomicity toolbox (MULTI, Lua, WATCH),
the patterns interviewers listen for, replication and persistence and cluster,
the complexity cheat sheet
SQL locking cheat sheet
open the cheat sheetcovers:
FOR UPDATE / FOR SHARE / SKIP LOCKED / NOWAIT, the conflict matrix, deadlock ordering,
advisory locks, DDL locks, isolation levels, MySQL gap locks