Staff Data Engineering System Design: A Worked Example
Difficulty: Staff Level | Companies: Netflix, Uber, Airbnb, Stripe, Databricks
Senior candidates propose solutions. Staff candidates propose solutions whose constraints they have made explicit, and who can tell you which requirement they are deliberately not meeting yet. The difference shows up in the first five minutes of the interview, before any diagram exists, when the candidate asks about arrival rate, retention, freshness budget, failure tolerance and who the consumers are. A design that skips that conversation is a design about a hypothetical system.
Prerequisites
- !Streaming and batch processing fundamentals
- !Object storage, warehouses and cache tiers
- !Basic throughput and storage arithmetic
What You'll Learn
- 1Convert a vague prompt into measurable requirements
- 2Size a streaming cluster from arrival rate and retention
- 3Choose reliability mechanisms that match the stated objective
- 4Explain the organizational structure the architecture implies
The framework: requirements before components
Write the requirements as numbers before drawing anything. Arrival rate in events per second, payload size, retention window, freshness budget, availability target, query patterns, and the cost ceiling. These seven numbers eliminate most of the solution space on their own: a five-minute freshness budget rules out nightly batch, and a ninety-day retention at a billion events a day tells you the storage tier before you discuss vendors.
Then state the non-goals. You will not serve low-latency point lookups on raw events. You will not support exactly-once across a sink that cannot express it. You will not multi-region active-active in version one. Non-goals are what keep the design inside the time box, and interviewers reward candidates who name them unprompted because it signals that they have shipped something under constraint rather than only drawn ideal systems.
Finally, identify the load-bearing assumption. Usually it is something like "events are keyed by account so per-key ordering is achievable" or "downstream tolerates five minutes of staleness." Write it down, because when the design later fails, it will fail along exactly that assumption.
Worked design: a real-time analytics platform
Take a concrete prompt: one million events per second, sub-minute freshness for dashboards, ninety-nine point nine nine percent availability, plus a batch path for models that need a full history. The architecture below satisfies it with a streaming path for latency and a batch path for completeness, both writing to one storage layer so consumers never have to reconcile two sources of truth.
Each choice has a trade-off worth stating aloud. Kafka absorbs bursts and gives replay, at the cost of operating a cluster with careful partition planning. A stateful stream engine gives correct windowed results with checkpoints, at the cost of more operational complexity than a batch job. A low-latency cache serves the dashboard, at the cost of a second consistency domain to reason about. Object storage holds the raw truth, at the cost of a separate batch path to rebuild anything derived.
| Decision | Choice | Alternative rejected | Why |
|---|---|---|---|
| Buffer | Kafka with replay | Direct to stream engine | Reprocessing without re-extraction |
| Stream engine | Stateful with checkpoints | Stateless map-only | Correct windows and exactly-once inside the engine |
| Online store | Redis | Warehouse only | Sub-second dashboard reads |
| Storage format | Open table format | Raw Parquet | Schema evolution and atomic merges |
| Batch engine | Spark | Streaming only | Cheaper full-history recomputation |
| Serving | Warehouse plus cache | One or the other | Analysts and applications need different access paths |
Capacity planning you can defend
Capacity math is where staff candidates separate themselves, because it forces every hidden assumption into the open. Work backwards from arrival rate and retention to partitions, storage and task slots, then sanity-check the result against what the team can operate. If the arithmetic says forty brokers and the team runs four, the design needs to change, not the team.
class CapacityPlanner:
BYTES_PER_EVENT = 512
HEADROOM = 1.3
def kafka(self, events_per_sec: int, retention_days: int,
replication: int = 3) -> dict:
per_day = events_per_sec * 86400
total_bytes = per_day * retention_days * self.BYTES_PER_EVENT * self.HEADROOM
partitions = max(12, events_per_sec // 1000 * 10)
partition_bytes = total_bytes / partitions
return {
"partitions": partitions,
"brokers": max(3, -(-partition_bytes // (500 * 1024**3))),
"replication": replication,
"cluster_tb": round(total_bytes / 1024**4, 2),
"throughput_per_partition_mb": round(
events_per_sec * self.BYTES_PER_EVENT / partitions / 1024 / 1024, 2
),
}
def stream_engine(self, events_per_sec: int, state_bytes_per_key: int,
distinct_keys: int) -> dict:
state_gb = distinct_keys * state_bytes_per_key / 1024**3
return {
"taskmanagers": max(3, events_per_sec // 20000),
"state_tb": round(state_gb / 1024, 3),
"checkpoint_interval_ms": 60000,
"state_backend": "rocksdb",
}
Say out loud which inputs are estimates. Payload size is almost always a guess, and so is the distinct-key cardinality behind the state calculation. A design that labels its estimates is more credible than one that presents a single confident number, because the interviewer knows those inputs are uncertain too.
Reliability choices and their cost
Reliability mechanisms are not free, and the objective should decide which ones you buy. Ninety-nine point nine percent allows roughly forty-three minutes of downtime a year, which a single region with good backups can probably deliver. Ninety-nine point nine nine percent allows about five minutes, which forces multi-zone at minimum and usually active-passive cross-region with an automated failover you have actually tested.
class ReliabilityDesign:
OBJECTIVES = {
"99.9": {"allowed_downtime_min": 43.8, "topology": "multi-zone, single region"},
"99.99": {"allowed_downtime_min": 5.3, "topology": "active-passive cross-region"},
"99.999": {"allowed_downtime_min": 0.5, "topology": "active-active multi-region"},
}
def mechanism_set(self, objective: str) -> dict:
spec = self.OBJECTIVES[objective]
return {
"allowed_downtime_min": spec["allowed_downtime_min"],
"topology": spec["topology"],
"buffer": {
"kafka": {"replication": 3, "min_insync_replicas": 2, "acks": "all"},
"stream": {"checkpointing": True, "savepoints": True, "backend": "rocksdb"},
"storage": {"replication": 3, "versioning": True},
"cache": {"replicas": 3, "failover": "automatic"},
},
"rehearsed": objective in {"99.99", "99.999"},
}
The word that matters in that structure is rehearsed. An availability claim backed by a failover mechanism nobody has triggered is a hypothesis. Ask any design what happens when the primary region disappears and how long detection plus failover actually takes, measured from the last game day.
Failure domains and graceful degradation
Design each component to fail locally rather than propagate. The buffer absorbs producer bursts so a downstream outage does not become an upstream outage. The streaming layer degrades to higher latency before it drops events, because a delayed number is recoverable and a lost one is not. The dashboard falls back to the last computed values with a visible staleness indicator rather than a blank screen.
Map the failure modes explicitly: what does a single broker loss cost, a single task manager loss, an availability zone, the cache tier, the warehouse? For each, state the user-visible effect and the recovery time. Then check the composition, because two independent degradations that are each acceptable alone can combine into an outage. That is the analysis, not the diagram, that a staff-level review is really testing.
The organizational design behind the architecture
Every architecture encodes an org structure, and the two must agree. A platform with many small streaming jobs needs an on-call rotation broad enough to cover them, a shared convention for checkpoints and alerts, and a paved road that makes the correct setup the default. If the team is twelve people spread across five time zones, a design that requires bespoke per-job tuning will collapse under its own operational weight regardless of how elegant it is on a whiteboard.
Decide deliberately which capabilities are centralized. Identity, networking, storage layout, observability and cost attribution should be platform-owned because they must be uniform. Business logic and metric definitions should sit with domain teams because they change at the pace of the business. Splitting along that line is the single highest-leverage architectural decision in the whole design, and it is one that purely technical candidates frequently miss.
How staff candidates are actually graded
Interviewers listen for four things. Whether you quantify before you choose. Whether you can articulate a trade-off in both directions rather than reciting a preference. Whether you know which of your numbers are estimates. And whether you can describe the operational life of the system after the launch, including who gets paged and what the runbook says.
The strongest closing move is to name the first thing you would measure in production and the decision it would trigger. That single sentence demonstrates that you have operated a system before, and it converts a design conversation into evidence of experience.
đ¯Ask before you draw
Arrival rate, retention, freshness budget, availability target, query pattern, cost ceiling, and the load-bearing assumption. Seven questions, usually two minutes, and they will reshape every component you were about to propose.
Common Mistakes
Drawing components before stating numeric requirements
Fix: Write rate, retention, freshness, availability, queries, cost and assumptions first
Presenting capacity numbers as certain when inputs are estimates
Fix: Label every estimated input and give the range you would validate in production
Claiming an availability target with an untested failover
Fix: Tie each objective to a topology and a rehearsed failover with a measured time
Ignoring who operates the system after launch
Fix: End with on-call coverage, runbook contents and the platform versus domain split
Best Practices
- Name non-goals explicitly to keep the design inside the time box
- Identify the load-bearing assumption and design monitoring around it
- Show a decision table with the alternative you rejected and why
- State which capacity inputs are estimates and how you would validate them
- Close with the first production metric you would watch and the decision it drives
Interview Questions
Q1: Design a platform processing ten billion events a day at ninety-nine point nine nine percent availability.
Buffer with replicated topics and a minimum in-sync replica requirement, stateful streaming with checkpointing to durable storage, object storage as the replayable source of truth, multi-zone compute with active-passive cross-region, and a failover rehearsed against a five-minute downtime budget.
Q2: How would you design a multi-region data platform?
Region-local ingestion and serving to keep latency and residency clean, asynchronous replication for shared reference data, region-partitioned state so stream jobs never need cross-region coordination, and a documented policy for which region is authoritative for each dataset.
Q3: The company acquires five others. How do you design the platform?
Normalize identity and networking first, inventory each estate with ownership and contracts, replicate rather than move initially, then converge formats and models one domain at a time behind unchanged consumer interfaces.
Q4: How do you handle disaster recovery for a petabyte-scale lake?
Versioned tables with cross-region replication of the manifest plus a subset of data for the fastest-recovery tier, periodic full restores into a clean account, and a measured recovery time that is published rather than assumed.
Q5: How would you structure a fifty-person data engineering organization?
A platform group owning ingestion, storage, observability and cost, domain groups owning their products end to end, a small governance function owning policy as code, and rotation rules that keep any single on-call page rare enough to be sustainable.
Key Takeaways
- Quantify seven things before drawing any component
- State non-goals and the load-bearing assumption out loud
- Capacity math exposes hidden assumptions and should label its estimates
- Availability objectives buy specific topologies and rehearsed failover
- Map failure modes and their composition, not just each component in isolation
- Architecture and org structure must agree or the design will not survive launch