30  Lab: Production Ops

reference-architectures
production
management
lab

30.1 Start With One Operations Rehearsal

A production lab should rehearse the moment when an operator changes fleet state and then has to prove what happened. Commands, acknowledgements, observations, exceptions, and rollback all belong in the same record.

Start simple: define one cohort, one intended state change, one observation window, and one rollback rule. The rehearsal succeeds when the record distinguishes requested state from actual state.

In 60 Seconds

This lab is a production-readiness rehearsal, not a board-specific programming exercise. You will work through a realistic fleet scenario and produce proof records for device state, command acknowledgement, remote update status, degraded operation, observability, support ownership, and recovery decisions. The lab outcome is a decision record that can be reused before a real rollout.

30.2 Learning Objectives

By the end of this lab, you will be able to:

  • Build a device-management proof record for a production fleet scenario.
  • Distinguish reported state, requested state, command status, and operator action.
  • Check whether a remote update process can be staged, observed, paused, and recovered.
  • Identify degraded-mode behavior when service connectivity, command delivery, or measurement trust changes.
  • Produce a lab decision record with proof, owner, uncertainty, and review trigger.

30.3 Which Lab Signal Proves The Change?

MVU: Minimum Viable Understanding

Core concept: A production lab should prove that operations can manage change, not only that telemetry can be displayed.

Why it matters: Many device fleets fail in the gaps between normal telemetry and real operations: stale state, unacknowledged commands, partial updates, missing recovery signals, unclear alert ownership, and devices that keep acting after their context has changed.

Key takeaway: Treat each lab step as a proof question. What signal proves the device is healthy, what signal proves the requested change happened, and what action happens when the signal is missing?

30.4 Production Readiness Needs Proof

A production lab is not finished when a dashboard shows fresh telemetry. It is finished when the team can prove how the fleet behaves during normal service, requested changes, partial failures, and recovery.

This chapter treats device management as an evidence chain: reported state, requested state, command state, update state, degraded behavior, support ownership, and the trigger that forces the decision to be reviewed again.

Use the lab to rehearse a real rollout question. In a cold-room fleet, a gateway may keep sending temperature readings while a firmware update fails validation and a configuration command remains queued. The dashboard looks alive, but operations still lacks proof that the requested change reached the device, was accepted, completed safely, or has an owner for recovery.

The lab therefore asks learners to keep state types separate. Reported state says what the device last claimed. Requested state says what the operator wants. Command state says whether an action is queued, delivered, accepted, completed, rejected, or timed out. Update state says whether the staged change is downloaded, installed, validated, paused, recovered, or waiting for support.

The final decision should be conservative. A rollout can proceed only when the team can explain what signal proves health, what signal proves change, what signal proves degraded behavior is bounded, and what condition forces another review before expansion.

That proof should be tied to named tools or records rather than vague confidence. Examples include a device twin or shadow document, an MQTT command acknowledgement topic, an update campaign record, gateway store-and-forward logs, an alert ticket, and a support closure note. The exact platform can vary, but the state distinctions must remain visible.

Keep screenshots as supporting evidence, not as the primary state model.

Production lab proof record with fields for scenario, state proof, command proof, update proof, degraded behavior, observability, owner, decision, and review trigger.
The production lab record connects state proof, command proof, update proof, degraded behavior, ownership, and the decision trigger.

30.5 Operations Rehearsal Record

For each rehearsal, capture the fleet boundary, device role, gateway or local role, remote service role, command path, update stage, degraded-mode rule, observability signal, support owner, open uncertainty, and next action.

The record should separate what was requested from what was delivered, accepted, completed, rejected, timed out, recovered, or assigned to support. That separation is what turns a lab run into rollout evidence.

Start with a narrow fleet boundary, such as five cold-room nodes behind one gateway and one support queue. Record the device identifiers, firmware families, command target group, expected sampling policy, update candidate group, and support owner before running the rehearsal. If the boundary is unclear, later proof cannot show which devices were actually covered.

For command proof, write the command lifecycle as a small ledger: request created, queued, delivered, accepted, applied, completion observed, timeout handled, support owner assigned, and closure proof captured. A missing acceptance signal should leave the command unverified even if telemetry continues. A duplicate or late acknowledgement should be tied to a command id so it cannot close the wrong action.

For update proof, record staged delivery separately from health validation. A device can download the package but fail boot validation, report an unexpected restart reason, or lose measurement trust after the update. The record should name the pause rule, recovery action, excluded devices, and evidence required before the next rollout stage.

For degraded operation, note which behavior continues locally, which behavior is blocked, what is buffered, and how support sees the degraded period. A gateway may keep collecting readings while refusing new policy commands until service connectivity and command acknowledgement are trustworthy again.

Close the rehearsal with a decision that another operator can audit: proceed, pause, narrow the fleet, repeat one proof path, or assign support work. The decision should name the owner, the open uncertainty, the signal that will close it, and the date or event that triggers the next review.

