Fault Injection
ELI5 — The Vibe Check
Fault injection is deliberately adding errors to your system to test how it responds. Add 500ms latency to database calls. Return 500 errors from an API randomly. Kill a container mid-request. It's the 'what if' testing that reveals whether your error handling actually works.
Real Talk
Fault injection is a testing technique that introduces specific failures into a system to verify error handling and resilience mechanisms. Types include network faults (latency, packet loss, disconnection), process faults (crashes, resource exhaustion), and application faults (error responses, corrupted data). Tools like Toxiproxy, Istio fault injection, and Chaos Mesh automate fault scenarios.
When You'll Hear This
"Inject 2-second latency on the payment service to test timeout handling." / "Fault injection proved our circuit breaker opens correctly when the downstream service fails."
Related Terms
Chaos Testing
Chaos testing is intentionally breaking things in production to see if your system can handle it. Kill a server. Slow the network.
Circuit Breaker
Circuit Breaker is like the electrical circuit breaker in your house.
Timeout Pattern
The timeout pattern is setting a deadline for operations. If a database query or API call takes too long, cancel it and return an error.