KatInterview

Multi-Sensor Data Replay System for Autonomous Vehicle Scenarios

System DesignModel answer
MediumModel answerSystem Designstreamingdistributed-systemsdata-modeling

Last updated

Design a scalable system to store, index, and stream synchronized sensor recordings from autonomous vehicles, supporting variable-speed playback and metadata filtering.

Problem Context

You're building a platform that enables engineers to review and analyze recorded driving scenarios from an autonomous vehicle fleet. Each recording contains synchronized streams from multiple sensors—cameras capturing video, LiDAR producing point clouds, and telemetry providing vehicle state information.

Your Task

Design a system that allows engineers to:

  • Browse and filter recordings by attributes (weather conditions, scenario duration, geographic area, etc.)
  • Stream sensor data at adjustable speeds (0.5×, 1×, 2×)
  • Jump to specific moments within a recording with minimal delay
  • Access recordings from multiple workstations simultaneously

System Parameters

  • Dataset size: 100,000 hours of recordings
  • Storage per hour: approximately 100 GB (combining all sensors and metadata)
  • Expected concurrent users: up to 1,000 engineers accessing different recordings
  • Latency requirements: frame seeking should complete within 300ms; metadata queries within 1 second

What to Address

Design and justify your choices for:

  1. Storage schema: How you'll organize sensor data, timestamps, and searchable attributes
  2. API contracts: Key endpoints for discovering recordings and retrieving sensor streams
  3. Architecture: Component layout, including storage systems, caching layers, and delivery mechanisms
  4. Synchronization strategy: How you'll maintain alignment between sensors that capture data at different rates
  5. Scale handling: Approaches to serve thousands of concurrent streams while managing bandwidth and storage costs

Consider the trade-offs between preprocessing strategies versus runtime transformation, and explain how your design would handle both interactive viewing and programmatic access for automated testing.

Hints

Hint 1

Think about separating lightweight metadata (searchable attributes) from heavy sensor data (video, point clouds) into different storage tiers

Hint 2

Consider how video streaming services handle seeking—chunking data and maintaining keyframe indices enables fast random access

Hint 3

Pre-generating multiple quality levels lets clients choose bandwidth-appropriate streams, dramatically reducing concurrent load