Retry and Fallback
75%
Lesson 6 of 8

Retry and Fallback

Reliable workflows expect temporary failure and define what happens next.

Active reading
Why this matters

Reliable workflows expect temporary failure and define what happens next.

Retry

Repeat transient operations with limits.

Fallback

Use a safer alternate path.

Dead letter

Store failures for later review.

Understand the working model

Not every failure deserves an immediate retry. Rate limits and network timeouts may recover; invalid input usually will not. Classify failures before deciding what to do.

Use bounded retries with increasing delay so a temporary outage does not create a retry storm. After the limit, fall back to a queue or human review.

Example
Timeout → retry after 2s, 5s, 15s → if still failing, store the job and notify an operator. Invalid JSON → repair once → otherwise route to review.
Practice

Apply the pattern above to one real task you already do. Keep the first version small enough that you can inspect every input and output.

Common mistake

Do not create infinite retries. They hide failures and can amplify cost.

Key takeaway

Define retry limits, fallback behavior and a visible place for failed jobs.

Next lesson

Human Review

Continue to the next lesson.

Continue →