Present and defend a distributed system you personally built
System DesignModel answerLast updated
Walk through a production system you owned end to end — requirements, architecture, data model, scaling, consistency trade-offs, failure modes, and observability — and defend every decision under follow-up questions.
You are asked to present the design of a significant system you personally owned in production. Cover the functional and non-functional requirements, sketch the high-level architecture (services, data stores, messaging), and trace the main read and write data flows.
Then go deep: explain your data model and why you chose each store, how the system scales (including peaks), what consistency-versus-availability trade-offs you made, where the bottlenecks were and how you measured them, how failures are handled, and how you observe the system in production. Support key decisions with the alternatives you rejected and the numbers you measured.
Expect the interviewer to interrupt with "why not X?", "what happens if Y fails?", and "how did you know it was fixed?". They are testing genuine ownership — whether you can go several levels deep on any component — not whether you can recite a textbook reference design.
Hints
Hint 1
Pick a project with real distributed-systems substance — several services, a durable queue, a database at meaningful load — not a single-instance CRUD app you cannot scale-discuss.
Hint 2
Put numbers on every non-functional requirement: QPS average and peak, data volume and retention, latency SLOs, RPO/RTO, availability target. Vague requirements make every later trade-off unfalsifiable.
Hint 3
Draw the boxes first, then narrate exactly one write path and one read path end to end, step by step, before diving into any single component.
Hint 4
Prepare two or three 'hardest problem' stories with before-and-after metrics — the bottleneck, the fix, and how you verified it.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
This is a hybrid of system design and behavioral interviewing. The interviewer is not checking against a canonical design; they are checking whether you genuinely owned what you are describing. Three things separate a strong answer from a rehearsed one: every decision is anchored in a concrete number, every claim about failure is backed by what actually happened, and you can go several levels deeper on any box on your diagram than you initially volunteered.
Use this time budget (roughly 35–40 minutes):
- Context, 2 minutes. Business problem, your role, team size, what you personally owned versus what teammates owned.
- Requirements, 5 minutes. Functional capabilities, then non-functional requirements with explicit numbers.
- High-level architecture, 8 minutes. Draw boxes and arrows, then trace one write path and one read path step by step.
- Data model, 5 minutes. Schema, keys, indexes, and why each store was chosen over alternatives.
- Two deep dives, 10–15 minutes. Your two hardest problems, with measurements.
- Trade-offs, failures, observability, 5 minutes.
- Retrospective, 2 minutes. What you would redo, and how the design changes at 10x scale.
A worked example — order event ingestion platform. I led the backend for a platform that consumed order lifecycle events from checkout, maintained authoritative order state, and fanned out to fulfillment, notification, and analytics. Four engineers; I owned ingestion and state.
Requirements with numbers: 2k events/s average, ~20k/s at sales peaks; write p99 under 200 ms, status-read p99 under 50 ms; no loss of any accepted event (RPO 0 for accepted events) at 99.95% availability; ~50M orders/month with two years of history retained.
Architecture and write path: a stateless ingest service behind a load balancer validates and authenticates each event, produces it to a Kafka topic (64 partitions keyed by order ID, giving per-order ordering) with acks=all, and returns 202. A state service consumes, and in a single database transaction checks a dedupe table for the event ID, validates the state-machine transition, updates the orders row (with an optimistic-concurrency version column), appends to an append-only history table partitioned by month, and writes a transactional outbox row. The transaction commits, then the Kafka offset commits. A relay publishes the outbox to a downstream topic consumed by fulfillment, notifications, and an analytics sink. Read path: GET /orders/{id} checks Redis (TTL plus invalidation on state change), falls back to a read replica, and customer-scoped queries hit a separate read model keyed by customer ID so they never require scatter-gather across shards. Orders are sharded by hash of order ID.
The two deep dives should be the genuinely hard parts. First, exactly-once effects on an at-least-once pipeline: consumer restarts duplicate events, so idempotency comes from the in-transaction dedupe check, state-machine guards (shipped cannot revert to paid), and the outbox eliminating the dual-write between database and Kafka. I considered Kafka transactions/EOS and rejected them because the sink is an external database, so EOS would not cover the write while adding operational burden. Second, the peak-load bottleneck: at the first major sale, hot-shard write contention from large enterprise customers skewed the load. Fixes were batching commits in the consumer (100 events or 20 ms), monthly history partitions to keep indexes small, and one additional shard; p99 write latency went from about 800 ms to 140 ms, and consumer lag peaked near 90 seconds and drained within SLO.
Trade-offs to state explicitly. Order state is CP-leaning — strongly consistent within a shard, because payment correctness dominates. Cache, read models, and notifications are eventually consistent with seconds of staleness accepted. The ingest path favors availability: accept into Kafka even when the database is degraded. Relational storage was chosen for multi-row atomicity, constraints, and the outbox pattern; DynamoDB/Cassandra were rejected because we needed transactional multi-row writes. Kafka beat a simple queue for replayability and partition ordering. Ordering is only per-order; global ordering would destroy throughput for no benefit. Observability: consumer-lag dashboards, p99 latency and error-rate SLOs on both write and read paths, processed-events-versus-enqueued reconciliation, outbox-publish lag, and alerting on state-machine rejection spikes, which usually signal an upstream bug.
Common mistakes. Being vague about numbers; claiming exactly-once without explaining idempotent effects; describing the team's work as yours; asserting "it scales" without the measurement; and hiding known weaknesses. Volunteer one unresolved limitation and say how you would address it — that reads as ownership, not weakness.