AI System Design

Design an Edge Inference Fleet

Step 1 / 9

Learn AI system design by building the platform that deploys and manages ML model inference across a large fleet of edge devices — phones, IoT sensors, retail kiosks, cars — not centralized…

The numbers to beatserver rollbacknear-instant, continuous connectivityedge rollbackeventually consistent, per-device reconnectfleet statecan be inconsistent during the window

In the interview room

How you’d open this design in an interview

Before any boxes: agree what it must do, pin the qualities that shape everything, then build — naming each trade-off as you make it. The walkthrough above is that exact order.

Functional requirements

What it must do — agree on these before drawing a single box.

  • Run inference on-device: once a device has a compressed model, it runs inference locally and offline-capable — no live connection needed for normal operation.
  • Fit the hardware: compress each model (quantization, distillation, pruning) to run within an edge device’s real memory, compute, and battery budget.
  • Roll out and roll back: stage a new model version across potentially millions of devices, and pull a bad one back — accepting that offline devices lag until they reconnect.
  • Deliver updates cheaply: ship only the changed weights and prefer WiFi/charging windows over forcing a full download over metered cellular.
  • Observe the fleet: collect lightweight, aggregate telemetry — error rates, latency, resource usage — from devices you don’t fully control.

Non-functional requirements

The qualities that shape the whole design — each one names the mechanism that buys it.

Work without a live connection
Once the compressed model is on the device, inference runs entirely locally — no per-request network latency, no per-request bandwidth cost, full function even when connectivity drops.
Fit severe on-device budgets
A Compression Pipeline (quantization, distillation, pruning) shrinks a datacenter-sized model to actually run within real memory, compute, and battery limits — trading some accuracy for the ability to run at all.
Roll back across a fleet you can’t instantly reach
A Staged Rollout Manager expands a version gradually and is designed for eventually-consistent rollback: offline devices stay on their last version until they reconnect, so the fleet can be inconsistent for an unpredictable window.
Cheap delivery at fleet scale
A Delta Updater ships only the changed weights and delivers opportunistically over WiFi/charging rather than forcing a large download over metered cellular.
Visibility into devices you don’t control
Lightweight, aggregate, privacy-conscious telemetry reported opportunistically when connectivity allows — real signal on model performance without real-time streaming or invasive access.
Self-heal a stranded device
Each device checks its own version against the Version Manifest — the known-good current version — on reconnect and pulls a correction itself, rather than trusting that a server push reached it.

The trade-offs you say out loud

Senior signal isn’t the boxes — it’s naming what you gave up and why it was the right price.

Inference on the deviceover a cloud round-trip per request

Cloud-only inference stacks network latency onto every request, scales cost directly with fleet size, and dies the instant a device loses connectivity. Running the model locally is what removes all three — the device only needs a connection to receive an occasional update.

Compress for edge (quantize, distill, prune)over shipping the full datacenter model as-is

Even capable edge hardware has memory, compute, and battery budgets orders of magnitude below a datacenter GPU, so a full-size model won’t fit or run acceptably. Compression trades some accuracy for the ability to run at all — a deployment requirement, not an optimization.

Staged, eventually-consistent rolloutover assuming instant fleet-wide rollback like a server

A server rollback works because every instance stays continuously connected; edge devices go offline, so “roll back” really means “the corrected version is waiting for each device to next check in.” Designing for the inconsistent window beats pretending reach is instant.

Delta updates + opportunistic deliveryover pushing the full model on every update

Shipping the whole model to millions of devices means enormous aggregate bandwidth and slow, battery-draining cellular downloads. Sending only changed weights, timed for WiFi/charging, cuts cost and user impact while still converging the fleet.

Device-side self-verificationover server-side straggler tracking and retry

Tracking “which devices are behind” forces the server to reconcile millions of device states and still reach each straggler. A device checking its own version on reconnect scales with no central coordination and stays robust even if the server’s tracking or a retry is imperfect.

