[ SRE_ARENA ]
RESILIENCY PATTERNS

Assume everything will fail. Build Bulkheads.

Visualization: 1. Cascading Failures & Circuit Breakers
DOWNLOADING CONCEPT: 1. CASCADING FAILURES & CIRCUIT BREAKERS...
  • ↳In a distributed system, if Service A calls Service B, and Service B is slow, Service A will wait.
  • ↳As more requests come in, Service A exhausts all of its threads waiting for B.
  • ↳Service A crashes.
  • ↳Now Service C, which calls Service A, crashes.
  • ↳This is a Cascading Failure.
  • ↳We stop this using a Circuit Breaker.
  • ↳If Service B fails or times out 5 times in a row, the circuit 'opens'.
  • ↳Service A stops trying to call Service B entirely, immediately returning an error (or cached fallback data).
  • ↳This protects Service A from thread starvation and gives Service B time to recover without being hammered by traffic.
▲ LIVE INCIDENTThe payment gateway is returning 503 Service Unavailable, and the entire checkout flow is timing out.
sre@arena:~/resiliency-patterns
sre@arena:~$ istioctl proxy-config cluster checkout-service | grep payment