Failure handling and retry budgets 00:00:01 Three callers multiply a failure I just sent a payment request, and my app froze—no response after 1.2 seconds, and the backend logged a timeout at 1.1 seconds. If each layer makes three total attempts for every work item it receives and every path retries to its limit, a single request can cause as many as twenty-seven deepest-layer attempts. Three total attempts means the first try plus two retries. Whether the operational retry budget counts extra attempts or all traffic must be stated explicitly; in either case the original try still consumes service capacity. Count total attempts at a layer, including the original. With three total attempts at each of three layers, the worst-case downstream amplification is three times three times three. That is twenty-seven attempts for one customer intent. 00:00:53 Move retries to an owner I chose the gateway as the retry owner, so it tracks the full operation and enforces the deadline. Some transient failures are candidates for retry. Invalid input will not fix itself, while a timeout on a non-repeatable write may require reconciliation instead of another execution. For payment, use a durable operation identity and a provider contract that recognizes it. Comparing an in-memory flag at the gateway does not prevent a double charge after failover. The retry owner must understand both the operation and the deadline. A gateway can own retries only when it has that context; often the application closest to the intent can make a safer decision. 00:01:32 Spend the remaining deadline We used exponential backoff with jitter, so retries spread out over 1.5 to 4.3 seconds, not all at once. If a retry can’t finish before the 2.5-second deadline, we skip it to avoid wasting resources. If the earlier payment might already have succeeded, tell the customer its result is being checked and provide a stable reference. Do not announce failure merely because the final response missed the deadline. Backoff schedules the next attempt; jitter spreads attempts from different callers. Neither makes an unsafe payment repeatable. When time runs out, return an honest pending or unknown state if the earlier operation might still succeed. 00:02:12 Give the fleet a shared budget We limited retry traffic to 15 percent of normal load, so the system stays stable under stress. A retry cap bounds the additional load allowed by this policy. It still matters whether the original requests alone could overload the dependency. A low error count locally doesn’t hide a retry storm upstream—now we see the real load. An illustrative fifteen-percent retry ceiling limits amplification but cannot by itself guarantee stability. Track how many attempts each completed customer action consumed, and keep headroom for fresh work during a dependency outage. 00:02:46 What a lost response means A failed read can be retried safely, but a payment might have already gone through. We use a stable key to recover safely, or run reconciliation to fix any mismatched state. During recovery, compare new-request completion and latency with the work spent on old retries. Leave capacity for both classes rather than assuming the previous backlog has vanished. Test the return of a failed dependency under real offered demand. A torrent of old attempts can exhaust a newly healthy service just as quickly as new traffic, so recovery behavior is part of the original budget.