What this teaches

Learn AI system design by building the platform that deploys and manages ML model inference across a large fleet of edge devices — phones, IoT sensors, retail kiosks, cars — not centralized datacenter serving. An interactive guide covering why every request going to the cloud fails at fleet scale, model compression to fit severe on-device resource budgets, offline-capable on-device inference, staged fleet-wide rollout that's harder than server rollback because devices go offline, bandwidth-conscious delta updates, telemetry from devices you don't fully control, graceful degradation for weaker devices, and devices that self-heal their model version on reconnect rather than trusting a push to have reached them.

Key takeaways

  • Cloud-only inference fails at fleet scale — latency, cost, and total dependency on connectivity edge devices often don't reliably have.
  • Model compression (quantization, distillation, pruning) is a deployment requirement for fitting severe on-device resource budgets, not an optional optimization.
  • On-device, offline-capable inference removes per-request latency and bandwidth cost, and keeps devices functional without a live connection.
  • Fleet-wide rollback is eventually consistent, bounded by each device's own reconnect timing — fundamentally different from near-instant server rollback.
  • Delta updates and opportunistic delivery timing respect real bandwidth and battery constraints at fleet scale.
  • Telemetry is lightweight, aggregate, and opportunistic, respecting both device constraints and privacy, within the limits of what you actually control.
  • Graceful degradation via fallback model variants serves fleet hardware heterogeneity rather than assuming one uniform target.
  • Devices actively self-check their version against a known-good manifest on reconnect, rather than passively trusting a push arrived while offline.

Concepts covered

  • Millions of devices you don't fully control
  • Every request goes to the cloud
  • A datacenter model doesn't fit on a phone
  • The device shouldn't need a live connection to function
  • You can't instantly reach every device
  • Don't push the full model every time
  • You can't SSH into a customer's phone
  • Not every device can run the latest model
  • Devices that verify, and versions that eventually sunset

Design an Edge Inference Fleet — read the full walkthrough as text

the same steps, decisions & trade-offs, for reading, reference & search

The big idea

Millions of devices you don't fully control

Datacenter inference serving assumes reliable connectivity, homogeneous hardware, and servers you can SSH into. None of that holds for an edge fleet: devices are tiny, intermittently connected, wildly heterogeneous, and you can't just log in and check what's wrong.

We'll build for that reality: model compression to fit real constraints, offline-capable inference, staged rollout that accounts for devices you can't instantly reach, bandwidth-conscious updates, and devices that verify their own state rather than trusting a push arrived.

How to read this: Each step opens with a real design decision — make the call before I show you what ships. Watch the diagram grow, hover the boxes, and at the end strand a device through a rollback window and kill the compression pipeline to see what self-heals and what degrades gracefully. Hit Begin.

Step 1 · The baseline

Every request goes to the cloud

Simplest version: every edge device sends every inference request to a central cloud server and waits for a response. What breaks at real fleet scale?

Design decision: Every inference request from every device goes to a central cloud server. What breaks at fleet scale?

The call: Latency suffers for real-time use cases, bandwidth and infrastructure cost scale directly with fleet size, and every device becomes entirely dependent on connectivity it often doesn't reliably have (a car in a tunnel, a rural sensor). — Round-tripping every inference to the cloud stacks network latency onto every request (bad for anything real-time), costs scale linearly with a potentially enormous fleet's total request volume, and — critically — the device simply can't function at all the moment its connection drops, which for genuinely mobile or remote edge devices is a common, not rare, occurrence.

Cloud-only inference stacks network latency onto every request, scales cost directly with fleet size, and makes every device totally dependent on connectivity that edge devices often don't reliably have. Real-time, cost-efficient, resilient operation requires the device to do at least some inference itself.

Edge devices need to function without a live connection: Unlike a datacenter service that can reasonably assume network reliability, an edge device's whole operating context — mobile, remote, resource-constrained — means intermittent connectivity is the NORMAL condition to design for, not an edge case.

