Exponential backoff

Exponential backoff increases the waiting time between retry attempts by multiplying the previous delay by a fixed factor, usually two. A maximum delay caps the waiting time so retries remain bounded.

Minimal example

ts
const delayLimit = Math.min(
  maxMs,
  baseMs * 2 ** (attempt - 1)
);

Learn this concept

Lesson 4.19 · Resilient client patterns

Used in exercises

Exercise 4.20 · API request retry utility Exercise 5.12 · Rider mode and customer tracking screens
Prerequisite conceptsIdempotent methodAPI client