Skip to content
StackDecode
System Design
9. Message Queues and Event-Driven SystemsAnimated

Exponential Backoff

Waiting longer after each failure.

The idea

Delays grow by a factor (1s, 2s, 4s, 8s), with random jitter to avoid sync.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

try 1

Attempt 1 fails. Wait 1s plus up to 1s random jitter, then retry.

attempt:
1
next wait:
1
1/6

Exponential backoff spaces retries out; jitter stops every client retrying at the same moment.

Step by step

  1. 1First failure waits 1s
  2. 2Next waits 2s
  3. 3Then 4s
  4. 4Add jitter and cap

Where it is used

Retries and reconnects.

Watch out for

Without a cap the delay becomes huge.

Related