KatInterview

Stream Processing Pipeline for High-Velocity Robot Sensor Data

System DesignModel answer
MediumModel answerSystem Designstreamingkafkadistributed-systems

Last updated

Design a fault-tolerant ingestion pipeline that sustains 2 GB/s of mixed telemetry from a distributed robot fleet with zero data loss and dual real-time and batch consumers.

Background

You are building the data backbone for a company that operates a large fleet of autonomous robots. Each robot continuously emits sensor readings, operational state changes, and occasional image captures. Your job is to design the platform that receives all of this data reliably, routes it to the right consumers, and stores it in a way that supports both real-time operations and long-term analysis.

What the System Must Do

  • Throughput: Sustain 2 GB/s of inbound data under normal conditions. Bursts up to 3 GB/s must not cause data loss.
  • Durability: A robot must not discard a batch until the platform has confirmed it was safely written. No silent drops.
  • Scalability: Adding more robots to the fleet should not require manual capacity changes to the platform.
  • Dual consumers: A real-time path must fire operational alerts within seconds. A separate batch path feeds analytical storage and machine learning workloads.
  • Schema flexibility: Robot firmware updates change sensor payloads frequently. Downstream consumers must not break when new fields appear or old ones are retired.

Scale Assumptions

  • Typical event size: 1 KB
  • Daily ingest volume: approximately 170 TB
  • Hot storage retention: 30 days
  • Cold storage retention: indefinite

What Your Answer Should Cover

  1. Data path — trace the journey of a single event from robot to final storage
  2. Component choices — name the technologies you would use at each stage and explain why
  3. Flow control — describe how each layer handles backpressure, spikes, and downstream outages without losing data
  4. Storage and schema design — explain how you model the data for efficient querying and how you manage schema changes over time

You are not expected to write code. A clear architectural narrative with concrete technology choices, sizing rationale, and trade-off reasoning is what a strong answer looks like.

Hints

Hint 1

Before naming any technology, convert the throughput numbers into something you can reason about: events per second, broker disk write rate, daily bytes, and compressed storage at rest. Interviewers use your sizing math to judge whether your component choices are grounded.

Hint 2

Zero data loss end-to-end requires durability at the edge, not just in the cloud. Think about what happens when the network between a robot and the ingestion layer goes down for 30 minutes.

Hint 3

Real-time alerting and batch analytics have very different latency and throughput profiles. Sharing a single storage system for both usually means sacrificing one for the other. How do you serve both without coupling them?