Rate Limiting, Timeouts, Retries, and Circuit Breakers

Reliable services protect themselves and their dependencies with timeouts, rate limits, bounded retries, and circuit breakers. A retry without limits can amplify an outage by causing a retry storm.

Retries should generally use exponential backoff with jitter and should only be applied to operations that are safe to retry or made idempotent.

Retries Can Make Outages Worse

Unbounded retries multiply traffic against an already unhealthy dependency. Use bounded retries, backoff, jitter, and appropriate timeouts.

Key Takeaways
  • Every external call should have an appropriate timeout.
  • Retries need limits and backoff.
  • Rate limiting protects resources from excessive traffic.
Knowledge Check

Why should retries use exponential backoff?