Design a Product Analytics System, stage 9 of 9: defend it
Defend the pipeline
Your interviewer: "That is a stream, a fleet of workers and a separate database. Why not keep Postgres with good rollups, or send everything to a managed warehouse?"
System so far· 8 parts
Select a component to see what it is responsible for and which state it owns.
- 1Customers' apps → Capture API: Batches of events
- 2Customers' dashboards → Query service: Chart request
- 3Query service → Postgres: Teams and saved charts
- 4Query service → Events (column store): Aggregate by column
- 5Capture API → Event stream: Append, then acknowledge
- 6Ingestion workers → Event stream: Read a partition
- 7Ingestion workers → Postgres: Who is this ID?
- 8Ingestion workers → Events (column store): Batch insert
What you need to know
0 of 1 checks done
A good defence ties every component to a requirement:
Component Requirement it serves Column store ad hoc questions over huge volumes Stream no lost events through outages and spikes Copied person properties fast filters without joins Hashed sharding and quotas fairness between customers A component you can't tie to a requirement shouldn't be in the design.
Check
When would Postgres with rollups be the better choice?