How should retries be implemented?

Retries should be bounded and used primarily for failures that are likely to be temporary. Good retry strategies commonly use exponential backoff, jitter, timeouts, and a maximum retry count. Retrying non-idempotent operations without protection can create duplicate side effects. Systems should also distinguish retryable failures from permanent failures.

Key Takeaways
  • Retries should be bounded.
  • Use backoff and jitter.
  • Use timeouts.
  • Consider idempotency before retrying operations with side effects.
Knowledge Check

Which is a good retry strategy for distributed systems?