ELLMEngineering Large
Language Models
Download PDF

Chapter 62

Incident Leadership and High-Risk Change

On this page

During an incident, leadership creates a stable decision process under incomplete information. Afterward, it converts the failure into better system structure rather than a longer list of warnings.

Establish command and information flow

Separate incident command, technical investigation, operations, and communication when scale permits. The incident commander maintains priorities and the decision log; technical leads form and test hypotheses; operations executes mitigations with verification; communication gives affected users and leaders a consistent view.

Start with user impact, scope, and trajectory. Freeze unrelated changes. Name the current mitigation, its owner, expected observation, and rollback condition. Time-box hypotheses. A busy channel with many unowned suggestions is not parallel investigation.

Maintain two clocks:

  • the mitigation clock asks how to reduce current harm safely;
  • the diagnosis clock asks what mechanism created the failure.

Do not block a safe rollback while seeking explanatory completeness. Conversely, do not declare the incident understood merely because traffic recovered. Preserve logs, traces, configurations, model and data versions, scheduler state, and the exact timeline before ephemeral evidence disappears.

Reason under partial evidence

Use an explicit hypothesis table:

Hypothesis Supporting evidence Contradicting evidence Next discriminating check Owner
KV exhaustion Allocation failures rise with context Some short requests also fail Replay by context bucket Serving lead
Bad model release Errors begin after canary expansion Old replicas show smaller spike Route matched traffic to old version Release lead
Network partition Collective timeouts cluster by rack Health probes remain green Inspect fabric counters and topology Infrastructure lead

Prefer checks that separate hypotheses over checks that merely gather more telemetry. State confidence and update it. If a mitigation increases irreversible risk—such as accepting corrupted checkpoints to restore capacity—require an explicit decision owner and containment plan.

Write a useful incident review

The review should explain the causal chain across technical and organizational layers. “Human error” is a stopping point, not a cause. Ask why the action was easy to take, hard to detect, or difficult to reverse.

Good corrective actions change one of five surfaces: prevention, detection, containment, recovery, or organizational learning. Every action needs an owner, priority, completion test, and link to the risk it reduces. Prefer a few high-leverage changes over dozens of low-confidence tasks.

Verify closure. A runbook is not complete until someone unfamiliar with the incident can execute it. An alert is not complete until replay proves it fires with useful context. A rollback is not complete until its time and state-loss behavior are measured.

Lead migrations as products

Each stage increases commitment and needs evidence from the affected workloads. The old path is retired only after exit criteria are met; rollback must account for the state already changed during adoption.
Open full diagram ↗

Each stage increases commitment and needs evidence from the affected workloads. The old path is retired only after exit criteria are met; rollback must account for the state already changed during adoption.

A migration can be implemented correctly and still fail at adoption. Treat it as a product with users, economics, compatibility, support, and an end state.

Segment adopters by complexity and value. Start with workloads that exercise the important path without requiring every exception. Provide an automated inventory, compatibility test, cost comparison, migration tooling, and staffed escalation path. Publish known gaps rather than allowing each team to rediscover them.

Track realized adoption, not announcements: eligible traffic moved, legacy capacity retired, defects by cohort, support cost, and user outcomes. Define the deprecation authority and exception process early. An indefinite dual stack doubles operational surface and drains investment from the destination.

Use progressive commitments:

  1. shadow: observe compatibility without serving results;
  2. opt-in canary: prove the path with motivated users;
  3. default for new workloads: stop creating more legacy debt;
  4. cohort migration: move bounded groups with rollback;
  5. deprecation: remove the old path after verified exit criteria.

Incident timeline: cache layout migration

A hypothetical serving release changes KV page layout while leaving the compatibility identifier unchanged.

Time Observation Interpretation/action
10:00 Candidate accepts reused prefixes from the old pool Deployment has crossed a state-format boundary
10:02 Long-context answers fail verification; short uncached requests pass Failure is correlated with reused state, not all generation
10:04 Restarting one replica temporarily removes failures Emptying the cache suppresses the trigger; it is not a root-cause fix
10:06 Candidate routing is disabled; old compatible replicas continue Contain exposure while preserving a failing trace
10:12 Old pages are decoded with new stride assumptions Earliest semantic divergence identified
10:20 New cache-format identity and incompatible-entry rejection pass replay Fix targets the boundary rather than answer symptoms

Do not announce recovery solely from the temporary post-restart improvement. Recreate cache reuse, long contexts, prefix divergence, and cancellation under the candidate. Retain the failing artifact where access policy allows; otherwise preserve redacted shape/layout metadata and a synthetic reproducer.

Rollback is a state transition

A binary rollback cannot necessarily read state written by the newer binary. The migration plan must declare whether old/new formats coexist, whether a reader can reject incompatible state, and whether invalidation or conversion is required. Keep enough old capacity to absorb the cold-cache load when rollback discards reuse.

Suppose normal traffic is 60 requests/s and warm capacity is 80/s, but cold capacity is 45/s for two minutes. A rollback without admission control accumulates roughly (60-45)*120 = 1,800 requests during that interval. The calculation assumes constant rates and no deadline abandonment; real service limits should reject or reroute work before that backlog forms.

Under the stated constant rates and no abandonment, cold capacity of 45 requests/s against 60 arrivals/s accumulates 1,800 queued requests in two minutes. Once warm capacity returns to 80/s, the 20/s surplus drains that backlog in another 90 seconds. Admission limits can prevent the buildup.
Open full diagram ↗

Under the stated constant rates and no abandonment, cold capacity of 45 requests/s against 60 arrivals/s accumulates 1,800 queued requests in two minutes. Once warm capacity returns to 80/s, the 20/s surplus drains that backlog in another 90 seconds. Admission limits can prevent the buildup.

Incident review

The corrective action is versioned cache identity plus rejection tests, not “be more careful with deployments.” The contributing process defect is that the release suite exercised new allocations but never consumed old cached pages. Add the cross-version test and assign it to the component that owns the format. Separate the causal fix from mitigations such as additional reserve capacity.

Design Exercises

  1. What roles and information flows would you establish during a fleet-wide inference failure?
  2. How do mitigation and diagnosis proceed without blocking each other?
  3. Turn “operator error” into a causal investigation.
  4. Design completion tests for three incident actions.
  5. What metrics show that a platform migration has produced realized leverage?