Has any one come across this behavior?
- AWS ALB is sending traffic to HaProxy.
- HaProxy sets keep-alive header to 29 seconds.
- Client connected to ALB does not see this header.
- It can only see "Connection: keep-alive" header.
- Basically, ALB is stripping out keep-alive header.
- Enabling/Disabling HTTP/2.0 in ALB settings has no effect on this behavior.
- ALB idle connection timeout is more than 29 seconds.
- Occasionally client gets 502 error from ALB possibly because ALB tries to use a connection just before 29s window is over and HAProxy closes it in few milliseconds meaning that connection was idle for last 29 seconds.
- Is setting keep-alive timeout > ALB idle timeout the only solution here? Why would ALB not try to open a new connection if it receives a connection reset in this race condition?