- Test whether your application degrades gracefully under failure.
- Verify fallback logic (for example, returning a cached response, a friendly error, or switching to a backup service).
- Ensure timeouts and retries are implemented correctly so requests don’t hang indefinitely.
- Identify bugs, misconfigurations, or missing error handling before they become live incidents.
- Build confidence that services will operate under real-world failures (Netflix’s Chaos Monkey is a well-known example of this approach).
fault block sits at the same level as route within an HTTP route entry.
Here is a basic VirtualService that injects a delay:
app-svc. Use such a policy to observe how your application behaves under sustained latency and to validate timeouts, circuit breakers, and user-facing error handling.
Istio also supports aborting requests — returning an HTTP or gRPC error — as another fault injection type. Example:
grpcStatus for gRPC traffic.
Fault-injection options — quick reference
Correct and consistent use of percentage values
- Istio uses percent values in the range 0.0 to 100.0 (for example, 10% is
value: 10.0, not0.1).
match conditions (source labels, headers, URIs, etc.) to scope faults to specific callers, namespaces, or environments.
Use fault injection carefully in production. Start with low percentages and short delays, validate application behavior, and monitor closely. Run aggressive scenarios in staging or dedicated chaos environments before widening scope in production.
- Start small: low percentages and short durations.
- Scope faults with
matchconditions to avoid broad impact. - Monitor application and platform metrics (latency, error rates, SLOs) while testing.
- Validate fallbacks and circuit breakers before increasing fault intensity.
- Prefer running fault injection in staging or dedicated chaos environments before production.
- Istio Documentation — official reference for VirtualService and fault injection.
- Istio Service Mesh course — contextual learning resources.
- Netflix Chaos Monkey — example of large-scale chaos engineering practices.