System Design Situations Vault
The complete catalog of 45 senior and staff-level system design situations across all distributed systems primitives. Address the 7-axis rubric (Requirements, Scale, Data Flow, Storage, Bottlenecks, Failure Modes, Trade-offs), defend against two rigorous reviewer objections, and compare with the Teacher Gold Answer at any time.
The Removed User Who Kept Access for an Hour
Target Primitive: 04-distributed-cache-patterns-and-eviction • STAFF Level
Total Situations
45
All 30 Core Primitives
Defended
0
Both Objections Survived
In Progress
0
Revision Required
Unattempted
45
Ready for Defense
The Product Page That Melted Redis
Objection 1: If the cache node just restarted and is empty, won't the first wave of requests all miss at once and hit Postgres together?
One Customer, One Shard, One Outage
Objection 1: Your biggest tenant is about to 10x their headcount and move onto the platform. What actually happens to their shard the day that migration lands?
The Warehouse System That Fell a Day Behind
Objection 1: What happens to an order event if the warehouse-allocation consumer throws an exception halfway through processing it?
The Partner Whose Retry Loop Took Down Everyone Else
Objection 1: Your rate limiter runs as local counters on each of the 12 API gateway instances behind the load balancer. Does a single partner's quota actually hold at 1,000 req/min, or could they get more than that?
The Booking That Existed in Frankfurt but Not in Virginia
Objection 1: A customer in Frankfurt books the last seat, then their connecting flight's confirmation page loads against the Virginia region two seconds later and shows the seat as available. What went wrong, concretely?
The Image Service That Made Every Origin Server Sweat
Objection 1: A photographer uploads a new cover photo to replace a bad one. How long before viewers around the world actually stop seeing the old cached image?
The Ring Rebalance That Crushed Node 07
Objection 1: When you add 4 new physical storage nodes to the consistent hashing ring, why won't each existing node shed exactly 25% of its keys without virtual nodes?
The Web Crawler That Forgot Its History
Objection 1: What happens when your Bloom filter fills past its designed capacity and the false positive rate climbs to 15%?
The GC Pause That Corrupted Shared Storage
Objection 1: Client 1 acquires a 10-second distributed lock in Redis, hits a 15-second Stop-The-World JVM pause, and then executes its write. Why doesn't an expiring TTL lock protect storage from corruption?
The Time-Series Database That Froze on Flush
Objection 1: Why do writes stall completely when background LSM compaction falls behind the incoming write rate?
The Network Partition That Elected Two Leaders
Objection 1: If a network partition isolates 2 nodes from 3 nodes in a 5-node Raft cluster, can the minority partition commit any client write?
The Flight Booking That Charged Without a Seat
Objection 1: If the hotel reservation succeeds, the payment is charged, but the flight service fails and the compensating refund fails halfway through, what prevents money from being permanently lost?
The Ride-Hailing Hotspot on New Year's Eve
Objection 1: Why does a fixed-precision Geohash (e.g. 6-character precision) fail when driver density varies by 1,000x between rural highways and downtown Times Square?
The Dual-Write That Broke Search Consistency
Objection 1: What happens in a dual-write architecture when the primary database commit succeeds but the network call to publish to Kafka drops or times out?
The Search Bar That Stalled on Every Keystroke
Objection 1: Why does traversing a raw prefix Trie to find top-10 trending queries on every keystroke degrade when the trie holds 50 million search phrases?
The NTP Sync That Generated Duplicate Order IDs
Objection 1: What happens in a Twitter Snowflake ID generator if the physical server's system clock jumps backward by 250 milliseconds during an NTP synchronization event?
The GC Pause That Declared the Cluster Dead
Objection 1: Why does a binary heartbeat threshold (e.g. mark dead after 3 missing pings) cause catastrophic flapping in large-scale distributed clusters?
The Semantic Search That Exhausted All GPU RAM
Objection 1: Why does an in-memory HNSW (Hierarchical Navigable Small World) vector index consume 4x more RAM than the raw 1536-dimension floating-point vectors themselves?
The Gateway Restart That DDOSed the Chat Fleet
Objection 1: When 1.5 million WebSocket clients disconnect simultaneously during an edge gateway rollout, why does immediate reconnection crush backend authentication and Redis Pub/Sub?
The Single Multiplexed TCP Pipe That Stalled 500 RPCs
Objection 1: Why does a single dropped TCP packet on an HTTP/2 connection cause head-of-line blocking across all 500 multiplexed gRPC streams simultaneously?
The Compromised Admin Token That Wouldn't Die
Objection 1: If stateless JWTs are validated cryptographically without a database lookup, how do you revoke an active token immediately when an employee is terminated?
The On-Call Doctor Anomaly (Write Skew under Snapshot Isolation)
Objection 1: Why does Snapshot Isolation (or Repeatable Read in PostgreSQL) fail to prevent Write Skew when two concurrent transactions check a global invariant and update different rows?
The Slow Recommendation Service That Took Down Checkout
Objection 1: Why does an upstream gateway run out of worker threads when a non-critical downstream microservice slows down from 30ms to 5,000ms latency?
The Banking Ledger That Took 3 Days to Replay
Objection 1: Why does an event-sourced architecture struggle with point-in-time state queries (e.g. 'What was account balance on June 1st?') when an entity has accumulated 2 million historical events?
The Credential Stuffing Wave That Bypassed IP Rate Limits
Objection 1: Why do standard per-IP rate limiters fail completely against a residential proxy botnet rotating across 500,000 distinct residential IP addresses?
The Headless Scraper That Filled the Database with Garbage
Objection 1: Why do visual honeypot fields (e.g. `display: none` inputs) fail when sophisticated bots use headless Chrome with accessibility tree inspection?
The 100,000 Free Trials That Vanished Overnight
Objection 1: Why does a static hardcoded blocklist of disposable email domains (e.g. `mailinator.com`, `guerrillamail.com`) fail within days of deployment?
The Flash Sale That Blocked 40% of Paying Mobile Shoppers
Objection 1: Why do aggressive managed challenges (Cloudflare Turnstile / AWS WAF Challenge) falsely challenge or block legitimate users during high-traffic flash sales?
The Silent Fraud Ring That Maintained a 0.9 reCAPTCHA Score
Objection 1: How do automated botnets bypass behavioral risk-scoring (reCAPTCHA v3 / Enterprise score 0.0 to 1.0) and achieve high 'human' trust scores?
The Proof-of-Work Challenge That Melted Mobile Batteries
Objection 1: Why does a fixed client-side Hashcash difficulty (e.g. 20 leading zero bits in SHA-256) cause severe asymmetry between high-end desktop gaming CPUs and low-end mobile devices?
The Exam Journal That Lost 2,850 Saved Answers
Objection 1: If we open the journal with `O_DIRECT`, every `write()` goes straight to the disk and skips the page cache, so why is that not enough to make "Saved" survive a power loss?
The Photo Index That Kept Deleted Records on Disk
Objection 1: Leveled compaction already drops tombstones and dead values when it merges files, so why do you need to run a manual compaction at all to meet the 7-day rule?
The Feed Export That Looped on Chunk 3
Objection 1: Why not simply raise the lease to 16 seconds so the 11-batch chunk fits, instead of changing the worker's code?
The Shipping Labels That Were Bought Twice
Objection 1: Why not just raise the queue's visibility timeout from 30 s to 120 s and keep the worker code as it is, since that alone stops the slow-call duplicate?
The Claims Change Stream That Stopped on a Friday Evening
Objection 1: Why not set the slot cap large enough to hold a whole weekend of WAL, or remove the cap, so the connector simply resumes on Monday with no republish at all?
The Telemetry Topic That Lost Acknowledged Readings
Objection 1: Why change the election setting at all, when an alarm on under-replicated partitions and a volume replacement within minutes would have kept three copies and lost nothing?
The Late Meter Readings That Overwrote a Closed Billing Block
Objection 1: Every write is tagged with its checkpoint id and the job flushes after a restore, so why does the replay still overwrite `block_wh` with 70 Wh?
The Course With 300 Seats and 24,000 Registration Attempts
Objection 1: If S0 is at 240% of its write ceiling and 800% of its read ceiling, why not add more shards so the load on S0 is spread out?
The Home Region That Was Slow but Not Down
Objection 1: Both vantage points failed and the metric is down, so why not override the lease check and force the failover to Ohio at 12:03:10?
The Flight Search That Stopped for One Slow Airline
Objection 1: Why not keep only the 2 s timeout and the cap of 54 and leave out the circuit breaker, since the timeout already bounds Skyline Air at 60 threads per instance?
The Removed User Who Kept Access for an Hour
Objection 1: Why not set every TTL to 4 s, in Valkey and in the API servers, and skip the tombstones and the change-stream invalidator?
The Claims That Lambda Discarded While No Alarm Fired
Objection 1: Why not keep the direct SNS-to-Lambda subscription and add an on-failure destination, instead of putting a new SQS queue in front of the function?
The Site Creation Whose Orchestrator Died During the Domain Registration
Objection 1: After the takeover, why not just send the registration again, as you would any step whose DONE record is missing?
The Log Ingestion That Admitted Ten Times the Plan
Objection 1: Why not give each of the 16 nodes one sixteenth of the plan in its own memory, 125 KB a second with a burst of 500 KB, so the nodes together can never admit more than the plan and we need no store?
The Charger Counter That Restarted During a Charging Session
Objection 1: Why not keep each charger's hourly max in its row and sum the four chargers' maxima to tell the grid company whether cab-5 passed 10,000 W?