Cloud and platforms
ALB vs Application Gateway vs Google Load Balancer: Timeouts and Health Checks
In short
In alb vs application gateway vs google cloud load balancer, the timer that cuts off a slow request is three different timers. AWS ALB counts silence, defaulting to 60 seconds. Application Gateway waits 20 seconds for the backend to answer. Google gives the whole response 30 seconds, body included. Health checks also disagree on what counts as healthy.
What happens to one request, step by step, on each load balancer?
Following a single request from the client to the backend and back is the clearest way to see where the three products part ways. Each stage below has its own timer or limit, and each vendor documents a different one.
- Client connects and sits idle: ALB closes it after its idle timeout, Application Gateway after the frontend TCP idle timeout, Google after the client HTTP keepalive timeout.
- Headers arrive: each product rejects requests above its own header size ceiling.
- The backend works: ALB watches for silence, Application Gateway for a first answer within its request timeout, Google for the complete response within the backend service timeout.
- A backend fails probes or is removed: health check thresholds and connection draining decide how many requests still reach it.
Which timeout ends a slow request in alb vs application gateway vs google cloud load balancer?
ALB has no request timer in the attributes I read. Its connection idle timeout, 60 seconds unless you change it, accepts 1 to 4,000 seconds and resets whenever a byte moves on the client or target connection. HTTP/2 PING frames do not count. A slow upload that keeps sending data survives; a backend that thinks quietly for 61 seconds does not. The usual symptom is described in ALB 504 responses from EC2 targets.
Application Gateway calls its setting the request timeout: how long it waits for the backend to respond. The default is 20 seconds. Private backends accept up to 86,400 seconds, external backends only up to 240. On the v1 SKU a timeout can reach the client as a 502.
Google is the strictest reading. The backend service timeout, 30 seconds by default except for serverless backends, covers the time from the last request byte to the last response byte. A 500 MB download must finish inside it, or the rest is dropped. Uploads are treated more kindly: the clock starts only after the full request arrives. Global and classic load balancers cap the value at 86,400 seconds in practice, even though the field accepts far more.
How long can an idle client connection stay open?
ALB separates two settings. Beyond the idle timeout, a client keepalive duration of 3,600 seconds (adjustable from 60 to 604,800) caps the life of a persistent connection; when it ends, ALB answers one more request and then closes with Connection: close or an HTTP/2 GOAWAY.
Application Gateway keeps HTTP/1.1 connections alive for 120 seconds. The frontend TCP idle timeout defaults to 4 minutes and is changed on the public IP resource, anywhere from 4 to 30 minutes. A private frontend IP has a fixed 5 minutes, and HTTP/2 connections on v2 idle out after 180 seconds with no setting.
Google sets the client HTTP keepalive timeout to 610 seconds. Global and regional external load balancers accept 5 to 1,200 seconds; the classic one does not let you change it. Toward backends, Google keeps idle connections for 600 seconds and that value is fixed, so I would give the backend web server a longer keepalive than that. A backend that closes first is a common source of 502 errors behind an ALB as well.
What does each health check treat as healthy, and how fast does it react?
The status code row is the trap. A backend that redirects / to a login page passes Application Gateway default probes, fails Google health checks, and fails an ALB target group until you widen its success codes.
When every target is unhealthy, ALB fails open and sends traffic to all of them. Application Gateway instead offers MinServers, which forces a number of servers to count as healthy, and warns that it can route users to broken servers. The Google page I read states that unhealthy backends keep their existing connections until a timeout, but says nothing about an all-unhealthy fail-open.
| Setting | AWS ALB target group | Application Gateway default probe | Google health check |
|---|---|---|---|
| Interval | 30 s (35 s for Lambda) | 30 s | 5 s |
| Timeout | 5 s (30 s for Lambda) | 30 s | 5 s |
| Failures to mark down | 2 | 3 | 2 |
| Successes to mark up | 5 | One good probe | 2 |
| Healthy status codes | 200 by default; 200-499 allowed | 200-399 | 200 only; 301 and 302 fail |
| Default target | Path `/` on the traffic port | Host 127.0.0.1 on the backend setting port | Path `/` |
How does each one drain a backend you are removing?
ALB waits 300 seconds by default before finishing deregistration, ends early if the target has no in-flight requests, and shows it as draining either way. If the target drops a connection before the delay ends, the client gets a 500-level error.
Application Gateway lists 30 seconds as the value used when draining is not enabled, and 1 to 3,600 seconds when you turn it on in the backend setting. Requests pinned by gateway-managed cookie affinity still go to the draining server, and a configuration update cuts open connections once the timeout passes.
Google accepts a connection draining timeout of 0 to 3,600 seconds on the backend service, where 0 disables it. For Application Load Balancers, existing requests get that long to complete and new connections go elsewhere.
Where are the header size ceilings?
ALB allows a 16 K request line, 16 K for any single header, 64 K for all request headers and 32 K for response headers, and none of these can be raised. Application Gateway allows 32 KB for the URL and 32 KB for headers, with tighter HTTP/2 figures of 8 KB per field and 16 KB in total. Google counts the URL and headers together: 60 KiB on the global external load balancer, 64 KiB on classic, of which up to 6 KiB may go to internal headers, while backend response headers may reach about 128 KB.
Oversized cookies or long JWTs hit a ceiling soonest on Application Gateway HTTP/2 traffic and on the ALB single-header limit, so I would find the largest header your clients really send before choosing.
What else do people ask?
Does Google retry failed requests by default?
Without a retry policy, the global external load balancer retries a request that has no body once after a 502, 503 or 504. POST requests are not retried.
Can ALB return a status code that is not a standard HTTP one?
Yes. It logs 460 when a client closes the connection before the idle timeout ends; see the <a class="link" href="/fix/alb-460-client-closed-connection-before-idle-timeout/">ALB 460 fix page</a>.
Sources
- AWS, Edit attributes for your Application Load Balancer, fetched 2026-11-20
- AWS, Health checks for Application Load Balancer target groups, fetched 2026-11-20
- AWS, Edit target group attributes (deregistration delay), fetched 2026-11-20
- AWS, Quotas for your Application Load Balancers (HTTP headers), fetched 2026-11-20
- Microsoft Learn, Application Gateway backend settings (request timeout, connection draining), fetched 2026-11-20
- Microsoft Learn, Health monitoring overview for Application Gateway, fetched 2026-11-20
- Microsoft Learn, Frequently asked questions about Application Gateway (keep-alive and TCP idle timeout), fetched 2026-11-20
- Microsoft Learn, Azure subscription and service limits (Application Gateway), fetched 2026-11-20
- Google Cloud, Request distribution for external Application Load Balancers (timeouts and retries), fetched 2026-11-20
- Google Cloud, Health checks overview, fetched 2026-11-20
- Google Cloud, Enable connection draining, fetched 2026-11-20
- Google Cloud, Cloud Load Balancing quotas and limits (header size), fetched 2026-11-20
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every figure here was read from AWS, Microsoft and Google load balancing documentation on 20 Nov 2026; none of these load balancers was deployed or load-tested for the page. Not covered: prices, WAF rules, Network Load Balancers, Application Gateway for Containers, internal and cross-region Google modes, and WebSocket limits. Found a mistake? Tell me.