In this lesson · topic 7 of 7
Topic 7
Sizing the retry safety net
4 min read
Predict first
Predict first
Predict first
Take away
- A retry is extra load. Against an overloaded dependency it can hold the overload in place after the original fault has gone.
- Backoff and jitter spread retries out. Budgets and circuit breakers put a ceiling on them.
- Retry only what is safe to repeat, set a timeout that means something, and retry at one layer.
- Pass the remaining deadline down the chain, make writes safe to repeat with an idempotency key, and hedge only idempotent reads with a cap on the extra load.
Sources
- Beyer, Jones, Petoff and Murphy, Site Reliability Engineering, chapter 22, Addressing Cascading Failures, O’Reilly, 2016.
- Beyer, Jones, Petoff and Murphy, Site Reliability Engineering, chapter 21, Handling Overload, O’Reilly, 2016.
- Michael T. Nygard, Release It!, Second Edition, Pragmatic Bookshelf, 2018, which introduced the circuit breaker to many teams.
- Martin Fowler, Circuit Breaker, 2014.
- Marc Brooker, Exponential Backoff And Jitter, AWS Architecture Blog, 2015.
- Dean and Barroso, The Tail at Scale, Communications of the ACM, 2013, which describes hedged requests.
- RFC 9110, HTTP Semantics, for which methods are idempotent.
- Bronson, Aghayev, Charapko and Zhu, Metastable Failures in Distributed Systems, HotOS, 2021.
- Huang and others, Metastable Failures in the Wild, OSDI, 2022.