Walking Through a Production Data Pipeline You Own
System DesignModel answerLast updated
Present one real data pipeline you built or reworked, linking requirements to design choices, rejected options, replay and backfill handling, a hard failure, and what you would change.
Task
Pick one production data pipeline that you personally designed or significantly reworked, and present it as you would in a technical screen. Cover the architecture, the requirements that shaped it, the technologies you chose and the ones you passed over, one hard technical problem, and the lessons from running it.
A list of tools is not an answer. For every major decision, show the constraint behind it, the evidence you used, and the result. If confidentiality limits what you can share, use anonymized names and scale ranges. Do not invent facts.
Ground rules
- Stick to one coherent pipeline, not a mix of unrelated projects.
- Separate the decisions you owned from those you inherited or that the team made.
- Quantify requirements and outcomes only when you can defend the numbers. Otherwise describe the constraint qualitatively.
- Go beyond the happy path: address correctness, reliability, cost, security, and maintainability.
- Include at least one alternative you rejected and one decision you would revisit today.
Questions worth asking first
- Should I emphasize architecture, incident response, or team leadership?
- How deep should the implementation detail go, given the time?
- May I sketch the design, and should it show the original state, the current state, or both?
- Is anonymized detail acceptable?
- Which matters most to you: latency, scale, correctness, cost, or developer velocity?
Part 1: Context and requirements
Describe who uses the pipeline and what decision it supports, what existed before, what your role was, and the measurable functional and non-functional requirements.
Part 2: Architecture and trade-offs
Follow a single record from its source through ingestion, storage, transformation, quality checks, orchestration, and serving. For each significant technology or pattern, compare it with at least one realistic alternative.
Part 3: Deep dive on a technical problem
Describe one specific failure or constraint. Explain how you diagnosed it, the options you weighed, the fix, how you validated it, how you rolled it out, and the measured outcome. Finish with what you would do differently now.
Hints
Hint 1
Choose a small set of requirements that make the trade-offs unavoidable, such as freshness target, late-arriving data window, and correctness tolerance. A clear workload shape and objective beat a big unsupported number.
Hint 2
State the decision criterion before naming the tool, then name the alternative you rejected and why. Make replay, idempotency, schema evolution, and failure isolation visible in your diagram.
Hint 3
For the deep dive, pick a problem whose resolution shows judgment rather than effort. Separate the quick mitigation from the lasting fix, and describe how you validated it (shadow runs, reconciliation) before cutover.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
What a strong answer demonstrates
Interviewers use this prompt to check four things:
- Ownership: you can say what you decided versus what you inherited.
- Constraint-driven reasoning: each tool traces back to a requirement.
- Operational maturity: you cover replay, correctness, failure isolation, cost, and security.
- Honesty: you can name a mistake and a decision you would reverse.
The weakest answer is a tool list ("Kafka, Spark, Airflow, warehouse") with no reasons. Spend the first minute clarifying which dimension matters most, then aim the deep dive at it.
Part 1: Context and requirements
Use four beats: users and decision, prior state, your role, requirements. The example below is illustrative and anonymized. Substitute your own facts.
- Users and decision: Finance and product needed per-account usage totals to drive overage billing and plan-limit enforcement.
- Prior state: A nightly cron job ran SQL against an OLTP replica. It missed late mobile uploads, double-counted on reruns, and produced roughly one billing dispute a week.
- Your role: You owned ingestion, deduplication, and backfill strategy. The warehouse and orchestrator were inherited team standards. Say this explicitly.
- Requirements:
- Volume of tens to low hundreds of millions of events per day, with several-fold peaks.
- Freshness under 15 minutes for limit enforcement, daily for invoices.
- Exactly-once effect on totals, with invoices reconciling to source within about 0.1%.
- Late data accepted for up to 72 hours.
- Any day reprocessable from raw data within a few hours.
- Events carry account IDs only, no content. Encryption at rest and least-privilege access.
- Spend inside an agreed budget band.
Freshness plus late data is the core tension: serve an early answer, then correct it.
Part 2: Architecture and trade-offs
Producers -> Kafka (keyed by account_id, ~7d retention)
|-> Stream job -> low-latency store (rolling usage for limit checks)
|-> Raw sink -> object store, append-only "bronze" (replay source of truth)
-> Batch dedup/transform: MERGE on event_id -> "silver"
-> Quality gates (counts, uniqueness, reconciliation vs source)
-> Modeled "gold" daily usage -> warehouse -> billing, dashboards
Orchestration: one DAG run per date partition; schema registry gates producers
Give the criterion, the choice, and the rejected option:
| Criterion | Choice | Rejected | Reason |
|---|---|---|---|
| Durable buffer, replay, decoupling | Log-based queue keyed by account | Producers writing straight to the warehouse | Retention enables reprocessing, per-key ordering, producer isolation |
| Cheap immutable history | Table format on object storage | Raw tables inside the warehouse | Much lower storage cost, atomic partition overwrite for backfills |
| Correct totals under retries and late data | Idempotent MERGE on a client-generated event ID | End-to-end exactly-once streaming | Exactly-once breaks at the client retry boundary; key-based dedup is simpler and auditable |
| Two latency needs | Stream for enforcement, batch for invoices | Stream-only | Invoices need reconciled truth; the stream path may be approximate and is corrected by batch |
| Contract safety | Schema registry with compatibility rules | Schema-on-read | Incompatible changes are rejected at write time instead of failing silently downstream |
Make four properties visible on the diagram:
- Replay: bronze is never mutated.
- Idempotency: MERGE on the event key and atomic partition overwrites mean reruns are safe.
- Schema evolution: registry rules plus additive column changes.
- Failure isolation: the stream path can fail without blocking invoices, and a bad partition is quarantined without halting other days.
Cross-cutting: keep the schema free of personal data, encrypt with managed keys, separate read and write roles, audit gold tables, and cover models with tests, lineage, and runbooks.
Part 3: Deep dive example (duplicate usage after retries)
Symptom. After a mobile SDK release, some accounts showed 1.5 to 2 times their real usage, and two customers were throttled wrongly.
Diagnosis.
- Compared gold totals with a source-of-record measure for affected accounts.
- Found duplicates with different event IDs, because the new SDK regenerated the ID on every retry.
- Confirmed by correlating the duplicate rate with app version.
Immediate mitigation (hours). Raise enforcement thresholds for affected accounts, add a fallback dedup key (account, session, segment start) in the silver MERGE, and rebuild affected partitions from bronze.
Durable fix, with alternatives considered.
- Fuzzy time-window dedup: rejected, it can drop legitimate repeats.
- Server-assigned IDs alone: rejected, a client retry is a new request and gets a new ID.
- Chosen: a deterministic client ID derived from (session, segment index), a contract test in SDK CI, and a registry rule making the field mandatory.
Validation and rollout.
- Shadow-run the new model next to the old one for a week and diff per-account totals against source.
- Add a permanent uniqueness test on the natural key and a daily reconciliation check that pages above a drift threshold.
- Feature-flag the new model, backfill a staging snapshot, swap atomically, and give finance a corrected-invoice list.
Result. State a measured outcome you can defend, such as disputes dropping from weekly to rare.
What I would change. Enforce ID determinism earlier (contract tests before the first SDK release) and invest in end-to-end reconciliation from day one rather than after the incident.
Trade-offs to be ready for
- Cost vs freshness: a streaming tier costs more to run. Justify it only for the use case that needs minutes-level latency.
- Complexity of two paths: two code paths can diverge. Mitigate with shared transformation logic and reconciliation between them.
- Late data policy: a longer window improves accuracy but delays finality. Be explicit about when a number becomes "closed".
Common mistakes
- Reciting tools without the constraint behind each one.
- Claiming "exactly-once" without saying where and how.
- Inventing precise numbers you cannot defend.
- Skipping security, cost, and operations.
- Presenting a deep dive that is only effort ("we worked weekends") rather than judgment.
- Claiming team decisions as your own.
- Having no regrets. A decision you would revisit shows maturity.
Delivery tips
Keep the whole walkthrough to roughly 30 to 40 minutes of material, with the diagram first. Pause after each part so the interviewer can steer toward latency, correctness, cost, or leadership.