- Newest
- Most votes
- Most comments
Take note Application load balancer IP addresses are allocated dynamically. These IP addresses change when load balancer scales in or scales out. Therefore with the current setup of having External Application load balancer connecting to an Internal application load balancer using target group type IP is not recommended as the target group of the External load balancer can reference Old/ IP addresses of an internal load balancer. When this happens the External load balancer will throw error 502 timeout errors. I would recommend connecting Target/Backend instance directly to the External Application Load Balancer. With this setup you will not need to change the target group IP, every time the IP addresses on internal load balancer are refreshed.
"Keep-Alive" is a header part of the Http Protocol. The Keep-Alive header will allow multiple Http Requests to be send over a single connection instead of using multiple. The "Keep-Alive-Timeout" decides how long theses “Keep-Alive” connections are allowed to stay open. According to Apache documentation , Once a request has been received, the timeout value specified by the Timeout directive applies (The standard Timeout, not the Keep-Alive-Timeout). The Timeout decides the maximum amount of time the server will wait for a client's response, and its default in Apache is 60 seconds.
The Connection Idle Timeout in ALB, which its default value is 60 Seconds as well, works as the “standard” timeout. So If no data has been sent or received by the time that the idle timeout period elapses, the load balancer closes the connection. I strongly recommend you to configure the idle timeout of your application to be larger than the idle timeout configured for the load balancer. In this way, you avoid that the Load Balancer closes a connection before the application.
I’ve also linked an interesting link about HTTP Keep Alive, please have a look at [2].
Should you have any other queries or concerns related to this case, please feel free to write back and I will be happy to clarify your questions!
- Apache KeepAlive Timeout https://httpd.apache.org/docs/2.4/mod/core.html#keepalivetimeout
- HTTP Keep Alive https://blog.stackpath.com/glossary-keep-alive/
Relevant content
- asked 4 months ago
- asked 3 months ago
- Accepted Answerasked 10 months ago
- asked 10 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago