Walk Through a Distributed Data Platform You Built End to End
BehavioralModel answerLast updated
Present one real distributed pipeline you owned: architecture, tool trade-offs, scale and failure handling, and a production incident you diagnosed, all in about four minutes.
Scenario
You are in an early screening conversation for a backend or data-platform role. The team builds distributed systems using some mix of Go, Java, Apache Spark and Elasticsearch. The screener asks you to talk about a distributed project from your own experience that used some of these technologies or close equivalents.
You have roughly 3 to 5 minutes. Choose one system and tell its story coherently, rather than listing tools from several different jobs.
What to cover
- Goal and architecture. What problem did the system solve for the business? Trace the data from the moment a client sends it, through ingestion, processing and storage, to the point where someone queries it.
- Why these tools. For each major component, explain why it was picked over the obvious alternatives and what that choice cost you. Examples of comparisons you might make:
- Go versus Java for a service
- Spark versus another batch or streaming engine
- Elasticsearch versus a relational or wide-column database
- Scale and resilience. Give concrete numbers such as request rate, daily volume and retention. Explain what happens when part of the system fails, and how you kept data correct (delivery guarantees, duplicates, consistency).
- A production problem. Describe one serious bottleneck, outage or operational failure you personally diagnosed, such as GC pauses, backpressure, shard imbalance or split-brain in a search cluster, or memory spills in Spark. Explain how you found the cause and what you changed.
What a strong response shows
- Clear ownership: what you did versus what the team did.
- Trade-off thinking rather than "we used it because it is popular."
- Operational maturity: monitoring, backpressure, partitioning, scaling.
- Concise delivery that fits the time limit.
Write out the answer you would give.
Hints
Hint 1
Pick a single pipeline and state your own role in the first 30 seconds. Use "I" for what you owned and "we" only for shared work.
Hint 2
For every tool, give one sentence on why it fit and one on what it cost. Make sure your numbers reconcile: events per second times payload size times retention should roughly match your storage figures.
Hint 3
Structure the incident as symptom, diagnosis, root cause, fix and measured result. If you claim exactly-once behavior, name the mechanism, such as idempotent writes with deterministic IDs or a transactional sink.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
What the screener is really testing
Even in a recruiter-level conversation, the question is technical. The listener is checking four things:
- Ownership. Did you build and operate the system, or observe it?
- Reasoned choices. Can you justify each tool and name its downside?
- Production experience. Do you know what fails at scale?
- Compression. Can you stay clear and within about four minutes?
The most common failure is a tour of technologies from several employers. Choose one pipeline and narrate it.
Suggested time budget
| Segment | Time | Content |
|---|---|---|
| Context and role | ~30s | Goal, team size, what you owned |
| Architecture | ~60s | Ingest, buffer, process, store, query |
| Trade-offs | ~45s | Why and cost for each tool |
| Scale and reliability | ~45s | Numbers, delivery semantics, failure handling |
| Incident | ~60s | Symptom, diagnosis, fix, result |
Example answer (illustrative; replace with your own experience)
Context. "I was one of five engineers on a device-telemetry platform. Devices emitted diagnostic events, and support engineers needed to search the last 14 days of any device's events within a minute of arrival. I owned the Go ingestion service and the Spark job that indexed into Elasticsearch. A colleague ran Kafka, and a platform team operated the search cluster with my input on index design."
Architecture.
- Devices send batched, protobuf-encoded events to a stateless Go gateway behind a load balancer.
- The gateway authenticates, validates the schema and writes to Kafka, keyed by device ID, with
acks=all. It replies success only after Kafka confirms. - A Spark Structured Streaming job (in Java) consumes in 30-second micro-batches, deduplicates, enriches with device metadata via a broadcast join, and writes to two sinks: Parquet on object storage as the system of record, and Elasticsearch for interactive search.
- Users query through a dashboard and an internal API on top of Elasticsearch. Heavy analysis runs as batch Spark over the stored Parquet.
Trade-offs.
- Go for the gateway: the workload is pure network I/O, goroutines handle huge connection counts cheaply, and the small binary autoscales quickly. Cost: a smaller library ecosystem. Java stayed for Spark and the query API because the team's code lived there.
- Kafka: it decouples ingest rate from processing rate and enables replay after bugs. Cost: another system to operate.
- Spark over Flink: we already ran Spark batch, and a one-minute freshness target is fine for micro-batching, so one engine covered both modes. For sub-second latency with complex event-time state, I would choose Flink.
- Elasticsearch over Postgres or Cassandra: we needed ad-hoc multi-field filtering and text search. Cassandra demands known query patterns, and Postgres would struggle with the write volume. Cost: memory-hungry nodes, careful shard management, and it is not a durable source of truth, which is why object storage held the master copy.
Scale and reliability.
- About 80K events/s average, 200K/s peak, so roughly 7B events/day. After filtering, about 1.5B documents/day were indexed, around 1.5 TB/day primary, with one replica and 14 days hot retention, giving roughly 42 TB across about 30 data nodes.
- Delivery: at-least-once end to end, made effectively exactly-once in Elasticsearch with deterministic document IDs (hash of device ID, sequence and timestamp), so retries overwrite instead of duplicating.
- Failures: gateways are stateless and devices retry with exponential backoff and jitter. Spark resumes from checkpointed Kafka offsets. Elasticsearch promotes replicas when a node dies, and three dedicated master-eligible nodes require a quorum, preventing split-brain.
Incident (situation, diagnosis, action, result).
- Situation: after a firmware release raised volume, consumer lag grew to 40 minutes and freshness broke its target.
- Diagnosis: Spark was healthy; the bottleneck was Elasticsearch. Thread-pool stats showed write rejections (HTTP 429) on a few nodes, and Spark was retrying whole bulk requests, amplifying load. The root cause was our daily index layout: traffic was skewed, so some primary shards reached ~120 GB while others held ~5 GB, and the heavy ones sat on the same nodes.
- Action: moved to ILM rollover by size (~40 GB per primary shard or one day), capped shards per node so hot shards spread out, raised
refresh_intervalfrom 1s to 30s, and changed the writer to use ~10 MB bulks, retry only rejected documents with backoff, and limit concurrent bulks per executor. - Result: rejections fell to near zero, lag recovered within an hour and stayed under two minutes at the new peak, and per-node indexing throughput rose about 35%.
Likely follow-ups
- Index lifecycle and shard sizing: roll over by size (30-50 GB per primary), force-merge and shrink after a few days, move to warm nodes, delete at retention since the full history lives in object storage. Watch shards per GB of heap, p99 search latency and segment counts. Oversharding is a slow failure, so alert on shard growth.
- Backpressure: bound in-flight work at every hop, rely on Kafka as the shock absorber, limit Spark's per-batch intake, and shed or defer low-priority traffic at the gateway.
- GC trouble: right-size heaps (under ~32 GB for compressed pointers), watch pause times, and reduce allocation churn.
Common mistakes
- Saying "we" throughout, so your contribution is invisible.
- Naming tools without reasons or costs.
- Numbers that do not reconcile.
- Claiming exactly-once without a mechanism.
- An incident with no root cause, or a fix that is only "add more nodes."
- Exceeding five minutes; rehearse with a timer.