Staging never equals production
Your staging environment is a sandbox: traffic is lower, queues are smaller, dependencies are mocked or connected to test instances. If a circuit breaker is configured with a 5-second timeout, but in staging the downstream service responds in 50ms, you'll never learn that in production a 4-second delay causes cascading failures.
This is where Chaos Engineering comes in. It's a disciplined approach: formulate a hypothesis about how your system behaves under failure, test it with controlled experiments, measure deviations from steady state, and fix weak points. Pioneered at Netflix over a decade ago with Chaos Monkey, it's not vandalism—it's engineering. Our team holds CKA and CKAD certifications (average experience: 8+ years) and has implemented chaos engineering for 30+ clients. In one case, a client reduced their incident recovery time by 60% after a single experiment revealed a misconfigured retry policy.
Why testing in staging is not enough
- Scale: Staging lacks production load, queue sizes, and network latency variations.
- Dependencies: External services may be mocked or connected to sandbox instances that behave differently.
- Configuration: Feature flags, autoscaling, and circuit breaker thresholds often differ.
Our first chaos experiment in production always uncovers something unexpected. After implementing our practices, clients see an average of 40% reduction in downtime—some up to 70%.
Principles of a chaos experiment
Before injecting any fault, answer four questions:
- Steady state: Define a measurable baseline—e.g., RPS > 1000, error rate < 0.1%, p99 latency < 500ms. Without a steady state, you have no reference.
- Hypothesis: "If we kill one of three payment-service pods, the system will continue processing with no more than a 5% error rate increase." Specific and testable.
- Blast radius: Start minimal—one pod, not the whole service. Begin in staging, then a canary (5% traffic) in production.
- Abort conditions: If error rate exceeds 5% (or any agreed threshold), automatically halt the experiment.
Choosing a Chaos Engineering tool
Tool selection depends on your stack and budget. Chaos Mesh is a CNCF open-source project with a rich set of fault types, seamless Kubernetes support, and built-in Grafana integration.
| Tool | Type | License | Kubernetes Support | Complexity |
|---|---|---|---|---|
| Chaos Mesh | Open-source | Apache 2.0 | Full | Medium |
| Litmus | Open-source | Apache 2.0 | Full | Medium |
| Gremlin | Proprietary | Commercial | Full | Low |
| ChaosBlade | Open-source | Apache 2.0 | Partial | High |
We recommend Chaos Mesh for deep integration and flexibility.
Chaos Mesh in action
Chaos Mesh is a CNCF project with a wide range of fault types:
-
PodChaos— kill or make pods unresponsive -
NetworkChaos— delay, loss, partition -
IOChaos— filesystem latency or errors -
StressChaos— CPU/memory pressure -
HTTPChaos— inject HTTP errors (503, delay, corrupt body) -
TimeChaos— skew system clock
Example: Pod failure injected once per hour:
---
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata:
name: payment-service-pod-failure
namespace: chaos-testing
spec:
action: pod-failure
mode: one
selector:
namespaces:
- production
labelSelectors:
app: payment-service
duration: "2m"
scheduler:
cron: "@every 1h"
---Example: Network delay between order-service and payment-service:
apiVersion: chaos-mesh.org/v1alpha1
kind: NetworkChaos
metadata:
name: order-to-payment-latency
spec:
action: delay
mode: all
selector:
namespaces:
- production
labelSelectors:
app: order-service
delay:
latency: "500ms"
correlation: "25"
jitter: "100ms"
direction: to
target:
selector:
namespaces:
- production
labelSelectors:
app: payment-service
mode: all
duration: "5m"If your timeout is 300ms, this experiment will expose cascading failures immediately.
Complex scenarios with Workflow
Chaos Mesh supports Workflow for multistep experiments:
---
apiVersion: chaos-mesh.org/v1alpha1
kind: Workflow
metadata:
name: db-failover-scenario
spec:
entry: failover-test
templates:
- name: failover-test
templateType: Serial
deadline: 30m
children:
- baseline-measurement
- inject-db-failure
- observe-recovery
- cleanup
- name: baseline-measurement
templateType: Task
task:
container:
image: prom/prometheus:latest
command: ["/bin/sh", "-c"]
args:
- |
curl -s "$PROMETHEUS_URL/api/v1/query?query=rate(http_requests_total[5m])"
- name: inject-db-failure
templateType: PodChaos
podChaos:
action: pod-kill
mode: one
selector:
labelSelectors:
app: postgresql
role: primary
duration: "3m"
---
What to do after a failed experiment
If the experiment shows deviation from steady state:
- Document the incident and create action items.
- Conduct a postmortem: root cause, add runbook, adjust timeout/retry/circuit breaker settings.
- Re-run the experiment after fixes.
For example, during a pod-kill experiment on a payment microservice, we discovered the retry logic used exponential backoff with no jitter, causing a thundering herd. After switching to a capped exponential backoff with jitter, p99 latency dropped from 800ms to 200ms and error rate fell from 5% to 0.1%.
Observability during experiments
Chaos without observability is flying blind. Essential setup:
- Grafana dashboard with key SLIs/SLOs open during the experiment.
- Integration: Chaos Mesh's Grafana datasource pinpoints the injection moment.
- Distributed tracing (Jaeger/Tempo) to see where errors surface in the service chain.
- Centralized logs in Loki filtered by experiment time.
Typical experiment workflow details
Standard cycle: baseline → inject fault → observe → stop → analyse. We automate with cron triggers and abort conditions.
Our implementation process
Phase 1 — Observability. No chaos without visibility. We start by setting up Prometheus, Grafana, and distributed tracing.
Phase 2 — Gameday in staging. First experiments in non-production with the team monitoring. Build muscle memory: how to run, read results, and abort.
Phase 3 — Automated experiments in off-peak. Chaos Mesh cron scheduler runs experiments at night or weekends. Blast radius is small—one pod, short duration.
Phase 4 — Continuous chaos. Experiments during business hours, gradually expanding blast radius as resilience improves.
What's included
- Audit of current observability and system state
- Chaos Mesh installation and configuration in your Kubernetes cluster
- Custom experiment scenarios tailored to your architecture
- Team training on conducting gamedays and analyzing results
- Support during the continuous chaos phase
Timeframe estimates
| Phase | Activities | Duration |
|---|---|---|
| Preparation | Observability setup, Chaos Mesh install, staging tests | 3–4 weeks |
| Production chaos | Automated experiments, runbook creation, team training | 6–8 weeks |
| Mature practice | Continuous chaos, integration with SDLC | 3–4 months |
Contact us to schedule an observability audit—without it, chaos experiments are meaningless. We'll assess your project and propose the right solution.







