Sensor Collection and Dispatch System for Mapping Fleets
Medium · System Design · Software Engineer · Technical Screen
Prompt
Architect the end-to-end platform that coordinates and ingests data from an instrumented vehicle fleet capturing street-level sensor recordings to build and maintain high-definition maps for autonomous driving.
Fleet cars travel public road networks while logging multi-modal streams—including multi-angle video cameras, spinning and short-range lidars, and GNSS/IMU positioning sensors. Your platform must determine which road corridors lack coverage or require fresh passes, move multi-terabyte recordings off the cars reliably, and hand off indexed, quality-verified, compliant datasets to downstream map-compilation pipelines.
Because numerical scale and operational boundaries are intentionally open-ended at the start of the conversation, clarify scope first rather than silently assuming fixed constants, and go deep into the physical and operational realities of fleet data collection rather than treating it as an ordinary web upload service. Key dimensions to establish include:
- Fleet count, operating metro zones, daily driving hours per car, and compressed per-hour sensor bitrates.
- Offload transport mechanics: physical drive swaps or wired links at regional garages, mobile cellular links, or a hybrid split.
- Whether route generation and driver dispatch live inside this platform or upstream of it.
- Map-freshness targets for routine refreshes versus urgent street changes, and the exact handoff boundary with downstream map compilation.
- Regulatory and privacy rules, including face and license-plate redaction, geographic data residency, and right-to-erasure requests.
Scope & Expectations
- Capacity & bandwidth math: Quantify per-vehicle recording rates, daily and annual petabyte growth, cellular versus depot fiber transfer times, regional buffer sizing, and street-network sweep capacity.
- Coverage tracking & mission dispatch: Explain how missing, stale, or changed street segments are scored, grouped into drivable shifts, and reconciled against verified cloud ingestion without leaving blind spots or scheduling duplicate drives.
- Vehicle logging & zero-loss offload: Detail onboard health checks, physical or local depot offload workflows, out-of-band manifests, and durability guarantees across network outages.
- Quality verification, privacy, & lifecycle management: Cover multi-layer calibration drift detection, quarantine mechanics, PII redaction boundaries, lineage-backed deletion, and tiered storage retention.
Step-by-step walkthrough
Clarify requirements and state explicit assumptions
Because the prompt leaves scale and operational details open, start by asking clarifying questions and stating explicit baseline numbers so every architectural choice rests on concrete math:
- Fleet & shifts: 300 mapping vehicles across 10 metro regions (~30 vehicles and 1 physical depot per region), driving one 8-hour shift per operating day (~250 operating days/year after weather, maintenance, and holidays).
- Sensors per vehicle: 1 long-range 360-degree lidar (a laser scanner that measures 3D distances by bouncing light pulses off surroundings), 4 short-range lidars, 8 high-resolution cameras, GNSS/IMU (satellite GPS paired with an inertial measurement unit of accelerometers and gyroscopes), and wheel odometry. Compressed onboard, these produce ~100 MB/s per vehicle.
- Hybrid offload: Bulk sensor logs leave via swappable NVMe SSD drive packs at the regional depot each evening; cellular carries live telemetry, chunk manifests, route updates, and small priority triage clips.
- Route planning in scope: Our system tracks which road segments are missing or stale, computes daily routes, guides human safety drivers via an in-car app, and adapts routes mid-shift.
- Freshness & handoff boundary: Highways and major arterials refresh every 30 days; residential streets every 90 days; reported road changes (construction, closures) within 48 hours. Validated data must reach downstream map building within 24 hours of shift end. Map construction itself is out of scope—our system ends at delivering indexed, quality-checked, privacy-blurred logs plus
"segment_data_ready"events. - Privacy & compliance: Faces and license plates must be blurred before humans or downstream pipelines outside a locked raw zone can read camera frames. Privacy deletion requests must erase both raw chunks and derived artifacts, and data stays inside its legal geographic region.
Non-functional goals
- Zero silent data loss: Every recorded minute either arrives intact in cloud storage with a verified cryptographic checksum or raises an automatic alert and re-schedules its streets for collection.
- Offline vehicle autonomy: Vehicles must keep driving and recording through cellular dead zones or cloud outages using cached shift missions.
- Petabyte cost discipline: Multi-hundred-petabyte annual volume requires deliberate storage tiering and retention rules from day one.
Back-of-the-envelope capacity and bandwidth math
Start by sizing the physical data volume—multi-sensor automotive streams weigh four orders of magnitude more than typical web requests, and that throughput reality dictates every transport boundary.
Per-vehicle recording rate (after lossless/visually-lossless onboard compression) 8 cameras × 10 fps × ~0.5 MB/frame = 40 MB/s 1 long-range lidar (~40 MB/s) + 4 short (4 × 5) = 60 MB/s GNSS / IMU / wheel CAN bus < 1 MB/s Total per vehicle = ~100 MB/s = 360 GB/hour -> ~2.9 TB per 8-hour shift (round to 3 TB) Fleet-wide volume Daily (300 vehicles × 3 TB) = 900 TB/day (~0.9 PB/day) Yearly (0.9 PB/day × 250 operating days) = 225 PB/year of raw sensor logs Why cellular CANNOT carry bulk logs 3 TB (3,000,000 MB) over 20 Mbps sustained (2.5 MB/s) = 1,200,000 s ≈ 13.9 days per shift! 3 TB over 100 Mbps sustained (12.5 MB/s) = 240,000 s ≈ 66.7 hours per shift! -> Cellular is strictly for telemetry, manifests, and tiny clips (~1 GB/vehicle/day). Regional depot sizing (30 vehicles returning each evening = 90 TB/night) Pack copy speed: 3,000 GB at 1 GB/s per NVMe bay = 3,000 s = 50 min per pack With 6 copy bays: 30 packs = 5 rounds × 50 min = ~4.2 hours to copy every car's pack 24-hour average WAN upload: 90,000,000 MB / 86,400 s = 1.04 GB/s ≈ 8.33 Gbps sustained Provision 2 × 10 Gbps (20 Gbps = 2.5 GB/s raw): 90,000 GB / 2.5 GB/s = 36,000 s = 10 hours (~11 hours with TCP/TLS overhead, comfortably inside our 24-hour freshness SLA!) Local depot buffer (3 days of WAN outage headroom) = 3 × 90 TB = 270 TB usable Road coverage capacity (per metro region) ~15,000 km physical road (2/3 two-way, 1/3 one-way) -> ~25,000 directional km Split into 100 m directed segments = 250,000 segments/region (2.5M fleet-wide) 1 vehicle: 8 h × 25 km/h = 200 km driven × 60% non-transit = 120 useful km/day (1,200 segments) 30 vehicles/region = 3,600 useful km/day -> full regional sweep in ~7 operating days! Routine refresh demand (at 250 operating days / 365 calendar days): 5,000 km arterials / 21 op-days (30 cal days) = ~240 km/op-day 20,000 km local / 62 op-days (90 cal days) = ~320 km/op-day Total single-pass refresh = ~560 km/op-day = ~16% of regional capacity (~31% for 2 passes) -> ~70% of fleet capacity is free for construction zones, quality re-drives, and expansion! Privacy blurring & catalog rows Frames/day: 300 cars × 8 cams × 10 fps × 28,800 s = ~691M frames/day At ~500 fps/GPU (batched detector): 691M / 500 = 384 GPU-hours/day -> ~16 GPUs fleet-wide Catalog (1-min chunks × 14 streams × 480 min × 300 cars) = ~2.0M chunk rows/day (~500M/year)Three crucial takeaways emerge from these numbers:
- Physical pack offload sets an overnight latency floor for full-resolution logs, which means any sensor failure that would ruin a shift must be caught live on the vehicle before 8 hours of driving are wasted.
- Each depot needs ~20 Gbps of fiber plus a ~270 TB local buffer to drain 90 TB overnight while surviving multi-day ISP cuts without halting vehicles.
- Driving capacity exceeds routine refresh by 3–6×, so the mission planner's main job is smart prioritization, not just shortest-path routing.
API design: offline-tolerant vehicles and resumable depot uploads
1. Vehicle <-> Cloud API (over cellular, authenticated via per-vehicle mTLS hardware certificate) GET /v1/vehicles/{vid}/missions/current -> ordered segment_ids, turn-by-turn geometry, sensor profile POST /v1/vehicles/{vid}/telemetry -> batched every 10 s: GPS, sensor health, free disk, seq_no POST /v1/vehicles/{vid}/manifests -> { log_id, chunk_id, stream, start_ts, bytes, sha256 } POST /v1/missions/{mid}/progress -> { segment_id, entered_at, exited_at, onboard_qa_ok } POST /v1/vehicles/{vid}/alerts -> { fault_code, sensor_id, timestamp, severity } 2. Depot Ingest -> Cloud API (over 20 Gbps regional fiber) POST /v1/ingest/packs -> { pack_id, vehicle_id, manifest_hash, chunk_count } -> ingest_id PUT /v1/ingest/{ingest_id}/chunks/{chunk_id} -> multipart stream + sha256 header (idempotent overwrite) POST /v1/ingest/{ingest_id}:commit -> verifies all manifest chunks arrived with matching sha256 3. Planning, Consumer & Governance APIs POST /v1/collection-requests -> { geometry_or_segments, reason, priority, due_by, repeat_every } GET /v1/segments/{sid}/passes?min_quality= -> validated passes + blurred chunk object keys for map building Event: segment_data_ready -> { segment_ids[], log_id, quality_score } (dedupe on log_id+sid) POST /v1/quarantines -> { vehicle_id, sensor_id, start_ts, end_ts, reason } POST /v1/deletion-requests -> { scope: vehicle+time | polygon+time | chunk_ids, reason }Why this API shape prevents data loss and duplicates:
- Manifests arrive over cellular before the physical drive pack: Sending tiny KB-sized chunk headers and SHA-256 checksums (256-bit cryptographic fingerprints of file contents) while driving means the cloud already has a checklist of every minute recorded—if a drive pack is dropped in the parking lot, the system knows within hours instead of never noticing.
- Idempotent chunk
PUT+ explicit:commit: A 1-minute long-range lidar chunk is40 MB/s × 60 s = 2.4 GB. Uploading chunks via multipartPUTkeyed deterministically bychunk_idlets broken transfers resume cleanly, and downstream pipelines see nothing until:commitconfirms the entire pack is intact.
Data model and storage zones
Planning DB (Regional PostgreSQL — ~250k road_segments per region is tiny) road_segments segment_id PK, region, polyline, direction, lane_count, road_class, refresh_days (30 | 90), last_validated_pass_at, best_quality, provisional_until collection_requests request_id PK, segment_ids[], reason, priority, due_by, repeat_every, status missions mission_id PK, vehicle_id, shift_date, ordered_segment_ids[], status Catalog & Lineage DB (Distributed SQL, partitioned by region and day — ~2M chunks/day) calibrations calibration_id PK, vehicle_id, sensor_id, extrinsics_json, valid_from, valid_to, state (verified | suspect | bad) drive_packs pack_id PK, vehicle_id, state (in_car | at_depot | buffered | committed | wiped) logs log_id PK, vehicle_id, mission_id, pack_id, calibration_ids[], sw_version, state (recorded | uploaded | validated | quarantined | deleted) chunks chunk_id PK (= log_id:stream:minute_seq), start_ts, end_ts, sha256, raw_object_key, blurred_object_key, wrapped_data_key, state segment_passes (segment_id, log_id) PK, entered_at, exited_at, quality_score, state (provisional | validated | revoked) lineage_edges (parent_artifact_id, child_artifact_id) PK, stage_name deletions request_id PK, scope_json, affected_ids[], deleted_ids[], completed_atHow bytes are separated across regional object-storage zones:
- Restricted Raw Zone: Holds unblurred camera chunks (300 MB per camera-minute) for 30 days. Only the automated blurring service account can read it; human debugging requires audited break-glass approval.
- Readable Validated Zone: Holds privacy-blurred camera chunks plus lidar/GNSS/IMU chunks (which contain 3D geometry rather than faces/plates, so ingest writes them once directly here, kept hidden by catalog state until
logs.state == validated).
High-level architecture: separating mission planning from byte transport
VEHICLE (offline-capable) Cellular: telemetry, SHA-256 manifests, +------------------------------------------------+ segment progress, urgent 110 MB clips | Sensors -> Logger -> Removable NVMe Pack |-----------------------------------------+ | Live Onboard QA (FPS, PTP clock sync, edges) | | | Driver Mission App (cached shift route) |<------------------------------------+ | +-----------------------+------------------------+ | | | Physical SSD pack swap at end of shift (~2 min) | | v | v REGIONAL DEPOT FLEET & MISSION PLANE (per region)| +------------------------------------------------+ +---------------------------------+---+ | 6 NVMe Copy Bays (verify SHA-256 vs manifest) | | Coverage DB <-- Collection Requests| | 270 TB Erasure-Coded Buffer (3-day outage cap) | | Nightly + Hourly Mission Planner | | Priority Resumable Uploader | +-----------------+---------------+---+ +-----------------------+------------------------+ ^ ^ | 20 Gbps WAN (~8.3 Gbps avg) | validated / | map mismatch v | revoked pass | requests CLOUD DATA PLANE (per region) | | +----------------------------------------------------------------------+---------------+---+ | Ingest API --> Restricted Raw Zone (unblurred camera) | | --> Validation (pose, calibration) --> GPU Face/Plate Blur --> Readable Zone | | | (bad logs) | | | v v | | Quarantine Catalog + Lineage DB --> "segment_data_ready" events-+-> Map Building +------------------------------------------------------------------------------------------+The system splits cleanly into two planes that touch at a single well-defined seam: the Fleet & Mission Plane decides where cars should drive, while the Cloud Data Plane transports, validates, and blurs bytes, reporting back
validated(orrevoked) segment passes to update road coverage.Deep dive 1: coverage tracking, route planning, and two-stage credit
Every two-way street is modeled as two directed ~100 m
road_segments(and per lane-group on wide highways). First, each segment gets an explainable urgency score so operations engineers can inspect and tune why a car visited any neighborhood:from datetime import datetime from typing import Dict, List ROAD_CLASS_WEIGHT: Dict[str, float] = { "highway": 3.0, "arterial": 2.0, "residential": 1.0, } QUALITY_BAR = 0.75 def compute_segment_priority(segment, now: datetime, active_requests: List) -> float: """Compute an explainable priority score for driving a 100m directed road segment.""" # 1. Routine staleness: 1.0 means due today; > 1.0 means overdue; never-driven starts at 2.0. if segment.last_validated_pass_at is None: staleness_ratio = 2.0 else: age_days = (now - segment.last_validated_pass_at).days staleness_ratio = age_days / segment.refresh_days score = ROAD_CLASS_WEIGHT[segment.road_class] * staleness_ratio # 2. Explicit requests (construction, map mismatches) outweigh routine background refresh. for req in active_requests: score += 10.0 * req.priority days_until_due = (req.due_by - now).days if days_until_due <= 1: score += 20.0 # Urgent deadline boost so 48-hour SLA items never slip # 3. Quality retry boost if the most recent pass suffered heavy truck occlusion or rain. if segment.best_quality is not None and segment.best_quality < QUALITY_BAR: score += 5.0 return scoreTurning prioritized segments into drivable 8-hour shifts: Finding the shortest tour covering a subset of directed streets from a depot is the capacitated directed rural postman problem, which is NP-hard (exponentially slow to solve to mathematical perfection). Because our fleet has 3–6× more capacity than routine refresh requires, fast practical heuristics work great:
- Select top-scoring segments up to tomorrow's regional capacity (
30 cars × 120 useful km = 3,600 km), filtering out night shifts for camera-dependent roads or rain forecasts. - Partition selected segments into 30 geographic clusters by road-network travel time so each car stays in one compact zone instead of crisscrossing town.
- Within each cluster, greedily link segments via shortest paths and refine order with or-opt local search (relocating short chains of 1–3 consecutive segments to cheaper positions in the tour—unlike classic 2-opt, or-opt never reverses traversal direction, respecting one-way streets and turn rules!).
The two-stage coverage credit state machine (crucial feedback loop): When should the planner stop sending cars to segment
seg_810? - If we markseg_810covered the moment Car 14 drives it, a broken camera or damaged SSD pack leaves a permanent blind spot nobody ever re-collects. - If we wait 24 hours until cloud validation finishes, tonight's planner thinksseg_810is still uncovered and wastes Car 22's shift drivingseg_810again tomorrow morning!We solve both problems with provisional credit that automatically expires after 72 hours unless confirmed by cloud validation:
[ needed ] --nightly plan--> [ assigned ] --car drives + onboard QA green--> [ provisional ] ^ | | | (72 h timeout expires OR cloud validation fails) <---+ | | v +-------------------- (log quarantined OR privacy-deleted later) --------- [ covered (validated) ]- Select top-scoring segments up to tomorrow's regional capacity (
Deep dive 2: physical pack offload, live vehicle checks, and zero-loss durability
Because bulk bytes wait until evening to leave the car, onboard live QA must catch shift-ruining faults within seconds:
- Sensor liveness & framing: check camera FPS, dropped frames, auto-exposure saturation, lidar point return rate, and GNSS lock.
- Hardware clock synchronization: autonomous mapping requires sub-millisecond alignment between spinning lidars and rolling-shutter cameras (if clocks drift by 20 ms at 15 m/s, 3D points smear by 30 cm!). Onboard QA monitors PTP (Precision Time Protocol, hardware timestamp synchronization over Ethernet) and alerts if clock offset exceeds 1 ms.
- Live calibration sanity check: project strong 3D lidar depth edges (poles, building corners) onto camera images every minute; if edges stop lining up with visual edges, a sensor mount was bumped.
Physical offload & the two-copy durability rule at the depot:
- 2-minute pack swap vs. 50-minute cable tether: Each vehicle records onto a removable 16 TB ruggedized NVMe pack (~5 shifts of headroom). At shift end, a technician swaps in an empty pack in 2 minutes—freeing the vehicle immediately for a second shift—and slides the full pack into a copy bay.
- Copy bay -> erasure-coded depot buffer: The bay verifies every chunk's SHA-256 against the on-pack manifest and writes to a 270 TB local cluster protected by 8+2 erasure coding (splitting each block into 8 data fragments plus 2 parity fragments across 10 disks so any 2 simultaneous disk failures lose zero data, costing only 1.25× storage overhead instead of 2× mirroring).
- Never wipe the physical pack until cloud
:commitsucceeds: Keeping ~3 packs per vehicle (900 packstotal across 300 cars: 1 in car, 1 on depot shelf awaiting cloud commit, 1 spare) guarantees two independent physical copies (pack + depot buffer) throughout WAN upload. Only after the cloud verifies every SHA-256 and commits the pack is the shelf pack marked safe to wipe. - Cellular fast-path for urgent triage: For a road-closure check that cannot wait until night, a 100 m segment (~14.4 s at 25 km/h) normally weighs
1.44 GB, but uploading 3 front cameras at 1 fps + 10× decimated lidar shrinks it to~7.5 MB/s × 14.4 s ≈ 110 MB—uploadable over cellular in ~1 minute while full-fidelity chunks still arrive via depot that evening.
Deep dive 3: multi-layer calibration checks, quarantine, privacy, and lineage
Layered quality validation & statistical drift detection
- Per-log cloud validation (within hours of upload): Fuses GNSS/IMU/wheel odometry into a smooth trajectory, aligns lidar scans against the existing HD map, checks multi-lidar overlap residuals, and scores weather/occlusion per 100 m segment pass.
- Fleet-wide drift detection (daily): Slow mechanical creep (a camera bracket tilting 0.15 degrees over a hot week) can pass single-log thresholds while biasing 3D geometry by 25 cm at 100 m range. A daily job runs CUSUM (cumulative sum control charting, a statistical test that accumulates tiny consistent offsets over time to catch subtle shifts early) on each sensor's alignment residual and compares point clouds from different vehicles crossing the same intersections.
- Quarantine as reversible metadata: When miscalibration is found, we do not delete raw files. Marking
(vehicle_id, sensor_id, calibration_epoch)asquarantinedhides affected logs from queries, flips theirsegment_passestorevoked(automatically queuing re-drives if needed), notifies map building via lineage, and lets engineers run offline recalibration to re-estimate the true 3D sensor angles from the recorded scenery itself and rescue the week's driving!
Privacy blurring, crypto-shredding, and petabyte retention
- High-recall blurring: Batched GPU detectors blur faces and license plates with spatial padding before writing camera chunks to the Readable Zone. We tune confidence thresholds low to maximize recall (catching >99.9% of real faces/plates), while monitoring one specific false-positive metric—accidentally blurring street-name or speed-limit signs that map building needs!
- Lineage + crypto-shredding for privacy deletion: Every pipeline step logs
lineage_edges(raw_chunk -> blurred_chunk -> point_cloud_tile -> map_patch). In addition, each 1-minute chunk is encrypted with a unique data key wrapped by a regional master key (envelope encryption). When a deletion request arrives, we traverselineage_edgesto delete objects and destroy each chunk's unique data key (crypto-shredding, making any copies trapped in immutable cold archives or backups permanently undecipherable).
Storage retention tiers (for 0.9 PB/op-day = 0.36 PB camera + 0.54 PB lidar/pose, 250 op-days/yr) Hot tier (days 1–30, ~21 op-days): raw cam (0.36) + blurred cam (0.36) + lidar/pose (0.54) = ~26 PB Cold archive (days 31–365, ~229 d): raw cam deleted at day 30; keep 0.90 PB/op-day = ~206 PB Long-term (>1 year, map-referenced): keyframes + decimated lidar (~10% of raw) = ~22 PB/yrScaling, failure handling, and trade-off summary
Hidden hardware bottleneck to call out: depot disk write bandwidth vs. disk capacity! Six NVMe copy bays running at
1 GB/spush6 GB/sinto the depot buffer (6 × 1.25 = 7.5 GB/safter 8+2 erasure coding) while the WAN uploader simultaneously reads2.5 GB/s. Capacity-wise,270 TB × 1.25 = 338 TBfits on just 17 spinning 20 TB hard drives—but 17 HDDs at200 MB/seach can only write3.4 GB/sand would bottleneck pack copying! Provision ~45 HDDs across storage nodes for parallel spindle throughput, or place an NVMe SSD landing tier in front of the HDDs.Failure handling summary
Failure Mode System Response (every path returns missing segments to "needed") ------------------------------------ ----------------------------------------------------------------- Sensor dies or loses clock sync live Onboard QA alerts driver, tags bad chunks, re-routes or ends shift. Drive pack lost or SSD sector fails Cellular manifest reveals missing chunks; 72 h provisional credit expires. Depot WAN fiber cut for 48 hours 270 TB depot buffer absorbs 3 nights; packs stay un-wiped; ship drives if >3d. Cloud region or planner outage Cars keep driving cached shift routes; depots buffer locally until recovery. Processing bug in blur/registration Immutable raw chunks (within 30 d) re-run cleanly by software_version.Core trade-offs
- Physical pack swap vs. cellular upload: Accepts overnight bulk latency and physical pack logistics in exchange for moving 900 TB/day reliably without multi-week cellular bottlenecks.
- Wipe after cloud commit vs. wipe after local copy: Requires 3 packs per vehicle instead of 1–2, eliminating any single-copy window at the depot.
- Two-stage provisional + validated credit: Prevents both blind coverage holes and redundant next-day driving.
- Tiered retention + decimated long-term archives vs. keeping raw forever: Cuts multi-year storage from hundreds of petabytes per year down to ~22 PB/year while preserving 30 days of raw frames for model/calibration reprocessing.
Intuition & how it works
Think of this system like coordinating a fleet of street-sweeping film vans whose movie reels are far too massive to fax over phone lines. Each van records ~3 terabytes of 3D laser scans and multi-camera video per 8-hour shift, so the heavy "film reels" (rugged removable NVMe SSD packs) travel physically to a regional garage each evening to upload over dedicated fiber-optic lines. Meanwhile, the vans send lightweight "postcards" over cellular all day—reporting GPS progress, live sensor health, and cryptographic file fingerprints—so headquarters always knows which streets were covered and immediately notices if a reel goes missing.
A naive "upload files over HTTP from the car" design collapses as soon as you check the bandwidth math: uploading 3 TB over a 20 Mbps cellular link takes 14 days for a single 8-hour shift! Equally dangerous is a naive route planner that marks a street "finished" the instant a van drives down it: if a camera lens was fogged or an SSD pack fails at the depot, nobody ever re-drives that block, leaving silent holes in an autonomous vehicle's map.
Let's walk through a concrete 4-step trace for one overdue 100-meter arterial corridor seg_810:
- 04:45 — Nightly dispatch generation:
seg_810passed its 30-day arterial refresh target, giving it a high priority weight. The planner bundlesseg_810with neighboring overdue streets into Car 14's 8-hour shift route, and Car 14 caches the entire route before leaving the garage so cellular dead zones never interrupt driving. - 09:40 — Driving & live onboard check: Car 14 traverses
seg_810, verifying live that all 8 cameras and 5 lidars maintain sub-millisecond clock lock, writes 1-minute chunks with SHA-256 fingerprints (unique 256-bit hashes of exact byte contents) onto removable canisterpack_308, and transmits the tiny manifest plus a"provisional pass"ping over cellular.seg_810entersprovisionalstatus for 72 hours so tomorrow's planner doesn't dispatch a duplicate run whilepack_308is still in transit. - 18:15 — Garage swap & fiber upload: Car 14 returns; a technician swaps
pack_308into a 1 GB/s ingest bay in 2 minutes. The bay verifies every chunk's SHA-256 against the manifest, copiespack_308onto a redundant local buffer, and streams the chunks over a 20 Gbps fiber trunk to the cloud (pack_308stays un-wiped on a depot rack until the cloud confirms receipt). - 22:50 — Cloud validation, blurring, & credit: Cloud workers verify 3D map alignment, run GPU face and license-plate blurring, publish a
"segment_data_ready"event to map compilation, and flipseg_810fromprovisionaltocovered(or back toneededif validation failed!).
Key trade-offs
- Depot SSD offload vs. cellular streaming. Recording ~100 MB/s produces ~3 TB per shift—impossible to move in bulk over cellular (~14 days at 20 Mbps, ~67 hours at 100 Mbps). Physical depot offload handles 0.9 PB/day cheaply over fiber, trading away real-time cloud visibility for full-fidelity logs while reserving cellular for live telemetry, manifests, and ~110 MB urgent triage snippets.
- Swapping drive packs vs. tethering vehicles at the depot. Swapping removable NVMe packs frees a car in 2 minutes for maintenance or a second shift, at the cost of buying ~3 packs per vehicle (900 packs total) and tracking physical pack state in a database instead of parking each car for ~50 minutes at a cable bay.
- Wiping packs after cloud commit vs. after local depot copy. Refusing to wipe a shelf pack until the cloud commits every chunk guarantees two independent physical copies (the SSD pack plus the depot's erasure-coded storage cluster, which splits data + parity across disks to survive drive failures) throughout transit, preventing a depot server incident from destroying irreplaceable drives.
- Two-stage provisional + validated credit vs. single-stage credit. Granting permanent credit on GPS telemetry hides dead sensors and lost packs; granting credit only after next-day cloud validation causes duplicate dispatches the next morning. A 72-hour expiring
provisionalstate eliminates both failure modes. - Live onboard QA vs. heavy cloud validation. Vehicle compute is power-limited so it runs fast checks (FPS, clock sync, coarse lidar-to-camera edge alignment) to avoid wasting an 8-hour shift, while heavy 3D map registration and cross-vehicle comparisons run asynchronously in the cloud.
- Metadata quarantine vs. immediate deletion of bad sensor logs. Flipping a catalog flag to
quarantinedimmediately hides bad passes and revokes coverage credit while preserving raw bytes so offline recalibration can often recover the week's driving without re-sending vans. - Tiered petabyte retention vs. keeping all raw bytes forever. Storing 225 PB/year of uncompressed/raw history forever is prohibitively expensive; deleting raw unblurred camera frames at 30 days and compacting >1-year archives to ~10% keyframes/decimated lidar cuts long-term storage by 90%, trading away full-frame reprocessing after day 30.
Common mistakes
- Designing a standard mobile-app HTTP upload pipeline without multiplying
100 MB/s × 8 hours × 300 carsto discover that cellular is off by two orders of magnitude. - Uploading bytes without an out-of-band cellular manifest, so a lost SSD pack or truncated upload fails silently with zero alerts.
- Marking road segments "covered" as soon as a car's GPS crosses them, leaving permanent map blind spots whenever data later fails validation or corrupts.
- Wiping vehicle SSDs immediately after copying to a single depot server, creating a single point of failure before data reaches cloud durability.
- Sizing the depot storage buffer by terabytes alone instead of disk write throughput (
6 GB/ssimultaneous bay copies with erasure coding requires ~40+ HDD spindles or an NVMe write tier, even though 340 TB fits on 17 large drives). - Ignoring sub-millisecond sensor clock sync and extrinsic calibration (the exact 3D angles and offsets between lidar and camera mounts), which silently ruins 3D map accuracy even when every file uploads cleanly.
- Treating face/plate blurring as an optional downstream job rather than a strict security boundary before camera frames enter readable storage.
- Failing to track data lineage, making GDPR/CCPA privacy deletions or miscalibration quarantines impossible once derived tiles have been built.
Follow-up questions
- Suppose a lidar or camera mount on one mapping car drifts out of alignment for seven days before anyone catches it. How do you uncover that silent drift, and what scope of recorded logs must be isolated? Gradual mechanical creep that slips beneath onboard edge-alignment thresholds and single-log checks surfaces in a daily fleet-wide job running CUSUM (cumulative sum change detection, a sequential statistical test that accumulates small persistent residuals over time to spot subtle shifts) on per-sensor registration residuals and cross-vehicle point-cloud overlaps at shared intersections. Because mechanical drift starts prior to crossing the alarm threshold, isolation extends backward to that sensor's most recent verified-clean calibration checkpoint (closing that calibration epoch), rather than starting at the alarm timestamp. Setting
(vehicle_id, sensor_id, epoch)toquarantinedin the catalog suppresses those logs from consumer queries, transitions theirsegment_passestorevokedso the dispatch planner re-queues affected streets, alerts map compilation vialineage_edgesto recompute impacted tiles, and preserves raw bytes so offline self-calibration can re-solve extrinsic angles and recover the recordings. - When municipal roadwork alters lane geometry across several downtown blocks, how does your platform turn those changes into prioritized driving assignments, and what end-to-end turnaround can it achieve? Triggers arrive via municipal work-zone feeds, fleet vehicles flagging live perception-versus-map discrepancies, or operator tickets, inserting a high-urgency
collection_requestcarrying the affected street polygon, adue_bytarget (such as 48 hours), and arepeat_everyschedule (for instance, weekly passes while cones remain active plus a completion pass). The coverage tracker immediately flags intersecting segments overdue with a deadline boost so the hourly incremental dispatcher splices them into an active nearby car's current shift (or places them at the front of tomorrow morning's tour). When map engineers need rapid visual confirmation, the car transmits a ~110 MB decimated cellular triage clip within minutes, while the depot uploader schedules those full-fidelity chunks at the head of the evening fiber queue so verified, blurred data lands well inside 24 hours. - What techniques could cut total upload volume—such as comparing live onboard sensor observations against existing map tiles before transferring full-resolution logs? Pre-load compact geometric and semantic map tiles along the assigned tour onto the vehicle, localize in real time, and evaluate a per-segment change score (unmapped 3D lidar obstacles/curb shifts, or lane markings and regulatory signs contradicting stored priors). High-confidence unchanged corridors need only ship a lightweight verification summary (~10% byte footprint: trajectory trace, sparse keyframes, decimated lidar, and a
"verified_unchanged"attestation), whereas altered or uncertain corridors ship 100% full-fidelity chunks—paired with a 5% random full-upload audit slice of unchanged corridors to continuously bound false-negative miss rates! Better still, run the initial deployment of change filtering inside the regional garage server rather than onboard: WAN fiber volume drops by the exact same factor using stronger server GPUs, while full raw chunks remain buffered locally for 3 days in case an audit pulls them. - If a regulatory takedown requires erasing a specific recording after downstream pipelines have already consumed it, how do you trace and purge every derived artifact? Query the catalog's spatiotemporal index (matching a geographic bounding polygon + timestamp range or
vehicle_id+ interval) to enumerate every rootchunk_idin scope. Next, walklineage_edgesforward (raw_chunk -> blurred_chunk -> registered_point_cloud -> map_tile_input) to gather the complete transitive closure of downstream artifacts. Purge live objects across hot and cold storage tiers, write tombstones in the catalog, and permanently destroy each root and derived object's unique envelope encryption data key (crypto-shredding, rendering copies inside immutable cold backups permanently undecipherable), then instruct map compilation to regenerate affected map tiles without those inputs and persist an immutable compliance audit receipt.
Follow-up questions
- Suppose a lidar or camera mount on one mapping car drifts out of alignment for seven days before anyone catches it. How do you uncover that silent drift, and what scope of recorded logs must be isolated?
- When municipal roadwork alters lane geometry across several downtown blocks, how does your platform turn those changes into prioritized driving assignments, and what end-to-end turnaround can it achieve?
- What techniques could cut total upload volume—such as comparing live onboard sensor observations against existing map tiles before transferring full-resolution logs?
- If a regulatory takedown requires erasing a specific recording after downstream pipelines have already consumed it, how do you trace and purge every derived artifact?
Similar questions
- Map-Collection Vehicle Fleet and Ingestion Platform
- Worldwide Low-Latency Cache for Small Image Assets
- Design an Online Matchmaker with Cancellations and Timeouts
- Low-Latency Competitive Game Pairing Architecture
- Pooled Ride-Sharing Dispatch and Trip Management Backend
- Distributed Cloud Object Storage with Buckets and Keyed Blobs
More Waymo interview questions
- Single-Source Shortest Distances to Query Nodes Medium
- Debounced Combobox Autocomplete with Async Cancellation Medium
- Comparing Sparse Incident Rates Across Unequal Mileage Medium Pro
- Fix Stale Views and RxJS Memory Leaks in Angular Medium Pro
- Validate Fleet Dispatch Readiness From Service Logs Medium Pro
- Presenting a Demanding Engineering Project and Its Core Obstacles Medium Pro
- Walk Through Your Proudest Engineering Project Medium Pro
- Map-Collection Vehicle Fleet and Ingestion Platform Hard Pro
- Worldwide Low-Latency Cache for Small Image Assets Medium Pro
- Design an Online Matchmaker with Cancellations and Timeouts Medium Pro