Knowledgebase

Understanding Retries and Their Dangers Print

  • 0

When trying again makes things worse.

WHAT RETRIES SOLVE

Transient failures.

WHAT THEY CAUSE

Duplicates, if operations are not idempotent Amplified load on a struggling service Cost, on metered interfaces

WHAT A RETRY STORM IS

Many clients retrying simultaneously against a recovering service.

WHAT IT DOES

Prevents recovery.

WHAT PREVENTS IT

Increasing delays Random variation in those delays A limit on attempts A circuit breaker

WHY RANDOM VARIATION MATTERS

Without it, clients synchronise and retry together.

WHAT TO NEVER RETRY

Requests rejected as invalid.

WHY

They will be rejected identically.

WHAT TO BE CAREFUL ABOUT RETRYING

Anything creating or charging.

WHAT MAKES IT SAFE

An idempotency key.

WHAT TO CONSIDER ABOUT NESTED RETRIES

Retries at several layers multiply.

WHAT THAT PRODUCES

Three attempts at each of three layers becoming twenty-seven.

WHAT TO DO

Retry at one layer, deliberately chosen.

WHAT TO LOG

Every retry, so the pattern is visible.

WHAT TO MONITOR

Retry rate.

WHY

A rising rate indicates a developing problem before failures appear.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot