System design
End-to-end platforms: grain, SLAs, CDC, lakes, and what you page at 3am
12 questions with solutions
- Q1StripeShopifyDoorDash
Design an orders platform for 40 analysts at 9:00 and a 15-minute CDC lag. Sketch the layers.
Solution
OLTP CDC → raw/bronze files → typed silver (MERGE on order_id) → gold at one grain (order or line — pick one) → a serving warehouse or marts for BI. Orchestrate freshness; do not transform 2 TB in the orchestrator. Page on freshness and volume, not only “job succeeded.”
- Q2UberLinkedInConfluent
Exactly-once from Kafka into a warehouse. What do you actually promise?
Solution
At-least-once plus an idempotent sink (MERGE on event_id / offset+partition). True EOS is a specific Kafka + sink setup. Saying “Kafka is exactly-once” without a key is a fail.
- Q3Capital OneWalmartTarget
A late dimension change must not rewrite last month’s facts. Pattern?
Solution
Type-2 dimension with valid_from/valid_to. Facts join as-of the event timestamp. Type-1 overwrite changes history. Say which product wants.
- Q4AppleNetflixDatabricks
Two engines must share one lake table. What do you refuse to do?
Solution
Dual-write CSV trees. Pick Iceberg (or UniForm) with a single writer. Two writers is how the copies lie.
- Q5Capital OneUnitedHealthPalantir
PII in bronze, marketing wants emails. Draw the control plane.
Solution
Separate raw PII, tokenize or mask in silver, grant only the columns they are allowed, audit the extract. Slack SELECT * from bronze is the incident.
- Q6AirbnbLyftSpotify
Backfill two years without starving the 8:00 SLA. How?
Solution
Bounded date chunks, a smaller pool, catchup off, and idempotent partition replace. Unpausing catchup from 2019 is the stampede.
- Q7UberDoorDashInstacart
When is a warehouse the wrong serving plane?
Solution
Sub-100ms point lookups, per-user online features, or a product API that is not SQL. Then you need a keyed store or a feature/online path — and a contract with the batch grain.
- Q8AmazonGoogleSnowflake
Cost doubled and nobody knows which team. What was missing in the design?
Solution
Tags / chargeback on compute and storage, query tags from dbt/jobs, and an owner on every gold table. Architecture without FinOps is a slide.
- Q9ConfluentShopifyStripe
Sketch CDC from Postgres to Iceberg with a 5-minute SLA.
Solution
Debezium/DMS → Kafka/MSK → sink that MERGEs into Iceberg on the primary key, watermark on LSN/time, dead-letter for poison rows. A nightly dump is not this design.
- Q10SnowflakeDatabricksSalesforce
Multi-tenant SaaS analytics. How do you isolate?
Solution
Tenant_id on every fact, row policies or separate schemas for large tenants, and never a shared “admin” role that can SELECT * across tenants. Compaction and clustering on tenant + date.
- Q11UberDoorDashNetflix
Streaming dashboard vs a 1-hour mart. How do you choose?
Solution
If the decision can wait an hour, batch is cheaper and simpler. Streaming is for operational actions (fraud, inventory, live ops). Do not stream a CFO dashboard to look modern.
- Q12AmazonNetflixCapital One
Disaster recovery for the lake. What is the actual runbook?
Solution
Cross-region replica or object-lock, a metastore backup, and a restore drill. “S3 is durable” is not a runbook. Know RPO/RTO in hours, not adjectives.