liveBook · Manning

Exponential backoff

As explained in Kubernetes in Action, Second Edition

Exponential backoff is a retry strategy that progressively increases the delay between successive attempts, subject to a maximum and reset conditions.

Exponential backoff is a retry strategy that increases the delay after each unsuccessful attempt. In Kubernetes, repeated container termination triggers progressively longer waits instead of immediate restarts, reducing rapid restart loops. section 6.2.1

Kubernetes applies the following restart sequence:

  • Restart immediately after the first termination. section 6.2.1
  • Wait 10 seconds, then double the delay after each subsequent termination: 20, 40, 80, and 160 seconds. section 6.2.1
  • Cap the delay at 5 minutes; reset it to zero after the container runs successfully for 10 minutes. section 6.2.1

Observing a restart loop

After repeatedly sending Envoy's /quitquitquit endpoint, kubectl shows the pod as NotReady or CrashLoopBackOff while the container waits. The status message can report a value such as “back-off 40s restarting failed container=envoy.” section 6.2.1

$ kubectl get po kiada-ssl -o json | jq .status.containerStatuses
...
"state": {
  "waiting": {
    "message": "back-off 40s restarting failed container=envoy ...",
    "reason": "CrashLoopBackOff"

Inspect the container status to see the current backoff duration and waiting reason. section 6.2.1

How Kubernetes in Action, Second Edition covers it

How deep it goes
Defines the delay sequence, five-minute cap, and ten-minute successful-run reset without explaining implementation internals.
Examples
Uses repeated Envoy termination, kubectl watch output, and a JSON status message showing a 40-second backoff.
What it assumes
Assumes basic familiarity with pods and containers while explaining restart timing and status indicators directly.
What you can do after
Diagnose repeated container restarts by inspecting pod status and identifying the current backoff interval.
How it connects
Connects container restart policy, CrashLoopBackOff, pod status, liveness probes, and startup probes.

Also explained in

Compare how 8 books explain exponential backoff →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.