High Tq values for HAProxy

High Tq times are not always indicative of a problem, is http-server-close set?

As per the documentation:

Setting "option http-server-close" may display larger request times since "Tq" also measures the time spent waiting for additional requests.

For example, this is set for Stack Overflow, and as some example data, the follow query:

Select Top 20 Tq from LogsLastTwoDays WITH (NoLOCK) WHERE
CreationDate > DATEADD(minute, -5, GETUTCDATE()) AND 
ResponseCode = 200 AND Host = 'stackoverflow.com'
ORDER by Tq DESC

Yields:

Tq    
----- 
14990 
14987 
14986 
14983 
14974 
14972 
14972 
14965 
14964 
14964 
14962 
14961 
14960 
14955 
14952 
14951 
14945 
14943 
14935 
14932 

This is because with http-server-close, the connection is kept open to the client (a persistent connection) for up to timeout http-keep-alive 15s in our environment.

I usually focus on Tr first, because that shows the response time between the LB and the server.


Pasting your configuration somewhere could help.

This could be related to timeout configuration and to HTTP mode as well. As Kyle mentionned I would have vote for the http-server-close option first. Since you have not enable it, you might be be under a slow-loris like attack.

Could you setup a "timeout http-request" parameter to 5s and see if you still have those line or if they are replaced by a 408 response ?

cheers