Google load balancer retries request on web server after timeout

We are using Google Load Balancer with Tomcat Server. We saved a specific timeout on the load balancer from the cloud console configuration portal. Whenever a request takes longer than a timeout, GLB returns 502 as expected.

Here's the problem -

  • Whenever a request takes more than a certain time, on the tomcat side we get the same request again after a timeout, for example, when we have a timeout of 30 seconds, we received the same request on tomcat in exactly 30 seconds.
  • In the browser, the response time for 502 is exactly twice the wait time. (This may be because the network is turning, but why is it always accurate twice)
+4
source share
1 answer

I assume you mean HTTP (S) load balancing. In this case, a reverse proxy server sits in front of your application, processes requests and redirects them to your servers. This proxy (GFE) will repeat as described in the document :

Retries of HTTP (S) load balancing fail. GET requests in certain circumstances, for example, when the response timeout has been reached. It does not repeat failed POST requests. Repetitions are limited to two attempts. Repeated requests generate only one log entry for a final response. See the Registration section for more information.

0
source

Source: https://habr.com/ru/post/1696057/


All Articles