mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 16:47:18 +02:00
[TESTS] added a file to check that "retries" works.
This commit is contained in:
parent
6e4261ee2f
commit
d1eb3f0919
89
tests/test-retries.cfg
Normal file
89
tests/test-retries.cfg
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
# This is a test configuration.
|
||||||
|
# It must load-balance across active servers. Check local apache logs to
|
||||||
|
# verify :
|
||||||
|
#
|
||||||
|
# tail /var/log/apache/access_log
|
||||||
|
|
||||||
|
|
||||||
|
global
|
||||||
|
maxconn 10000
|
||||||
|
|
||||||
|
defaults
|
||||||
|
log 127.0.0.1:514 local0
|
||||||
|
balance roundrobin
|
||||||
|
contimeout 3000
|
||||||
|
srvtimeout 20000
|
||||||
|
clitimeout 10000
|
||||||
|
option dontlognull
|
||||||
|
|
||||||
|
listen no_cookie
|
||||||
|
bind :8000
|
||||||
|
retries 2
|
||||||
|
redispatch
|
||||||
|
mode http
|
||||||
|
option httplog
|
||||||
|
balance roundrobin
|
||||||
|
server dead1 1.1.1.1:80
|
||||||
|
server good1 127.0.0.1:80
|
||||||
|
|
||||||
|
# this one sends the connection to dead1, retries, then to good1, assigns
|
||||||
|
# the cookie. Subsequent connection will try to s1 again and should try good1.
|
||||||
|
listen cookie
|
||||||
|
bind :8001
|
||||||
|
retries 2
|
||||||
|
redispatch
|
||||||
|
mode http
|
||||||
|
option httplog
|
||||||
|
cookie SRV insert indirect nocache
|
||||||
|
balance roundrobin
|
||||||
|
server dead1 1.1.1.1:80 cookie s1
|
||||||
|
server good1 127.0.0.1:80 cookie s1
|
||||||
|
|
||||||
|
# this one sends the connection to dead1, retries, then to good1, assigns
|
||||||
|
# the cookie. Subsequent connection will try to s1 again and will stick to it.
|
||||||
|
listen cookie_persist
|
||||||
|
bind :8002
|
||||||
|
retries 2
|
||||||
|
redispatch
|
||||||
|
option persist
|
||||||
|
mode http
|
||||||
|
option httplog
|
||||||
|
cookie SRV insert indirect nocache
|
||||||
|
balance roundrobin
|
||||||
|
server dead1 1.1.1.1:80 cookie s1
|
||||||
|
server good1 127.0.0.1:80 cookie s1
|
||||||
|
|
||||||
|
frontend frt_default
|
||||||
|
bind :8004
|
||||||
|
mode http
|
||||||
|
option httplog
|
||||||
|
default_backend bck_default
|
||||||
|
|
||||||
|
backend bck_default
|
||||||
|
mode http
|
||||||
|
option httplog
|
||||||
|
retries 2
|
||||||
|
redispatch
|
||||||
|
balance roundrobin
|
||||||
|
contimeout 1000
|
||||||
|
srvtimeout 25000
|
||||||
|
server dead1 1.1.1.1:80
|
||||||
|
server good1 127.0.0.1:80
|
||||||
|
|
||||||
|
frontend frt_use_back
|
||||||
|
bind :8005
|
||||||
|
mode http
|
||||||
|
option httplog
|
||||||
|
use_backend bck_use_back if TRUE
|
||||||
|
|
||||||
|
backend bck_use_back
|
||||||
|
mode http
|
||||||
|
option httplog
|
||||||
|
retries 2
|
||||||
|
redispatch
|
||||||
|
balance roundrobin
|
||||||
|
contimeout 1000
|
||||||
|
srvtimeout 25000
|
||||||
|
server dead1 1.1.1.1:80
|
||||||
|
server good1 127.0.0.1:80
|
||||||
|
|
Loading…
Reference in New Issue
Block a user