Created
December 27, 2016 16:41
-
-
Save odoucet/9409a175b8288a6198543b5a4ba3b400 to your computer and use it in GitHub Desktop.
HAProxy bug with balance uri + option prefer-last-server + hash-type consistent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
pidfile /tmp/haproxytest.pid | |
defaults | |
# we do web ! | |
mode http | |
option httpchk /c | |
option http-keep-alive | |
option http-pretend-keepalive | |
listen test1 | |
bind 127.0.0.1:8001 | |
monitor-uri /c | |
errorfile 503 /tmp/test1.html | |
listen test2 | |
bind 127.0.0.1:8002 | |
monitor-uri /c | |
errorfile 503 /tmp/test2.html | |
listen test3 | |
bind 127.0.0.1:8003 | |
monitor-uri /c | |
errorfile 503 /tmp/test3.html | |
listen webtest:80 | |
id 12 | |
#balance source | |
hash-type consistent | |
option prefer-last-server | |
balance uri | |
bind 127.0.0.1:8000 | |
maxconn 60000 | |
server s1 127.0.0.1:8001 weight 5 check | |
server s2 127.0.0.1:8002 weight 5 check | |
server s3 127.0.0.1:8003 weight 5 check | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 Found | |
Connection: keep-alive | |
Content-Type: text/plain | |
This is test1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 Found | |
Connection: keep-alive | |
Content-Type: text/plain | |
This is test2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 Found | |
Connection: keep-alive | |
Content-Type: text/plain | |
This is test3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment