1

[1]. I am observing that the Apache HttpClient library that we are using expects this Keep-Alive: timeout in the header to keep the connection in the pool alive, but as the AWS ALB that we are calling is not returning this header the client keeps the connection active forver (while ALB Closes it after 1 hour)

[2]. I am trying to debug an ALB behaviour that abruptly closes HTTP1.1 client connection (Client has an idle connection check so it does not take a stale connection from pool, also checked the on-the-fly request does not take more than a minute -while is idle conn timeout in ALB, to give repsponse from the backend server ). Is there a way to check why this happens in ALB

I am manually setting the KeepAlive (absolute and an overriden strategy which keeps the connection for 5 mins) in Apache HttpClient (4.5.x) to address [1], but still curious to know why ALB does [2]

2
  • Did you find an answer to this? We're experiencing a similar issue, but it's a customer that's using HttpClient so we're looking for a solution modifying the load balancer config if possible Commented Jan 10 at 20:08
  • @leo The conection closure in our case was due to the client initialting the request to end the connection and not the ALB (found using packet capture). This was happening on the connections where client had send a huge payload to server. I did not dig deep to see why the connection closure happens from client side (even before the hardcoded keep-alive that we have at client) as I assume its by the lower level (OS side of things) as the application library still held the connection without knowing that its closed. The workaround I did - intersopect the connection from pool before using it. Commented Jan 20 at 17:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.