blob: 0173916198c569b54d32953f9935705a94230607 [file] [log] [blame]
William Lallemand6b6f0822022-12-13 18:44:35 +01001varnishtest "Automatic maxconn computation"
2feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'"
3feature cmd "$HAPROXY_PROGRAM -cc '!feature(OBSOLETE_LINKER)'"
4feature cmd "$HAPROXY_PROGRAM -cc 'feature(OPENSSL)'"
5feature ignore_unknown_macro
William Lallemand7332a122022-12-16 08:24:04 +01006#REGTEST_TYPE=broken
William Lallemand6b6f0822022-12-13 18:44:35 +01007
William Lallemand38c5b6e2022-12-13 17:17:17 +01008
9# Check the maxconn computation with the -m parameter
10# Broken because it can't work with ASAN.
11
William Lallemand38c5b6e2022-12-13 17:17:17 +010012
13feature ignore_unknown_macro
14
15server s1 {
16 rxreq
17 txresp
18} -start
19
20
21haproxy h1 -arg "-m 1024" -conf {
22} -start
23
24haproxy h1 -cli {
25 send "show info"
William Lallemandf98b3b12022-12-14 11:04:58 +010026 expect ~ ".*Maxconn: (29000|28000)\n.*"
William Lallemand38c5b6e2022-12-13 17:17:17 +010027}
28
29haproxy h2 -arg "-m 384" -conf {
30} -start
31
32haproxy h2 -cli {
33 send "show info"
William Lallemandf98b3b12022-12-14 11:04:58 +010034 expect ~ ".*Maxconn: (11000|10000)\n.*"
William Lallemand38c5b6e2022-12-13 17:17:17 +010035}
36
37haproxy h3 -arg "-m 256" -conf {
38} -start
39
40haproxy h3 -cli {
41 send "show info"
William Lallemandf98b3b12022-12-14 11:04:58 +010042 expect ~ ".*Maxconn: (7300|7000)\n.*"
William Lallemand38c5b6e2022-12-13 17:17:17 +010043}
44
45# 1 SSL front but no back
46
47haproxy h4 -arg "-m 256" -conf {
48 defaults
49 mode http
50 timeout connect 1s
51 timeout client 1s
52 timeout server 1s
53
54 frontend fe1
55 bind "fd@${fe1}" ssl crt ${testdir}/common.pem
56
57} -start
58
59haproxy h4 -cli {
60 send "show info"
61 expect ~ ".*Maxconn: 1900\n.*"
62}
63
64# 1 SSL back but not front
65
66haproxy h5 -arg "-m 256" -conf {
67 defaults
68 mode http
69 timeout connect 1s
70 timeout client 1s
71 timeout server 1s
72
73 listen li2
74 bind "fd@${li2}"
75 server ssl "${s1_addr}:${s1_port}" ssl verify none
76
77} -start
78
79haproxy h5 -cli {
80 send "show info"
81 expect ~ ".*Maxconn: 1900\n.*"
82}
83
84
85# 1 SSL front and 1 back
86
87haproxy h6 -arg "-m 256" -conf {
88 defaults
89 mode http
90 timeout connect 1s
91 timeout client 1s
92 timeout server 1s
93
94 listen li3
95 bind "fd@${li3}" ssl crt ${testdir}/common.pem
96 server ssl "${s1_addr}:${s1_port}" ssl verify none
97
98} -start
99
100haproxy h6 -cli {
101 send "show info"
102 expect ~ ".*Maxconn: 1700\n.*"
103}
104