E
E
elisey4742017-08-04 20:16:18
HAproxy
elisey474, 2017-08-04 20:16:18

How to set the maximum server response time (HAProxy)?

HAProxy balances 2 web servers, how to set up a check of their health based on the maximum length of the response, that is, if for example server 1 does not respond within 5 seconds, then we do not select it (balancing method: round robin)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
A1estro, 2017-08-04
@A1estro

Something like this, if I understand correctly:

backend backendname
balance roundrobin
option httpchk HEAD /status
http-check expect status 200
server server1name ip1:port check inter 5s fall 1 rise 5
server server2name ip2:port check inter 5s fall 1 rise 5

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question