Le 14/03/2022 à 11:40, Christopher Faulet a écrit :
Le 3/14/22 à 10:53, Artur a écrit :
Hello,

I'd like to know how checks behaves depending on the "inter" and
"timeout check" settings.

Let's try this simplified setup :

backend back
   mode tcp
   timeout check 5s
   server s1 1.2.3.4:80 check inter 2s
   server s2 1.2.3.5:80 check inter 2s

"inter 2s" is the default setup. We should have there one check every 2s
if everything is optimal.
"timeout check 5s" specify that the server check can take up to 5s (once
the connection established).

In this configuration, what happens if the check takes more than 2 seconds ?
Does haproxy wait (up to 5 seconds) for this check to finish before
launching another check or it's still launching checks every 2s anyway ?


Hi,

For a given server, inter/fastinter/downinter timeouts are used to define the delay between the end of a health-check and the beginning of the following one. This is independent on the evaluation time. Thus in your example, a health-check will still run 2s after the end of the previous one, independently on its duration.

OK, I got it. One check at a time and 2s between each check.

However as "timeout check" is set to 5 seconds, each check cannot run longer that 5 seconds. It means that if the backend server does not send data before the 5 seconds elapsed, the check fails.
Am I right ?

--
Best regards,
Artur


Reply via email to