12.5 · Retries, backoff, idempotency and cancellation

Networks fail constantly and in different ways. A client that retries well hides most of it; one that retries badly turns a blip into an outage.

Mental model. Retry only what is safe to repeat, only when failure is probably temporary, and always with waiting that grows and spreads out.

Retrying safely

Idempotency, backoff with jitter, and cancellation.

  1. How should a client retry failed requests: what to retry, how long to wait, and what idempotency has to do with it? 12.5.1 · L3
    Three questions decide a retry. Is the failure transient? Retry timeouts, connection resets, DNS or connectivity errors that come back (URLError codes like…

More in Networking