Answer the question
In order to leave comments, you need to log in
HAProxy returns 400 after httpchk but endpoint response is 200. What's the problem?
Good day.
haproxy version 1.5.18
rhel 7.5
conf:
listen server
bind *:5000
bind-process 1
balance leastconn
hash-type consistent
fullconn 1024
option forwardfor
http-send-name-header Host
stick-table type ip size 1m expire 1h
stick on src
option httpchk HEAD /test/version HTTP/1.0\r\nHost:localhost
server server1 server_ip:8080 check inter 3s fall 3 rise 2
#препрод для теста
server server2 server_ip:8080 check inter 3s fall 3 rise 2
Answer the question
In order to leave comments, you need to log in
As planned, the code outputs a random number from 0 to 14 based on the input value "4656" and the number of the current round "3".
The idea behind the code is to have both randomness and repeatability at the same time.
That is, if you replace "4656" with another value, then other numbers will "fall out" in the rounds, and if you substitute "4656" again, then the numbers will "fall out" exactly the same.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question