Design a Multi-Tenant Vehicle-to-Cloud Platform Scaling from 50,000 to 500,000 Cars
Company: Rivian
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design a vehicle-to-cloud system that connects the software running in each car to cloud services. Start with today's fleet of 50,000 cars. Then explain how the system scales when the business grows to 500,000 cars, including how it supports multiple tenants.
### Clarifying Questions
- What flows over the connection: telemetry from the car, commands to the car, software updates, or all of these?
- How often does each car send data, how large are the messages, and which data is urgent?
- How quickly must a command reach a car, and what should happen when the car is offline?
- Who are the tenants: separate business customers with their own fleets, different vehicle brands, or internal teams? What isolation does each one need?
- How long must raw data be kept, and who queries it?
### Part 1: Vehicle-to-cloud architecture
Design the end-to-end system for the current fleet of 50,000 cars: the software on the vehicle, the connection, ingestion, storage, processing, and the path from the cloud back to a car.
```hint Cars are unreliable clients
Cars lose coverage, reconnect all at once after an outage and run old software versions. Decide what a car does with data it cannot send yet, and how the cloud knows which car it is talking to.
```
#### What This Part Should Cover
- The on-vehicle agent: buffering, batching, priorities and identity.
- The connection protocol, authentication and the ingestion pipeline.
- Storage for latest state, recent time series and long-term data, and a downlink path with acknowledgements.
- Failure handling and observability.
### Part 2: From 50,000 to 500,000 cars with multiple tenants
The business grows from 50,000 to 500,000 cars. How does the system scale, and how does it support multiple tenants?
```hint Find what breaks at ten times
List each component's limit (open connections, messages per second, storage growth, per-car state) and check which ones a tenfold increase crosses.
```
```hint Isolation has a price
Compare sharing everything with a tenant ID on every record against giving some tenants their own resources, and decide which tenants get which.
```
#### What This Part Should Cover
- Capacity estimates at both sizes, and the components that must change.
- A horizontal scaling unit, such as partitions or cells, and how cars are mapped to it.
- A multi-tenancy model: data isolation, quotas, protection from noisy neighbors and per-tenant cost.
- A migration path from the current system without downtime.
### What a Strong Answer Covers
- Estimates that drive the design choices.
- Clear separation of the uplink, downlink and storage paths, with their latency needs.
- Security of vehicle identity and of each tenant's data.
- Operability: reconnect storms, backpressure and monitoring per tenant.
### Follow-up Questions
- A regional cellular outage ends and 100,000 cars reconnect within a minute. What happens, and how do you protect the system?
- A tenant requires its data to stay in one country. How does the design change?
- How would you roll out a configuration change to 500,000 cars safely?
- A firmware bug makes one tenant's cars send ten times their normal volume. How do you contain it?
Overview: Design a vehicle-to-cloud platform that connects a fleet of cars to cloud services, then scale it from 50,000 to 500,000 cars while supporting multiple tenants. It tests device identity and connectivity, ingestion and storage design, capacity estimates, horizontal scaling units and tenant isolation.
Read the full Rivian Software Engineer interview experience this question came from