KatInterview

Design a Telemetry and Log Indexing Engine for Autonomous Vehicles

System DesignModel answer
MediumModel answerSystem Designsystem-designdistributed-systemsindexing

Last updated

Architect a scalable telemetry storage and indexing platform to capture, store, and query petabytes of high-throughput sensor logs efficiently.

You are tasked with designing a centralized data storage and retrieval infrastructure for a large autonomous vehicle (AV) fleet. Each operational vehicle generates a dense, continuous stream of raw sensor readings (high-resolution camera arrays, multi-channel LiDAR points, IMU telemetry, radar, and GPS) along with processed perception results (such as detected bounding boxes and path predictions). This yields approximately 500 MB per second per active vehicle.

Engineering teams need to perform fast, highly specific queries across the global fleet log collection. Typical search operations include finding precise vehicle timestamp ranges by metadata (e.g., "retrieve all instances where a vehicle navigated through a construction zone during rain") or by quantitative metrics (e.g., "identify video/LiDAR recordings where camera exposure noise exceeds a specified limit").

Key Requirements

  1. High Ingestion Throughput: Efficiently absorb and process continuous log streams from a fleet of thousands of operational vehicles.
  2. Targeted Retrieval: Enable sub-second to low-second range queries for specific vehicle IDs, sensor streams, and target timestamps without scanning unnecessary raw bytes.
  3. Structured & Attribute Search: Support granular filtering across high-cardinality metadata fields (e.g., location cells, weather conditions, perception labels, system flags).
  4. Cost Optimization: Design a long-term storage strategy that minimizes operational costs while maintaining searchability over extended time horizons.

Deliverables

  1. Back-of-the-Envelope Estimation: Quantify network bandwidth, daily/monthly storage volume, and financial impact.
  2. System Architecture: Outline the end-to-end data pipeline spanning on-vehicle collection, depot upload, and cloud processing.
  3. Storage & Indexing Blueprint: Define the data stores, indexing mechanisms, and catalog schemas to execute low-latency metadata queries and target file segment lookup.
  4. Data Lifecycle & Economics: Detail strategies for data retention, data reduction/triage, and storage tiering.

Hints

Hint 1

Calculate total raw bandwidth per vehicle: 500 MB/s equates to 4 Gbps. Continuous streaming via cellular is economically and technically impossible, necessitating local storage on NVMe SSDs with depot offloading.

Hint 2

Decouple raw payload retrieval from metadata filtering. Store heavy raw logs in object storage and light metadata in a specialized analytical engine.

Hint 3

Use a triaged retention policy: pin high-value clips (e.g., hard braking, disengagements, low-confidence perception events) while aggressively downsampling or dropping routine driving data.