Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

Reliability patternsMixed 24 series

Five questions before you add a retry

Adding a retry feels like a small, local fix. It is a change to the load profile of a dependency, and it deserves the same review as a capacity change.

Quick reference

  1. Is the operation safe to run twice?
  2. Which errors will succeed on a second try?
  3. What deadline covers every attempt?
  4. Who owns the budget when it runs out?
  5. Can the dependency absorb the extra load?

Explained

Five questions before the code. First, ask whether the operation is safe to run twice, or carries an idempotency key that makes it safe. If not, the retry is a duplicate waiting to happen. Second, ask which errors will actually succeed on a second attempt. Connection resets and 503s usually will; a 400 or a 422 will not.

Third, ask what deadline covers every attempt and every backoff. A retry that cannot finish before the caller gives up is latency with extra steps. Fourth, ask who owns the retry budget, and what happens when it is spent. If the answer is nobody, the budget is infinite. Fifth, ask whether the dependency can absorb the extra load. If it is already failing, the retry is a vote for the outage.

The honest caveat: the most common wrong answer is yes to all five, given verbally, with no measurement behind any of them.

Your turn: Which question does your team skip most often?

More notes: Reliability patterns

Open in the notes app: search, filters, copy This note on GitHub