2022-12-13 17:44:35 +00:00
|
|
|
varnishtest "Automatic maxconn computation"
|
|
|
|
feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'"
|
|
|
|
feature cmd "$HAPROXY_PROGRAM -cc '!feature(OBSOLETE_LINKER)'"
|
|
|
|
feature cmd "$HAPROXY_PROGRAM -cc 'feature(OPENSSL)'"
|
|
|
|
feature ignore_unknown_macro
|
2022-12-16 07:24:04 +00:00
|
|
|
#REGTEST_TYPE=broken
|
2022-12-13 17:44:35 +00:00
|
|
|
|
2022-12-13 16:17:17 +00:00
|
|
|
|
|
|
|
# Check the maxconn computation with the -m parameter
|
|
|
|
# Broken because it can't work with ASAN.
|
|
|
|
|
|
|
|
|
|
|
|
feature ignore_unknown_macro
|
|
|
|
|
|
|
|
server s1 {
|
|
|
|
rxreq
|
|
|
|
txresp
|
|
|
|
} -start
|
|
|
|
|
|
|
|
|
|
|
|
haproxy h1 -arg "-m 1024" -conf {
|
|
|
|
} -start
|
|
|
|
|
|
|
|
haproxy h1 -cli {
|
|
|
|
send "show info"
|
2022-12-14 10:04:58 +00:00
|
|
|
expect ~ ".*Maxconn: (29000|28000)\n.*"
|
2022-12-13 16:17:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
haproxy h2 -arg "-m 384" -conf {
|
|
|
|
} -start
|
|
|
|
|
|
|
|
haproxy h2 -cli {
|
|
|
|
send "show info"
|
2022-12-14 10:04:58 +00:00
|
|
|
expect ~ ".*Maxconn: (11000|10000)\n.*"
|
2022-12-13 16:17:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
haproxy h3 -arg "-m 256" -conf {
|
|
|
|
} -start
|
|
|
|
|
|
|
|
haproxy h3 -cli {
|
|
|
|
send "show info"
|
2022-12-14 10:04:58 +00:00
|
|
|
expect ~ ".*Maxconn: (7300|7000)\n.*"
|
2022-12-13 16:17:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# 1 SSL front but no back
|
|
|
|
|
|
|
|
haproxy h4 -arg "-m 256" -conf {
|
|
|
|
defaults
|
|
|
|
mode http
|
|
|
|
timeout connect 1s
|
|
|
|
timeout client 1s
|
|
|
|
timeout server 1s
|
|
|
|
|
|
|
|
frontend fe1
|
|
|
|
bind "fd@${fe1}" ssl crt ${testdir}/common.pem
|
|
|
|
|
|
|
|
} -start
|
|
|
|
|
|
|
|
haproxy h4 -cli {
|
|
|
|
send "show info"
|
|
|
|
expect ~ ".*Maxconn: 1900\n.*"
|
|
|
|
}
|
|
|
|
|
|
|
|
# 1 SSL back but not front
|
|
|
|
|
|
|
|
haproxy h5 -arg "-m 256" -conf {
|
|
|
|
defaults
|
|
|
|
mode http
|
|
|
|
timeout connect 1s
|
|
|
|
timeout client 1s
|
|
|
|
timeout server 1s
|
|
|
|
|
|
|
|
listen li2
|
|
|
|
bind "fd@${li2}"
|
|
|
|
server ssl "${s1_addr}:${s1_port}" ssl verify none
|
|
|
|
|
|
|
|
} -start
|
|
|
|
|
|
|
|
haproxy h5 -cli {
|
|
|
|
send "show info"
|
|
|
|
expect ~ ".*Maxconn: 1900\n.*"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# 1 SSL front and 1 back
|
|
|
|
|
|
|
|
haproxy h6 -arg "-m 256" -conf {
|
|
|
|
defaults
|
|
|
|
mode http
|
|
|
|
timeout connect 1s
|
|
|
|
timeout client 1s
|
|
|
|
timeout server 1s
|
|
|
|
|
|
|
|
listen li3
|
|
|
|
bind "fd@${li3}" ssl crt ${testdir}/common.pem
|
|
|
|
server ssl "${s1_addr}:${s1_port}" ssl verify none
|
|
|
|
|
|
|
|
} -start
|
|
|
|
|
|
|
|
haproxy h6 -cli {
|
|
|
|
send "show info"
|
|
|
|
expect ~ ".*Maxconn: 1700\n.*"
|
|
|
|
}
|
|
|
|
|