Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Multi-Tenant Vehicle-to-Cloud Platform

Design a system that connects vehicles to the cloud, receives their status and event messages and serves them to apps, then scale it from 50,000 to 500,000 vehicles and make it multi-tenant (one shared system serving many customer companies, called tenants, each kept apart from the others).

Problem statement

Design a vehicle-to-cloud system. If the fleet grows from 50,000 to 500,000 vehicles, how does the system scale, and how does it become multi-tenant, meaning one shared system serves many customers (tenants)?

For this exercise, assume each tenant is a company that owns or runs vehicles, such as a vehicle brand or a fleet operator, that its vehicles send status and event messages to the cloud, and that its apps read those vehicles' latest status and history. No tenant may ever see another tenant's vehicles or data.

For this exercise, also assume sending commands or software updates to vehicles, driver accounts, billing, and analytics across tenants are out of scope.

What to build

  1. A tenant registers its vehicles; each vehicle gets its own identity, such as a certificate (a signed digital ID the vehicle proves it holds), tied to that tenant, and a tenant can remove a vehicle so it can no longer connect.
  2. A vehicle connects securely and sends a status message about every 10 seconds while connected, plus event messages such as fault alerts; while offline it keeps its messages and sends them later, and no message is lost or stored twice.
  3. A tenant's apps read the latest status of one vehicle or of all its vehicles, and a vehicle's history over a time range, page by page.
  4. A tenant sees and changes only its own vehicles and data, sets how long its history is kept within the platform's limit, and one tenant's load cannot slow the others.

At scale

  • The fleet grows from 50,000 to 500,000 vehicles, and the design must work at both sizes.
  • For this exercise, assume at peak 40% of vehicles are connected at once, each sends a status message of about 1 KB every 10 seconds plus rare event messages, and a vehicle is connected about 3 hours a day on average.
  • For this exercise, assume about 50 tenants at 50,000 vehicles and about 300 at 500,000; the largest tenant has about half of all vehicles and the smallest a few dozen.
  • For this exercise, assume a status must show in tenant apps within 5 seconds, tenant apps make up to 10,000 reads a second in total, history is kept 1 year unless a tenant asks for less, and a cloud outage can drop every vehicle connection at once.