The Retry pattern automatically re-attempts a failed service call after a short delay, used to recover from transient failures without manual intervention.
If a call to an Inventory Service times out due to a brief network hiccup, retrying after 200ms, then 400ms, then 800ms (with jitter) often succeeds without the caller ever seeing an error, whereas retrying a 400 Bad Request would just waste resources.
@Retryable(
value = { TimeoutException.class },
maxAttempts = 3,
backoff = @Backoff(delay = 200, multiplier = 2)
)
public InventoryResponse checkStock(String sku) {
return inventoryClient.getStock(sku);
}A concise interview answer is
I use the Retry pattern for transient, recoverable failures — like a brief network blip — with exponential backoff and jitter so retries don't overwhelm the failing service, and I always cap the number of attempts and pair it with a circuit breaker so retries stop once it's clear the service is genuinely down.
Last updated: 16 July 2026
Previous question: What challenges might arise when applying the Strangler pattern to a monolithic architecture?
Next question: How does the Retry pattern help improve the fault tolerance of microservices?