Retries re-issue a failed request (with backoff) to handle transient failures. Timeouts stop waiting after a limit so one slow dependency doesn’t block forever. Circuit breaker stops calling a failing dependency for a period (open), then allows probes (half-open) and closes when healthy — protecting the system from cascading failure.
| Mechanism | Purpose |
|---|---|
| Retry + backoff | Handle transient failures; avoid hammering |
| Timeout | Bound wait time; fail fast |
| Circuit breaker | Stop calling failing service; fail fast; allow recovery |
Use timeouts on every outbound call. Use retries with exponential backoff for idempotent or safe operations. Use a circuit breaker when a dependency is repeatedly failing so the rest of the system doesn’t stall or cascade.