30.6 State Types Prevent Guesswork

Reported state describes what a device last said. Requested state describes what the operator wants. Command state describes the lifecycle of an action. Update state describes staged change and health proof. Support state describes who owns the unresolved work.

When those state types collapse into one dashboard field, operators can mistake queued for delivered, delivered for accepted, accepted for completed, or stale for healthy. The lab forces those distinctions before rollout depends on them.

Under the hood, each state type has a different clock and source of truth. Reported state has freshness and identity constraints. Requested state belongs to the service or operator record. Command state should be linked to a command id, target, delivery attempt, acknowledgement, completion proof, and timeout. Update state should be linked to package identity, install phase, validation result, restart reason, and rollback or recovery path.

The lab should also model stale and conflicting state. If a device reports old firmware after the service requested a new version, the system should not silently call it healthy. If a command is accepted but no completion signal arrives, support needs a timeout path. If a gateway buffers readings during service loss, the remote service should mark the period as degraded rather than treating late data as normal live telemetry.

These distinctions make incident review possible. Operators can ask whether the defect was a stale report, failed command delivery, rejected device action, incomplete update validation, local fallback behavior, or support handoff gap. Without separate state types, every failure looks like a generic device problem.

Versioning matters as well. The lab record should identify the command schema, firmware package, gateway policy, and dashboard query used during the rehearsal. If any of those versions change before rollout, the old proof should be treated as background evidence, not automatic approval.

30.7 Prerequisites

Use these chapters as needed:

30.8 Lab Scenario

A regional monitoring team has completed a working pilot. Devices report condition data through local gateways to a remote service. The team now needs to rehearse production operations before a wider rollout.

The lab question:

Can the team prove that device state, command handling, remote updates, degraded operation, and recovery are observable and owned before rollout?

This lab does not require a simulator. Use the prompts and records below to check a design, a prototype log, a whiteboard scenario, or a small bench test.

30.9 Lab Route

Follow the route in order. Each step produces a small piece of proof for the final decision record.

Production lab route from scenario through fleet state, command acknowledgement, update rehearsal, degraded operation, observability, and a decision record.
Figure 30.1: Production device management lab route
  1. Set the scenario: name the fleet, operating context, device role, gateway role, remote service role, and support owner.
  2. Build the state record: separate reported state, requested state, command state, update state, and support state.
  3. Rehearse command acknowledgement: trace request, delivery, validation, action, response, and timeout behavior.
  4. Rehearse remote update status: trace selection, staged delivery, health validation, pause criteria, and recovery action.
  5. Check degraded operation: define local behavior when service, connectivity, command, or measurement trust is degraded.
  6. Close with proof: record signals, owners, uncertainty, and the review trigger.

30.10 Step 1: Fleet State Record

A production system needs state records that explain the difference between what the device says, what the operator wants, what command is pending, and what support action is open.

Fleet state model separating reported state, requested state, command state, update state, and support state, all feeding a decision record.
Figure 30.2: Fleet state record model

Reported state

What the device or gateway last reported: health, configuration, measurement validity, local buffer state, firmware family, restart reason, and identity state.

Requested state

What the operator or service expects the device to do: configuration target, policy target, update target, sampling behavior, or local rule.

Command state

Whether a command is queued, delivered, accepted, rejected, completed, expired, or waiting for support action.

Support state

Who owns the next action, what proof they need, and what closes the issue.

State decision prompts:

  • Which fields are safe to use for decisions, and which fields are only diagnostic?
  • How old can a state value be before it is considered stale?
  • What shows whether a requested state has been applied or rejected?
  • Which state changes require an alert, a ticket, or a rollout pause?
  • What proof links a physical asset to the digital state record?

30.11 Command Acknowledgement Rehearsal

Commands are production actions. A lab should prove that the system can explain each command outcome without relying on guesswork.

Command acknowledgement path showing request, queue, delivery, validation, action, acknowledgement, timeout, and support decision.
Figure 30.3: Command acknowledgement rehearsal

Use this command decision worksheet:

Command decision

Command purpose:
Target device or group:
Required precondition:
Delivery signal:
Acceptance or rejection signal:
Completion signal:
Timeout behavior:
Retry rule:
Operator action if missing:
Proof to keep:

Strong command proof answers four questions:

  • Did the command reach the right target?
  • Did the device understand and accept the command?
  • Did the requested action complete?
  • What happens if acknowledgement is missing or late?

30.12 Step 3: Remote Update Rehearsal

Remote updates require staged proof. The lab should show how a change moves from selected devices to wider rollout only after health proof supports the next stage.

OTA Firmware Update Architecture: Cloud Server to Device Fleet, CLOUD UPDATE SERVER, Firmware Repo, Binary storage, Version Mgmt, v1.0 → v2.0, Rollout Control, Canary / Staged, Dashboard
Figure 30.4: OTA Firmware Update Architecture

