concept

Gateway Timeout Chain

The sequence of timeouts from client through load balancer, gateway and service, which must decrease inward or produce confusing failures.

timeoutsgatewayconfiguration

Each layer has its own timeout, usually configured by a different person at a different time. When they are not ordered, the failures are hard to interpret.

If the gateway's timeout is shorter than the service's, the client receives a 504 while the service continues working and eventually completes — producing an operation that appears to have failed and actually succeeded, which is the worst outcome for anything non-idempotent.

If the load balancer's idle timeout is shorter than the gateway's, connections are cut mid-response and both sides log something confusing.

The rule: timeouts must decrease inward, each layer leaving margin for its own overhead and, ideally, a retry. Where a deadline is propagated, the same discipline is enforced automatically and each hop can decline work it cannot finish in the remaining budget.