Step 2 · Compress the model to fit

A datacenter model doesn't fit on a phone

Move inference onto the device itself. A model sized for a datacenter GPU is often far too large for an edge device's memory, compute, and battery budget. What has to happen first?

Design decision: A model built for datacenter serving is far too large for edge hardware. What needs to happen before it can run on-device?

The call: Compress the model specifically for edge constraints — quantization, distillation, pruning — trading some accuracy for the ability to run at all within the device's real memory, compute, and battery budget. — Model compression techniques shrink a model's footprint substantially, at some accuracy cost, in exchange for something that can genuinely run within an edge device's real, severe resource constraints — an explicit, deliberate trade rather than assuming the full model just fits.

Run models through a Compression Pipeline — quantization, distillation, pruning — before they're deployable to edge hardware, producing a genuinely smaller, edge-appropriate model that trades some accuracy for actually fitting within real device resource budgets.

Compression is a deployment requirement, not an optimization: For edge deployment, model compression usually isn't optional performance tuning — it's the difference between a model that can run on the target hardware at all and one that simply can't, making it a first-class step in the pipeline, not an afterthought.

Step 3 · Run inference locally, offline-capable

The device shouldn't need a live connection to function

With a compressed model deployed, should the device still call the cloud for every inference, or run entirely on its own?

The device runs inference locally, entirely offline-capable once it has the compressed model — no live connection needed for normal operation. This directly solves Step 1's core problems: no per-request network latency, no per-request bandwidth cost, and full functionality even when connectivity genuinely drops.

Move the expensive dependency to setup time, not request time: The device still needs connectivity to RECEIVE a model update — but that's an infrequent, tolerant-of-delay event, fundamentally different from needing a live connection for every single inference request in real time.

Step 4 · Staged rollout — harder than a server rollback

You can't instantly reach every device

A new model version needs to roll out to potentially millions of devices. If it turns out to be bad, how quickly can you actually undo that, compared to rolling back a server-side model?

Design decision: A bad model version needs to be rolled back across a fleet of edge devices. How does this compare to server-side rollback?

The call: It's meaningfully harder — a device that's offline during the rollback window won't receive it until it next reconnects, so the fleet can be in an inconsistent state (some devices rolled back, others still stuck on the bad version) for an unpredictable period. — Because devices aren't continuously connected the way servers are, "roll back" doesn't mean "instantly fixed everywhere" — it means "the corrected version is now available for any device that checks in," which can take an unpredictable amount of time per device, and the fleet is genuinely inconsistent in the meantime.

Use a Staged Rollout Manager that gradually expands a new version's availability, monitoring for problems before wider release — but design explicitly for the reality that a rollback isn't instantaneous across the fleet: offline devices remain on whatever version they last received until they reconnect, so the fleet can be inconsistent for an unpredictable window.

Edge rollback is eventually consistent, not instant: Server-side rollback assumes near-immediate reach; edge rollback is fundamentally an eventually-consistent process bounded by each device's own connectivity pattern — the design has to accept and plan for that lag, not assume it away.

Step 5 · Bandwidth-conscious delivery

Don't push the full model every time

Delivering a model update to millions of devices over real-world connections (often cellular, often metered or slow). Should every update ship the full model?

Design decision: Shipping a model update to millions of devices, often over cellular. Ship the full model every time?

The call: No — ship DELTA updates (only the changed weights/layers) where possible, and prefer opportunistic delivery timing (WiFi, while charging) over immediately pushing large downloads over cellular and draining battery. — Delta updates dramatically reduce the data transferred when only part of a model actually changed, and opportunistic timing (waiting for WiFi/charging rather than forcing an immediate cellular download) respects the device's real resource constraints — both meaningfully reduce cost and user impact at fleet scale.