Update rehearsal checklist:

  • Define the candidate group and why it is representative.
  • Confirm devices can report download, install, restart, validation, and steady-state health.
  • Define pause criteria before the run starts.
  • Define rollback or recovery action before the run starts.
  • Record which devices are updated, pending, paused, recovered, or excluded.
  • Link the update record to support and incident analysis if any device enters an unexpected state.
Lab Stop Condition

Pause the rollout rehearsal if a device cannot report whether it is running the old version, applying the new version, validating health, recovering, or waiting for support. A missing status signal is itself a production defect.

30.13 Step 4: Degraded Operation Decision

Production devices should have defined behavior when a dependency is degraded. The lab does not need to prove every failure mode; it should prove that degraded behavior is deliberate and observable.

Degraded operation decision showing normal operation, lost service, weak command delivery, suspect measurement, local fallback, buffered proof, and recovery check.
Figure 30.5: Degraded operation decision

Service unavailable

What local behavior continues, what proof is buffered, and what action is blocked until service returns?

Command uncertain

How does the system avoid repeating unsafe or duplicate commands when acknowledgement is missing?

Measurement suspect

What marks data as suspect, what fallback rule applies, and who checks the measurement trust issue?

Recovery observed

What signal proves the device or gateway returned to normal operation, and what record explains the degraded period?

30.14 Observability and Support Owners

The lab is incomplete until the team can show how signals become action.

Minimum observability proof:

  • Device signal: health, state freshness, restart reason, update state, command state, local buffer state.
  • Gateway signal: connected devices, queue state, rejected messages, local policy state, store-and-forward behavior.
  • Service signal: ingestion health, command delivery health, update campaign health, alert status, rejected actions.
  • Support signal: owner, severity, expected response, next action, closure proof, recurrence check.

30.15 Worked Lab: Cold-Room Monitoring Fleet

Scenario: A cold-room monitoring pilot is ready for regional rollout. The pilot proved measurement collection. The lab now checks production operations.

Lab run:

  • The team creates a state record with reported state, requested state, command state, update state, and support state.
  • A configuration command is sent to a small group. The team records delivery, acceptance, completion, timeout behavior, and support action.
  • A remote update rehearsal is staged for a representative group. One device reports validation failure, so the rollout pauses and the recovery path is documented.
  • A gateway service interruption is simulated. Devices continue local record collection, the gateway buffers events, and the decision record marks the degraded period.
  • The final record names the support owner, the open uncertainty, and the next review trigger.

Decision: The rollout does not advance until status signals are reliable enough to distinguish delivered commands, accepted commands, completed commands, update validation, recovery, and support closure.

30.16 Lab Proof Record

Use this record at the end of the lab.

Production lab proof record with fields for scenario, state proof, command proof, update proof, degraded behavior, observability, owner, decision, and review trigger.
Figure 30.6: Production lab proof record
Production lab proof record

Scenario:
Fleet boundary:
Device role:
Gateway or local role:
Remote service role:
State proof:
Command proof:
Update proof:
Degraded behavior:
Observability signals:
Support owner:
Decision:
Open uncertainty:
Review trigger:
Next action:

30.17 Knowledge Check: Lab Proof

30.18 Match Lab Proof to Purpose

30.19 Order the Lab Decision

Common Pitfalls

Counting requests as completion

A queued command or requested state change is not proof that the device accepted or completed the action.

Testing only the happy path

The lab should include missing acknowledgement, failed validation, stale state, and degraded connectivity.

Hiding local behavior

When a remote dependency is degraded, the device or gateway still needs defined local behavior and traceable proof.

Leaving support ownership vague

Every alert or failed state needs an owner, expected action, and closure proof.

Mixing state types

Reported, requested, command, update, and support state answer different questions. Mixing them makes incidents hard to diagnose.

Approving rollout without review triggers

The final record should state what condition requires the decision to be checked again.

Key Concepts

  • Reported state: What the device or gateway last reported about health, configuration, and operating condition.
  • Requested state: What the operator or remote service expects the device to apply.
  • Command acknowledgement: Proof that a command moved from request to delivery, acceptance, completion, rejection, timeout, or support action.
  • Update validation: Proof that a staged remote change is healthy enough to continue or must pause.
  • Degraded operation: Defined local behavior when service, connectivity, command delivery, or measurement trust is impaired.
  • Lab proof record: The artifact that links scenario, signals, owner, decision, uncertainty, and next action.

30.20 Summary

This lab turns production device management into a traceable proof workflow. The learner practices separating state types, tracing command acknowledgement, rehearsing staged update status, defining degraded operation, and closing the exercise with an owner and review trigger. The goal is operational clarity: the team should know what happened, what proof shows it, who owns the next action, and when the decision must be checked again.

30.21 See Also

30.22 What’s Next

Continue with Production Resources to consolidate production questions, or return to Production Architecture Case Studies when a lab result needs a deeper proof check.