ARR-OTA All articles
Engineering Deep Dive

Your Fleet Is a Lab: Running Controlled Experiments on Devices With OTA Channels as Cohorts

ARR-OTA
Your Fleet Is a Lab: Running Controlled Experiments on Devices With OTA Channels as Cohorts

Photo: ProjectManhattan, CC BY-SA 3.0, via Wikimedia Commons

Software teams A/B test everything: button colors, checkout flows, subject lines. Hardware teams, by contrast, tend to treat the fleet as a liability to be managed rather than an instrument to be used. That's a mistake. A connected product with 200,000 units in American living rooms, garages, and HVAC closets is a distributed laboratory with better ecological validity than any test rig you could build.

The catch is that experimentation infrastructure for hardware can't be borrowed from the web. You have to build it into the OTA pipeline itself.

Update Channels Are Cohort Assignment

Most OTA systems already support channels — stable, beta, internal. Extend that concept. Instead of channels that describe software maturity, define channels that describe experimental treatment. When a device checks in, the update server assigns it to a cohort based on a stable hash of its device ID. That hash is the entire assignment mechanism: deterministic, replayable, and immune to the client-side clock skew that plagues time-based rollouts.

The critical design decision is separating assignment from delivery. A device assigned to cohort B should receive the same firmware image as cohort A, but with feature flags resolved differently at runtime. Shipping two divergent binaries means every code path difference is also an update-path difference — you can no longer tell whether a metric moved because of the feature or because of a diff algorithm edge case in the delta generator.

Feature Flags at the Firmware Layer

Flagging in firmware is harder than flagging in a web app, mostly because flash and RAM budgets are unforgiving. Three practical patterns:

  1. Compile-time flags with a shared binary. Build one image containing all variants, gate branches on a flags byte stored in a reserved flash region. The update server writes that region during provisioning. Cost: a few hundred bytes. Works down to the smallest Cortex-M0 parts.
  2. Configuration push. Flags live in a signed JSON or CBOR blob delivered over the existing OTA transport, decoupled from firmware versions entirely. This lets you kill a bad experiment without shipping a new image — essential when a full rollout cycle takes days.
  3. Lazy evaluation. On memory-constrained devices, resolve flags once at boot and cache the result. Never evaluate experiment branches in a hot loop; the branch cost is trivial but the testing surface explodes.

Whatever pattern you choose, flags must be cryptographically signed like firmware. An unsigned config channel is a second, softer attack surface into every device you've ever shipped.

The Statistics of Small Cohorts

Here's where hardware experiments go wrong. A web team can put 50,000 users in each arm by lunchtime. If your fleet is 8,000 thermostats and you split it 90/10, your treatment group is 800 devices — and device-level metrics are noisy.

Power draw is the worst offender. A connected plug's standby consumption varies with firmware, yes, but also with the neighbor's Wi-Fi channel congestion, seasonal HVAC load, and whether the owner went on vacation. Your signal-to-noise ratio is brutal. A few rules that hold up:

Measuring What the Device Actually Experiences

The payoff of fleet-scale experimentation is that you measure ground truth instead of proxy metrics. Lab benches measure current draw with a power analyzer; the fleet measures battery life as your users actually experience it — including the effect of a mesh network with 2% packet loss and a router that reboots nightly.

Instrument accordingly. Ship telemetry for reconnect frequency, RSSI histograms, watchdog resets, and time-to-first-successful-report after boot. These are the outcomes that determine whether a feature works in Ohio in February, not just on your desk in San Francisco.

One governance note: experiment cohorts are still customers under FTC jurisdiction. If a cohort changes how a device behaves in a way a reasonable owner would notice — new sounds, changed LED behavior, altered responsiveness — disclosure obligations don't vanish because the assignment was random.

Start Small, Start Honest

You don't need a data science team to begin. Pick one metric you already collect, split 5% of the fleet via a device-ID hash, and run for a fixed window. The infrastructure you build — assignment, flags, measurement, and the discipline of pre-registration — becomes the backbone for every future release decision.

Your competitors are guessing whether their new power-management scheme works. You could just measure it.

All Articles

Related Articles

The 1% Fleet: Engineering Progressive Deployment for Devices That Can't Run Kubernetes

The 1% Fleet: Engineering Progressive Deployment for Devices That Can't Run Kubernetes

The 40KB Firmware Update: How Binary Diffing Slashes OTA Costs at Fleet Scale

The 40KB Firmware Update: How Binary Diffing Slashes OTA Costs at Fleet Scale

Shipping Into the Void: OTA Design for Devices Owners Forgot They Own

Shipping Into the Void: OTA Design for Devices Owners Forgot They Own