We are using HAProxy 1.7.9, with keep-alive connection and have overridden connection-timeout to 10m and keep-live is 10s.
Intermittently request is failing with termination code KH, with response code 502.please find below a sample of request timings.
So my understanding of failure is:
- Backend is still fetching the data, but HAproxy thinks the connection is idle and closing the premature connection?
- Failover/ load balancing: Requests which are being served by HAProxy leader instance, and afterload balancing are no longer a leader, and the existing connection is being treated as idle
If anyone has faced a similar problem? and if you know the workaround.
I am also wondering if it is worth to try
option prefer-last-server – to redirect calls to the same box
or `option srvtcpka’ – to get packets from backed to HA
Thanks in advance!