retry

Sending a request again after it failed or timed out, in the hope that it succeeds the second time.

In more detail

Retry only when the operation is safe or idempotent, or protected by an idempotency key, because a timed-out create may already have happened. Retry 5xx and 429, not other 4xx. Bound retries with a maximum count or deadline and space them with backoff and jitter, and count them separately so a rising retry rate is visible.

Examples

In AWS: Trying a failed operation again, automatically or by hand, in the hope that the failure was temporary.
A Kafka producer retry after a lost acknowledgement writes the record twice unless the producer is idempotent.
KafkaProducer(retries=0)
A retry that eventually succeeds is logged at WARN, not ERROR.
In this course: Retries are a real design choice for network calls and belong in review questions: what happens on timeout, retry and duplicate input. Retrying a flaky test until it passes is different: it hides the cause and spends build time.

Related terms

Taught in

References

Certification courses