Core Concept

Circuit Breakers, Retries, & Bulkheads

Distributed resilience patterns protect systems against downstream failures: Circuit Breakers stop failed operations; Retries handle transient glitches; Bulkheads isolate resource pools.


What:

Fault-tolerance patterns (Circuit Breaker, Exponential Backoff Retries, and Bulkheads resource isolation) designed to stop cascading microservice failures.

Primary purpose:

Preventing single-component performance degradations from starving resources, ensuring overall system liveness.

Usually used for:

Microservices internal RPC communications, public payment integrations, and API gateways edge protection.

How should I think about this inside system architectures?

🔌 Short-Circuit Open

Do not beat a dead horse. If downstream is failing, trip the breaker OPEN to reject requests immediately, allowing the service time to recover.

🚢 Bulkhead Compartments

Inspired by ship hulls. Divide application threads or database connections into isolated pools so a slow payment component cannot freeze order flows.

🎲 Backoff with Jitter

When retrying, double wait times (`2^attempt * base`) and inject random noise (jitter) to prevent all retrying nodes from hammering the DB together.