Reader companion · First Edition 2026 · Kubernetes · AWS FIS · Chaos Mesh · AI systems
“Chaos engineering is the practice of making those moments happen on purpose, in a controlled way.” — Preface
More: 🇫🇷 FR · 🇪🇸 ES · 🇯🇵 JP · 🇸🇬 SG · 🇦🇪 AE · ISBN: 979-8-1663-3199-1 (paperback) · 979-8-1663-3224-0 (hardcover)
Labs, prompts, validators, the Kestrel case study and the local AI lab stack: github.com/sbittla/chaos-engineering
Every answer is grounded in the book’s chapters with specific section citations.
Choose an example question above, or type your own.
Most outages come from ordinary things happening at the wrong moment: a node disappears in a traffic spike, a retry policy turns a slow database into a dead one, a new pod takes traffic before it has warmed up. Chaos engineering makes those moments happen on purpose, in a controlled way, so you find the weakness before your customers do.
AI changes the practice in two directions, and the book covers both. AI for chaos: an assistant drafts fault templates, roles, Chaos Mesh resources, load scripts and pipelines in minutes, so reviewing becomes the bottleneck. You learn to drive the work with precise, checkable prompts behind a safety contract, a validator, approvals and account guardrails. AI designs, validates and analyzes experiments; it never executes them. Chaos for AI: the same discipline is applied to GPU training jobs, inference services, retrieval pipelines, agents and guardrails, which fail very differently from a web shop.
Every lab runs against Kestrel, a fictional company with a microservice shop and an AI support assistant, and its ten postmortems. The Local route and CPU profile cover the core path without a GPU or cloud account; AWS is printed in full, with Azure and Google Cloud as binding notes.
Click the front matter, any chapter or appendix to see its opening, key takeaways and sections. Citation chips in answers scroll directly to the matching chapter.
Sections: Two halves: AI for chaos, and chaos for AI · What this book covers · Who this book is for · What makes this book different · How to Use This Book
This first chapter builds on your own experience of incidents. It sets up two ideas the rest of the book depends on: the two architectures (traditional cloud and AI infrastructure) and the case study, Kestrel, with its incident history. Chapter 2 turns both into a working lab and a no-op experiment that proves the abort path.
Sections: Distributed systems fail by interaction · What AI changes: from writing experiments to reviewing them · Two architectures · Complex systems and resilience engineering · Meet Kestrel: the case study and its incident history
Chapter 1 gave you the scientific loop, the two architectures (traditional cloud and AI infrastructure), and Kestrel with its incident history. This chapter turns them into machinery you can run: the Kestrel Commerce cluster on your laptop, the Kestrel Assist model stack in Docker, the contracts and validator every lab uses, and a golden path that proves all of it from a clean start. It ends with three labs that…
Sections: The reference environments · What it costs, and how to keep it low · Before you begin: tools and tested versions · The starter kit · The prompt chain and how to run it · The local AI lab stack: open-weight LLMs, embeddings, and a vector database in Docker
Chapter 2 gave you a working local platform, the AI lab stack, and the golden path, and Lab 2.1 showed that an abort alert makes local-abort delete a running Chaos Mesh object. That proof assumes the fault is something the abort path can see. This chapter shows what a fault actually changes in the kernel, the runtime, the proxy, the cluster, or the cloud API, and why the mechanism decides both the blast radius and…
Sections: What a fault actually does · The chaos tool landscape, and how to choose
Chapter 3 showed what a fault actually changes and how each tool reverts it, and Lab 3.1 left you with a hard lesson: a fault the stop path can’t see is never stopped. It also chose AWS FIS and Chaos Mesh. This chapter supplies the other half of stopping: a definition of steady state that says when things are no longer fine, thresholds that turn that definition into decisions, stop paths that act on them, and proof…
Sections: SLIs, SLOs, and error budgets, for deterministic services and non-deterministic AI outputs · Burn rates and how the standard thresholds are derived · Three thresholds, three jobs: acceptance, abort, SLO backstop · Stop paths · Monitors are part of the system under test · Observability for chaos
Chapter 4 gave you steady state you can measure, SLOs, stop paths whose delay you’ve timed, and monitors that abort when their own data goes missing. None of that means much without traffic: a steady state measured on an idle system and an abort alarm that never sees a request prove nothing. This chapter supplies the traffic. You build a workload model for Kestrel Commerce, learn why the shape of load matters as…
Sections: Why chaos needs load · Building a workload model from production · Open and closed load models; coordinated omission · Load profiles · Token-aware load for AI inference · What scales down, and what doesn’t · Load generator hygiene and the validity gate · Load tools and services · Composing load and faults · Validating the model
Chapter 5 gave you load you can trust and a validity gate; Chapter 4 gave you the automatic stop path and the monitors behind it. Before Chapter 7 puts a real fault into Kestrel Commerce under that load, this chapter decides where a fault may land and who may start one. It is the one home for guardrails: every later “opt-in flags (Chapter 6)” or “run controls: Chapter 6” means the controls built here. It hands…
Sections: Layers of safety: prompt, validator, approval, account, kill switch · Default deny: chaos is opt-in · The chaos-enablement flag · The global freeze flag · Authorization matrix: who may propose, approve, start, and stop · Run controls in the pipeline · The kill switch
Chapters 2 to 6 built everything an experiment needs before it touches anything: the golden path (Chapter 2), fault mechanics and cleanup (Chapter 3), SLOs and proved abort paths (Chapter 4), a validated workload model and the validity gate (Chapter 5), and, in Chapter 6, the opt-in flags, run permissions, and kill switch. This chapter spends all of that on Kestrel’s first real experiment, then steps back to decide…
Sections: One pod, under load · A fault taxonomy, including gray and correlated failures · Failure domains for traditional and AI stacks · Where to focus: pitfalls by architecture · FMEA and the risk-ranked portfolio · Writing a hypothesis · Case studies from recent outages
Chapter 7 ran Kestrel’s first real experiment by hand (Lab 7.1, the INC-2041 cold start) and built a risk-ranked backlog with an AI-assisted FMEA (Lab 7.2). Chapter 6 built the safety layers around any experiment: default deny, the chaos-enablement flag, run permissions, and the kill switch. This chapter turns the hand-run process into an engineered one: prompts that leave no gaps, context the model can trust, a…
Sections: Anatomy of a chaos prompt (C.H.A.O.S.) · Context engineering · Output contracts, schemas, and policy validation · Prompt chains and pipelines (run controls: Chapter 6) · Testing, evaluating, and versioning prompts; managing model non-determinism · Adversarial safety: prompt injection and poisoned context
Chapter 8 used AI to write automation: a prompt chain, a validator that fails closed on unsafe artifacts (Lab 8.3), an evaluation harness, and red-team cases from Kestrel’s poisoned postmortem. This chapter uses it to make decisions in the chaos lifecycle: what to test, when to stop, where the breaking point is, and what a run means. Every technique reuses Chapter 8′s contracts and validator, and Chapter 6′s rule…
Sections: Where AI fits, and autonomy levels · Hypotheses from incidents and architecture · AI-based steady state and auto-abort · Intelligent fault-space exploration · Agentic chaos operations · AI-assisted analysis and learning loops · Is the AI adding value?
Chapter 9 gave you the AI techniques for chaos: hypotheses from incidents, a composite autoabort, a search for the smallest fault that breaks an SLO, and fact-checked analysis. This chapter opens Part III by pointing them at the lowest layer a service depends on: the CPU time, memory, and storage the kernel and kubelet hand out, planned with Chapter 8′s prompt chain, stopped by Chapter 4′s stop paths, and kept…
Sections: CPU: saturation, throttling, noisy neighbors, steal · Memory: evictions and OOM kills · Disk, storage, and I/O
Chapter 10 taught how a single node’s compute, memory, and storage fail, and its Kestrel log found CPU-limit throttling on checkout. This chapter moves outward from the node to everything between services: packets, the connection tables that track them, the names that find them, and the cluster add-ons (DNS, metrics, webhooks, CNI, CSI) that every workload leans on without noticing. Two of Kestrel’s incidents live…
Sections: Network mechanisms: TCP timers, conntrack and NAT, DNS · Fault tools and the layer each impairs · Asymmetric partitions, gRPC stream resets, and HTTP/2 GOAWAY; long-lived connections during failover · The control plane and cluster add-ons
Chapter 11 tested the network and the cluster services every pod depends on: DNS capacity (INC-2156), a webhook that failed closed (INC-2188), and a metrics-server outage that froze the HPA. This chapter moves down to the nodes, then up to the chain of controllers that adds nodes and pods when load rises, and breaks Kestrel’s slowest incident, INC-2077, into that chain’s segments. Chapter 13 picks up where the chain…
Sections: Five kinds of node loss · Node switches: spot, consolidation, upgrades, architecture changes · Autoscaling: the scale-up chain
Chapter 12 ended with the scale-up chain: a spike arrives, pods go Pending, nodes launch, and new pods start cold (INC-2077). That chain is one way a system gets overloaded. This chapter asks what happens next: does the overload end when the spike or the node loss ends, or does the system keep itself overloaded? You’ll learn to find the line between those two outcomes and to move it. Chapter 14 then applies the idea…
Sections: Feedback loops and goodput · Metastable failures; a simulation you can run · Finding the tipping point safely · Defenses, one at a time (retry budgets, dropping expired work, adaptive concurrency, load shedding, backoff)
Chapter 13 gave you the metastability map: a transient trigger, load held steady, and a verdict on whether goodput comes back. It also showed that a retry budget moves the boundary and dropping expired work clears it. This chapter applies that method to the largest triggers a cloud system faces: a managed database failing over, a zone disappearing, and a region failing over. These experiments can’t be confined to…
Sections: Do not run unless · Database failover from the client’s side · Caches, brokers, and API throttling · Zone evacuation · Serverless and event-driven systems · Multi-region disaster recovery
Chapter 14 tested dependencies you don’t run from the client’s side, and Kestrel found that database client DNS caching stretched a failover well past the provider’s own. This chapter turns the same method on security controls, which are dependencies too: each claims that something will be blocked, detected, or revoked within some time. You reuse Chapter 6′s opt-in flags, freeze flag, and kill switch, Section 4.4′s…
Sections: Security controls are hypotheses too · What to test · Running security experiments safely · Experiments by layer · Securing the chaos tooling itself · Measuring security resilience
Chapter 15 asked what each security control does when its own dependency fails. This chapter asks it of every dependency: timeouts, retries, breakers, bulkheads, and fallbacks decide how a caller behaves when a callee is down, slow, flaky, or wrong, and each is a claim you can test. Chapter 13 modeled the retry loop that keeps an overload going; this chapter tests it on real clients, then moves “the system” outward…
Sections: The fault is not the symptom: the causal chain · Timeouts, deadlines, retries, and amplification · Circuit breakers, bulkheads, fallbacks · Which experiment proves which control · Header-scoped faults and header propagation · Client-side, mobile, and edge chaos
Chapter 16 followed a fault from a dependency to the user and proved the controls on the call path: timeouts, deadlines, retry budgets, circuit breakers, bulkheads, and header-scoped faults. This chapter goes inside the service and below it: the runtime that executes the code, the pools that ration its connections and threads, the data stores, caches, and queues it relies on, the pipelines that move its data, and…
Sections: Runtime, heap, and garbage collection · Concurrency and resource pools · Data stores, caches, and messaging (vector databases: Chapter 20) · Batch and streaming pipelines · Configuration, secrets rotation, certificates, time, and backups
Chapter 17 finished the application layer with backups that count only once a restore is proven and a connection pool that fails fast instead of waiting 30 seconds. Both ideas return here in a harsher form: a checkpoint is a backup that must restore under pressure, and a collective is a pool of GPUs in which one slow member sets everyone’s pace. You’ll leave with a measured baseline, a checkpoint interval you can…
Sections: The training plane: data, GPUs, collectives, checkpoints · GPUs, interconnects (NVLink, InfiniBand, RoCE, EFA), and accelerators (cloud specifics in Appendix B) · What to monitor, and telling bottlenecks apart · Lost work: checkpoint intervals and Young’s approximation · Node loss, NCCL timeouts, and elastic restart · Checkpoint storage and restore · Stragglers and gray failures · GPU errors, node health automation, and silent data corruption
Chapter 18 made Kestrel Assist’s training plane resilient: lost work bounded by the checkpoint interval, restarts proven, and a throttled GPU (INC-2210) caught by step-time outliers. Lab 18.1 also gave you the GPU telemetry this chapter reads. The other half of the GPU fleet serves requests, and it fails differently: a training job loses work, while an inference service makes people wait. This chapter tests that…
Sections: The inference plane: gateway, router, model servers (vLLM, Triton, Ray Serve), KV cache · Overload: KV cache, queueing, preemption, shedding · Scaling inference: signals, cold starts, and model-weight load time · Model gateways, rate limits, and fallbacks · Schedulers, quotas, and GPU capacity
Chapter 19 made Kestrel’s inference plane shed load honestly: under INC-2234′s long-context spike, the server returns 429 with Retry-After instead of queueing until time to first token hits 40 seconds. This chapter moves up one layer, to the applications built on that plane. A RAG service, an agent, and a guardrail all call models, and all of them can turn a slow or failed dependency into a fluent, successful, wrong…
Sections: RAG under fault: retrieval timeouts, empty or stale results, embedding service degradation · Vector databases under failure · Agents and multi-agent systems · Safety guardrails under stress · Quality under fault: evaluation sets, judge models that bypass the fault, cost per request
Chapters 7 to 20 ran every experiment in preprod or on the local profile, ending with Chapter 20′s RAG, agent, and guardrail faults, where Kestrel Assist’s empty-retrieval answers (INC-2267) and fail-open guardrail (INC-2290) were found and fixed. Every one of those results assumes that preprod behaves like production. This chapter tests that assumption, decides which results transfer, and sets the bar for running…
Sections: Two environments, two jobs · Making preprod results trustworthy · Load in preprod vs production · Earning the right to run in production · When a production experiment goes wrong
Chapter 21 decided where each experiment belongs and on what evidence (Section 21.4′s promotion record). This chapter answers what: the experiments most worth running are the ones your own outages, and other people’s, have already written down. You’ll turn Kestrel’s postmortems into hypotheses and replays, take the INC-2103 story that Chapters 13 and 16 began one step further (a replay of its mechanism on the local…
Sections: Every postmortem is a set of hypotheses · Incident → experiment mapping · Contributing factors, not a single root cause · Incident replay · External incidents as free hypotheses · Near misses · Continuous verification: the regression catalog and resilience gates · Program metrics for incident-driven chaos
Chapter 22 turned Kestrel’s postmortems into experiments: it split INC-2301 into contributing factors (Section 22.3), replayed incidents by mechanism (Section 22.4), and made passing experiments into a regression catalog and resilience gates in the pipeline (Section 22.7, the one home for gates). This chapter takes the delivery path itself as the system under test. Progressive delivery is chaos engineering’s closest…
Sections: Canary, A/B, blue/green, shadow traffic, feature flags, cells · Chaos as a canary: control vs experiment · Chaos on the delivery system · Pipeline dependencies: registry, secrets, flags; fail open or fail closed · A/B cohorts for the cost of degraded modes · Progressive delivery tools
Chapter 23 finished the production part of the book: chaos as a control-vs-experiment canary, and the delivery path as a target. Every experiment so far has tested machines and their automation. This chapter tests the people who answer when those aren’t enough: whether the alert reaches someone, whether the runbook works as written, and whether the on-call role may do what it says. It ends with the game day, where…
Sections: Culture and people: enablement, alerts, routing, runbooks, drills, blameless reviews . . 331 24.2 Game days, including multi-cloud and GPU scenarios
Chapter 24 worked on the people: drills, blameless reviews, and a game day that found a runbook step on-call couldn’t run. This chapter turns individual findings into a program that keeps finding weaknesses, turns them into verified fixes, and can prove both to leadership and to an auditor. It collects the evidence of Chapters 2–24 into one quarterly report (Lab 25.1) and writes the business case and 90-day plan…
Sections: Governance: tiers, artifacts, the life of a finding, metrics · How organizations adopted chaos engineering: case studies · Making the case: ROI, sponsorship, and the first 90 days · A chaos maturity model and adoption roadmap · The cost of chaos, including GPU economics · Compliance evidence: DORA, UK operational resilience, and for AI systems the EU AI Act and NIST AI RMF · Reporting to leadership
Chapter 25 turned single experiments into a program whose 90-day plan ends with “report and expand”. This chapter is that expansion, run by you and graded. Each project combines labs you’ve done under one set of controls, and you defend the result. It hands off to Appendices A (contracts), B (cloud mappings), and G (lab status).
Sections: How the capstones work · Project 1: Kestrel Commerce under load (Core) · Project 2: Kestrel Assist under failure (AI infrastructure) · Project 3: From outage to production canary (Production & multi-cloud) · Grading, with bands, and how safety failures cap the score · A sample submission, in outline · Capstone defense: presenting results and answering review-board questions
The contracts and templates every lab in this book uses, in one place. This appendix is the canonical source. Where a chapter shows a contract or prompt, it shows an excerpt of the version here, and if they ever differ, this appendix wins.
Sections: A.1 The C.H.A.O.S. prompt anatomy · A.2 SC-1: the Safety Contract · A.3 CP-1: the Context Pack · A.4 OC-1: the Output Contract · A.5 G-1, V-1, and A-1: the standard prompts · A.6 Experiment card template · A.7 RR-1: the run record · A.8 The chaos-enablement flag schema
Dated. Every fact in this appendix was checked against provider documentation or the sources named in “Sources, known gaps, and revision schedule” at the end of this appendix in October 2026 (research date 22 October 2026); rows that rest on secondary sources say so. Cloud services change monthly; Azure Chaos Studio in particular is mid-way through a re-platforming. Before you rely on a limit, a notice time, or a…
Sections: B.2 Kubernetes and node provisioning; GPUs, interconnects, capacity; parallel file systems · B.3 Load-testing services; monitoring and GPU telemetry; pipeline identity · B.4 Fault-action equivalence table by fault class · B.5 Index of Azure and Google Cloud lab files in the repository · B.6 Chaos tool reference: what each tool injects, how it stops, and its equivalent fault actions
This appendix, the prompt pilot report and the system prompt library, is in the full edition. Its system prompts are in the companion repository, in toolkit/contracts/prompts/ and each lab’s prompts/ folder.
Sections: Prompt Pilot Report and System Prompt Library
This appendix, additional exercises with solutions, is in the full edition.
Sections: Additional Exercises, with Solutions
This appendix, careers and the job market: what postings ask for, roles and levels, a skills matrix, and chapters mapped to roles, is in the full edition.
Sections: Careers and the Job Market
Terms are defined as this book uses them. The reference in parentheses is where the term is explained first or most fully. Acronyms are listed under the acronym, with the expansion in parentheses. Where two terms are easily confused, a “Compare” note points to the other. A-1 The standard Analyze prompt, run after every experiment. It checks run validity first, builds a timeline, and separates observed facts from…
Sections: Glossary
This appendix, lab status per route, recorded runs, fault-action permissions, and troubleshooting by symptom, is in the full edition. The data behind it is in the companion repository: each lab’s status is in its lab.yaml and in catalog/labs.yaml , and its recorded runs are under outputs/ .
Sections: Lab Verification and Traceability
Sections: Interview Question Bank
This appendix, the local AI lab stack reference: services, models, the gateway, the fault proxy, and troubleshooting, is in the full edition. The stack’s own guide is in the companion repository, in platform/ai-stack/README.md .
Sections: The Local AI Lab Stack Reference
Site reliability and platform engineers, performance engineers, backend developers, ML infrastructure engineers, security engineers, engineers adopting AI tooling for operations, and staff and principal engineers who decide where a chaos program spends its effort. You should be comfortable with Linux, containers, basic Kubernetes, one programming language and reading dashboards; no prior chaos engineering experience is needed.
In two directions. AI for chaos: an assistant can draft a complete experiment in minutes, so reviewing becomes the bottleneck; the book teaches precise, checkable prompts with a validator, a reviewer and the cloud account between the assistant and your systems. In this book AI designs, validates and analyzes experiments but never executes them. Chaos for AI: the same discipline is applied to GPU training, inference, retrieval, agents and guardrails.
No. The Local route (a kind cluster with Chaos Mesh, Prometheus and a local abort path) and the CPU profile of the local AI stack cover the core path. The AWS routes use EKS and AWS Fault Injection Service and cost money; Azure and Google Cloud are covered as binding notes with their files in the companion repository.
Safety is layered: a Safety Contract constrains the assistant, a validator rejects unsafe output, chaos is opt-in through a chaos-enablement flag, a global freeze flag and an authorization matrix decide what may run and who may start it, stop conditions and alarm-bound aborts end runs, and a kill switch carries on past failed stops. Experiments start in preprod and earn their way to production.
Yes. Part V covers training resilience on GPU fleets, inference platforms, gateways and schedulers, and AI applications: RAG, vector databases, agents and guardrails. The assistant you build in Part II runs on the same local AI stack that Part V breaks on purpose.
Kestrel is the fictional company every lab runs against: Kestrel Commerce, a traditional microservice shop, and Kestrel Assist, an AI support assistant with retrieval, an agent, a guardrail, inference and a small training job. Its ten postmortems are the book's shared evidence, each with an unverified fix to test.
The book has 76 labs, 3 exercises and 3 capstone projects, indexed in catalog/labs.yaml in the companion repository at github.com/sbittla/chaos-engineering. Every lab has a printed plan prompt and a review checklist of the mistakes AI assistants actually make.
On Amazon worldwide in paperback (ISBN 979-8-1663-3199-1) and hardcover (ISBN 979-8-1663-3224-0). The store picker on this page links to your local Amazon store.