Section 6: One Log, Two Tiers - High-Level Architecture
Executive Summary: This section turns the Section 5 data model into running boxes. One outbox-fed Kafka log feeds one indexer, which writes closed rides into Cassandra time buckets and keeps open rides in a Redis live tier. A stateless query service reads the live tier first, then the buckets, and pages the result. We walk Maya's ride in and the 17:10–17:40 Market Street query out, then justify every box with a number and every missing box with a trigger.
The interviewer slides the marker across: "You've got tables. Now show me how a ride gets into them and how a query gets out." Section 3 already told us what this system is: writes are small (about 1,750/s at peak), reads and result sizes are the hard part (6,000 QPS peak, up to about 167K rows for a busy hour), and open rides are a small hot set (about 1M at peak, about 0.3 GB). Draw that and nothing more.
The Whole System on One Whiteboard
Two lanes: the write path (one producer, one log, two consumers) and the read path (one stateless service asking two stores in the right order). Exports and the reaper are side doors the hot path never waits on.
Sign in to continue reading
The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.
Sign in to read the full lesson