The user wants to build a "chaos exercise cadence" which is a schedule or plan for conducting Chaos Engineering experiments.
The plan needs to cover three specific areas:
- Injections: What kind of failures to introduce.
- Blast Radius Caps: How to limit the scope of the damage to ensure safety.
- Learnings: How to capture and use the results of the experiments.
The structure should be practical, actionable, and progressive (start small, get bigger). It needs to act as a template or a framework that can be adapted to different systems.
1. Conceptual Framework (The "Cadence"):
- Chaos engineering isn't a one-time event; it's a practice. It needs a rhythm.
- Frequency: Weekly or bi-weekly is standard for critical paths, monthly for game days.
- Progression: Unit level -> Service level -> Cluster/Region level.
2. Designing the Cadence (Phased Approach):
I should organize this into a maturity model or a phased rollout (e.g., Level 1: Local, Level 2: Staging, Level 3: Production).
- Phase 1: The "Smoke Test" (Dev/Staging) - High frequency, low risk.
- Phase 2: The "Game Day" (Staging/Prod) - Planned, medium frequency, medium risk.
- Phase 3: "Continuous Chaos" (Prod) - Automated, background, strict guards.
3. Fleshing out the components for each phase:
4. Structuring the Response:
I will structure the response as a 4-Week Rolling Cadence to give the user a concrete starting point. This is more useful than just a list of definitions. Then, I'll provide the rules for safety and analysis.
- Introduction: Define the goal (Resilience > Uptime).
- The Cadence Schedule (The "Calendar"):
- Week 1: Infrastructure/Resource (Pod kills, CPU).
- Week 2: Network/Dependencies (Latency, DB cut-off).
- Week 3: Application/State (Bad code deploy, bad data).
- Week 4: Game Day / Multi-region (The big one).
- The Mechanics (The 3 components requested):
- Injections: Categorize them.
- Blast Radius Caps: Define the "Safety Switches."
- Learnings: Define the "Post-Mortem" process.
- Tooling (Optional but helpful): Mention Gremlin, Chaos Monkey, Litmus.
5. Refining the Content (Self-Correction during drafting):
- Critique: Just listing injections is boring. I should group them by type of failure.
- Critique: "Blast Radius" needs to be very specific about "Stopping Conditions." I need to emphasize automated halt conditions.
- Critique: The "Cadence" implies time. I will suggest a "1-2-4" frequency model (1 weekly, 1 monthly, 1 quarterly).
6. Drafting the specific sections:
-
Injections:
- Pod Kill: The classic "Chaos Monkey."
- Resource Exhaustion: CPU/Mem.
- Network: Latency, dropped packets, DNS failure.
- Dependency: API unavailable.
-
Blast Radius:
- Start with 1 instance.
- Move to 10%.
- Never go 100% unless it's a failover test (and even then, be careful).
- Use "Business Hours Only" rule (for beginners).
-
Learnings:
- "Hypothesis vs Reality."
- Did the on-call get paged? (Crucial).
- Update the Runbook.
7. Final Polish:
Ensure the tone is authoritative but safety-conscious. Use formatting (bolding, lists) to make it readable.
Self-Correction: The user asked for a "cadence." I will build a "12-Week Rolling Program" structure. It sounds professional and structured.
- Weeks 1-4: Foundation (Pods/CPU)
- Weeks 5-8: Dependencies (Network/DB)
- Weeks 9-12: Complex (Region failover/State)
Actually, a Recurring Cadence is better than a 12-week one-off.
- Daily: Automated synthetics (Passive).
- Weekly: Automated small injections (Pod kills).
- Monthly: Game Days (Planned manual events).
- Quarterly: Disaster Recovery drills.
I will stick to the Daily/Weekly/Monthly cadence as it fits a modern DevOps cycle better.
8. Final Review against User Prompt:
- Injections included? Yes.
- Blast Radius Caps included? Yes.
- Learnings included? Yes.
Let's write it out.
To build a successful Chaos Engineering practice, you must move away from "breaking things for fun" and toward a structured Cadence of Resilience.
Here is a blueprint for a chaos exercise cadence, structured by frequency (Continuous, Weekly, Monthly, Quarterly) with specific injections, safety caps, and expected learnings.
The Cadence Framework
1. Continuous Chaos (The "Background Radiation")
Frequency: Daily / On every deploy
- Goal: Catch regressions in basic redundancy immediately.
- Scope: Automated, scoped to single zones or specific canary instances.
| Injection | Blast Radius Caps | The Learning |
|---|
| Terminate Instance (Pod/EC2) | Count: 1 instance at a time.Timing: During business hours (never at night).Halt Condition: CPU > 85% on remaining nodes. | Autoscaling Works: Does the cluster recognize the death and replace it immediately?Statelessness: Did we lose user data when the pod died? |
| CPU/Memory Saturation | Scope: One specific microservice (canary).Limit: Burn at 80% for 5 minutes. | Graceful Degradation: Does the service shed load or fail timeouts? Does it crash the host (OOM) or throttle safely? |
2. Tactical Weekly (The "Drills")
Frequency: Once a week (Mid-week, Mid-day)
- Goal: Test network resilience and dependency stability.
- Scope: Single applications or specific dependency pairs.
| Injection | Blast Radius Caps | The Learning |
|---|
| Network Latency (Jitter) | Magnitude: 100ms - 500ms added latency.Filter: Only traffic tagged chaos-test=true. | Timeouts & Retries: Does the calling service hang (thread pool exhaustion) or back off gracefully? Are retry storms occurring? |
| Dependency Block (Blackhole) | Target: One critical downstream dependency (e.g., Redis or DB).Strategy: Drop 100% of packets to that port. | Circuit Breakers: Does the UI show a generic error, or does the app cache locally/fail open? Does the rest of the system stay alive? |
| Clock Skew | Magnitude: +/- 5 minutes.Scope: One node. | Token Validity: Do authentication tokens (JWT/OAuth) fail immediately? Do logs get lost due to time sorting issues? |
3. Strategic Monthly (The "Game Days")
Frequency: Once a month (Planned event)
- Goal: Test complex state transfers and database resilience.
- Scope: Critical paths (Checkout, Login, Payment).
| Injection | Blast Radius Caps | The Learning |
|---|
| Availability Zone (AZ) Failure | Scope: Sever network connectivity to one entire AZ.Prereq: Verify remaining AZs have < 70% capacity headroom. | Multi-AZ Architecture: Does DNS/Load Balancing shift traffic instantly? Do we lose in-flight messages in queues located in that AZ? |
| Database Failover (Primary to Replica) | Strategy: Force promotion of a read replica.Guardrail: Run during lowest traffic hour of the month. | Replication Lag: Did we lose committed transactions?App Config: Does the app automatically discover the new writer endpoint, or is it hardcoded? |
4. Disaster Quarterly (The "Siege")
Frequency: Once a quarter
- Goal: Test human response, runbooks, and cross-team communication.
- Scope: Cross-region or full-stack events.
| Injection | Blast Radius Caps | The Learning |
|---|
| Region Evacuation | Strategy: Divert 10% of traffic to DR (Disaster Recovery) site.Cap: Do not exceed 20% traffic shift initially. | Data Consistency: Is the database in the DR region actually consistent with Primary?Cost & Capacity: Does the DR region scale up under load without crashing the billing budget? |
| Cache Stampede | Strategy: Flush all caches (Redis/CDN) simultaneously.Safety: Ensure DB can handle raw throughput (check read IOPS). | Thundering Herd: Does the database crash under the sudden load of missed cache reads? Do we have "cache warmup" procedures? |
The Operational Rules
To run this cadence successfully, you must adhere to three operational rules:
1. The "Blast Radius" Maturity Model
Do not jump to Region failures. Progress your blast radius like an onion:
- Level 1: Single Pod/Container.
- Level 2: Single Node/VM.
- Level 3: Availability Zone (Subset of cluster).
- Level 4: Entire Region.
2. The "Steady State" Guardrail
You cannot measure chaos without a baseline. Before injecting, define "Steady State" (e.g., Users can log in within 200ms).
- If Steady State holds: The experiment is a success (system is resilient).
- If Steady State breaks: Stop the injection immediately (Auto-Halt). This is a learning opportunity, not a failure.
3. The Learning Protocol (Post-Mortem)
Every exercise ends with a documented entry into your Chaos Log:
- Hypothesis: "We believe that if Redis dies, the app will serve stale data."
- Result: "The app crashed because the Redis library threw an unhandled exception."
- Action Item: "Patch the Redis wrapper to catch connection errors and return null/cache." (Assign a ticket immediately).