Use a Delta Updater: ship only the changed portions of the model where possible, and prefer opportunistic delivery — WiFi, charging — over immediately forcing a large download over a device's metered cellular connection and battery.

Respect the device's real resource constraints in how you deliver, not just what you deploy: Bandwidth-consciousness applies to the UPDATE MECHANISM itself, not just the deployed model's size — a well-compressed model shipped inefficiently still costs real money and battery at fleet scale.

Step 6 · Telemetry without full device control

You can't SSH into a customer's phone

You need to know how the fleet is actually performing — error rates, latency, resource usage — but can't directly access or continuously monitor devices you don't fully control.

Collect lightweight, aggregate, privacy-conscious telemetry reported opportunistically when connectivity allows — performance and error signals, not real-time streaming or invasive device access. This respects both the device's constrained resources (telemetry shouldn't itself be a meaningful battery/bandwidth cost) and user privacy, while still giving the fleet operator real visibility into how deployed models are actually performing.

Monitor within the constraints of what you actually control: Datacenter monitoring assumes deep, continuous access to every instance. Edge telemetry has to work within genuinely limited access, connectivity, and resource budgets — a fundamentally lighter-weight, more opportunistic monitoring model.

Step 7 · Graceful degradation for weaker devices

Not every device can run the latest model

The fleet includes a wide range of device capability — some can run the newest, best model version; older or weaker devices genuinely can't.

Maintain a fallback path for resource-constrained or older devices: a smaller, older, or simpler model variant (or heuristic) for devices that can't run the latest version, rather than either forcing an incompatible deployment or leaving weaker devices with no working inference at all.

Fleet heterogeneity needs a designed-for spectrum, not one target: A fleet spanning years of hardware generations can't be served by a single model target — the system needs to support a genuine RANGE of capability tiers, gracefully matching what each device can actually run.

Step 8 · The sharp edges

Devices that verify, and versions that eventually sunset

Two real long-term risks: a device that stays on a bad version far longer than expected because it happened to be offline through the whole rollback window, and version fragmentation as the fleet accumulates many old model versions over years.

Rather than relying purely on a server push reaching every device, have each device self-check its current version against the Version Manifest — the known-good current version — whenever it reconnects, actively pulling a correction if it's out of date rather than assuming a push already arrived while it was offline. For version fragmentation, track how many devices remain on each old version over time and deliberately sunset very old versions on a defined timeline, rather than supporting an ever-growing number of historical versions indefinitely.

Design for the unhappy path: Compression pipeline down → existing fleet unaffected. A stranded offline device → self-heals on reconnect via active verification, not passive trust in a push. Version fragmentation → deliberate sunsetting, not indefinite accumulation. A fleet-management system that only works when every device stays continuously connected is a demo; one that self-heals after real-world connectivity gaps is a product.

You did it

You just designed an edge inference fleet.

  • Cloud-only inference fails at fleet scale — latency, cost, and total dependency on connectivity edge devices often don't reliably have.
  • Model compression (quantization, distillation, pruning) is a deployment requirement for fitting severe on-device resource budgets, not an optional optimization.
  • On-device, offline-capable inference removes per-request latency and bandwidth cost, and keeps devices functional without a live connection.
  • Fleet-wide rollback is eventually consistent, bounded by each device's own reconnect timing — fundamentally different from near-instant server rollback.
  • Delta updates and opportunistic delivery timing respect real bandwidth and battery constraints at fleet scale.
  • Telemetry is lightweight, aggregate, and opportunistic, respecting both device constraints and privacy, within the limits of what you actually control.
  • Graceful degradation via fallback model variants serves fleet hardware heterogeneity rather than assuming one uniform target.
  • Devices actively self-check their version against a known-good manifest on reconnect, rather than passively trusting a push arrived while offline.
built so a device offline for a bad rollback window heals itself the moment it reconnects — make the calls, strand a device, run the gauntlet.
Finished this one? 0 / 61 AI System Designs done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More AI System Designs