Merge ~hloeung/content-cache-charm:cleanup into content-cache-charm:master

Proposed by Haw Loeung
Status: Merged
Approved by: Paul Collins
Approved revision: 0d24b8704846dfe0998266d139f87a8334bc868c
Merged at revision: e96904cf3b0cce2eb8052759eb105c681034ef73
Proposed branch: ~hloeung/content-cache-charm:cleanup
Merge into: content-cache-charm:master
Diff against target: 1510 lines (+143/-418)
15 files modified
lib/haproxy.py (+7/-13)
reactive/content_cache.py (+1/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output.txt (+19/-57)
tests/unit/files/content_cache_rendered_haproxy_test_output2.txt (+2/-6)
tests/unit/files/content_cache_rendered_haproxy_test_output3.txt (+2/-6)
tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt (+19/-57)
tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt (+3/-9)
tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt (+19/-57)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt (+19/-57)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt (+19/-57)
tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt (+2/-6)
tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt (+10/-30)
tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt (+1/-3)
tests/unit/files/haproxy_config_rendered_test_output.txt (+10/-30)
tests/unit/files/haproxy_config_rendered_test_output2.txt (+10/-30)
Reviewer Review Type Date Requested Status
Paul Collins lgtm Approve
Canonical IS Reviewers Pending
Review via email: mp+397708@code.launchpad.net

Commit message

Revert "Use 'http-check send hdr' instead of adding headers at end of httpchk version"

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Paul Collins (pjdc) :
review: Approve (lgtm)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision e96904cf3b0cce2eb8052759eb105c681034ef73

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/haproxy.py b/lib/haproxy.py
index d9836a7..5153d97 100644
--- a/lib/haproxy.py
+++ b/lib/haproxy.py
@@ -222,8 +222,8 @@ listen {name}
222 def render_stanza_backend(self, config): # NOQA: C901222 def render_stanza_backend(self, config): # NOQA: C901
223 backend_stanza = """223 backend_stanza = """
224backend backend-{name}224backend backend-{name}
225{indent}{httpchk}
225{indent}http-request set-header Host {site_name}226{indent}http-request set-header Host {site_name}
226{httpchk}
227{options}{indent}balance {load_balancing_algorithm}227{options}{indent}balance {load_balancing_algorithm}
228{backends}228{backends}
229"""229"""
@@ -318,23 +318,17 @@ backend backend-{name}
318 if opts:318 if opts:
319 options = '\n'.join(opts + [''])319 options = '\n'.join(opts + [''])
320320
321 httpchk = []321 httpchk = (
322 # Add X-Cache-Request-IP for caching layer to log real client IP.322 r"option httpchk {method} {path} HTTP/1.0\r\n"
323 if backend_name.startswith('cached-'):323 r"Host:\ {site_name}\r\n"
324 httpchk.append('{indent}http-request set-header X-Cache-Request-IP %[src]'.format(indent=INDENT))324 r"User-Agent:\ haproxy/httpchk"
325 httpchk.append(325 ).format(method=method, path=path, site_name=site_name)
326 '{indent}http-check send hdr Host {site_name}'.format(site_name=site_name, indent=INDENT)
327 )
328 httpchk.append('{indent}http-check send hdr User-Agent haproxy/httpchk'.format(indent=INDENT))
329 httpchk.append(
330 '{indent}option httpchk {method} {path} HTTP/1.0'.format(method=method, path=path, indent=INDENT)
331 )
332326
333 output = backend_stanza.format(327 output = backend_stanza.format(
334 name=backend_name,328 name=backend_name,
335 site=site,329 site=site,
336 site_name=site_name,330 site_name=site_name,
337 httpchk='\n'.join(httpchk),331 httpchk=httpchk,
338 load_balancing_algorithm=self.load_balancing_algorithm,332 load_balancing_algorithm=self.load_balancing_algorithm,
339 backends='\n'.join(backend_confs),333 backends='\n'.join(backend_confs),
340 options=options,334 options=options,
diff --git a/reactive/content_cache.py b/reactive/content_cache.py
index eeb24fe..9f95727 100644
--- a/reactive/content_cache.py
+++ b/reactive/content_cache.py
@@ -281,6 +281,7 @@ def configure_haproxy(): # NOQA: C901 LP#1825084
281 # Also, for caching layer, we want higher fall count as it's less281 # Also, for caching layer, we want higher fall count as it's less
282 # likely the caching layer is down, 2 mins here (inter * fall).282 # likely the caching layer is down, 2 mins here (inter * fall).
283 new_cached_loc_conf['backend-fall-count'] = 60283 new_cached_loc_conf['backend-fall-count'] = 60
284 new_cached_loc_conf['backend-options'] = ['http-request set-header X-Cache-Request-IP %[src]']
284285
285 # No backends286 # No backends
286 if not site_conf['locations'][location].get('backends'):287 if not site_conf['locations'][location].get('backends'):
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
index 71b7714..658b0d1 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
@@ -155,19 +155,15 @@ listen site9-local
155 default_backend backend-site9-local155 default_backend backend-site9-local
156156
157backend backend-cached-site1-local157backend backend-cached-site1-local
158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
158 http-request set-header Host site1.local159 http-request set-header Host site1.local
159 http-request set-header X-Cache-Request-IP %[src]160 http-request set-header X-Cache-Request-IP %[src]
160 http-check send hdr Host site1.local
161 http-check send hdr User-Agent haproxy/httpchk
162 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0
163 balance leastconn161 balance leastconn
164 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600
165163
166backend backend-site1-local164backend backend-site1-local
165 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
167 http-request set-header Host site1.local166 http-request set-header Host site1.local
168 http-check send hdr Host site1.local
169 http-check send hdr User-Agent haproxy/httpchk
170 option httpchk HEAD / HTTP/1.0
171 option redispatch 1167 option redispatch 1
172 balance leastconn168 balance leastconn
173 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200169 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
@@ -175,19 +171,15 @@ backend backend-site1-local
175 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200171 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
176172
177backend backend-cached-site2-local173backend backend-cached-site2-local
174 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
178 http-request set-header Host site2.local175 http-request set-header Host site2.local
179 http-request set-header X-Cache-Request-IP %[src]176 http-request set-header X-Cache-Request-IP %[src]
180 http-check send hdr Host site2.local
181 http-check send hdr User-Agent haproxy/httpchk
182 option httpchk GET /check/ HTTP/1.0
183 balance leastconn177 balance leastconn
184 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072178 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072
185179
186backend backend-site2-local180backend backend-site2-local
181 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
187 http-request set-header Host site2.local182 http-request set-header Host site2.local
188 http-check send hdr Host site2.local
189 http-check send hdr User-Agent haproxy/httpchk
190 option httpchk GET /check/ HTTP/1.0
191 option redispatch 1183 option redispatch 1
192 balance leastconn184 balance leastconn
193 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt185 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
@@ -195,19 +187,15 @@ backend backend-site2-local
195 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt187 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
196188
197backend backend-cached-site3-local189backend backend-cached-site3-local
190 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
198 http-request set-header Host site3.local191 http-request set-header Host site3.local
199 http-request set-header X-Cache-Request-IP %[src]192 http-request set-header X-Cache-Request-IP %[src]
200 http-check send hdr Host site3.local
201 http-check send hdr User-Agent haproxy/httpchk
202 option httpchk HEAD / HTTP/1.0
203 balance leastconn193 balance leastconn
204 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096194 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
205195
206backend backend-site3-local196backend backend-site3-local
197 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
207 http-request set-header Host site3.local198 http-request set-header Host site3.local
208 http-check send hdr Host site3.local
209 http-check send hdr User-Agent haproxy/httpchk
210 option httpchk HEAD / HTTP/1.0
211 option forwardfor except 127.0.0.1 192.168.1.1199 option forwardfor except 127.0.0.1 192.168.1.1
212 option forceclose200 option forceclose
213 option redispatch 1201 option redispatch 1
@@ -217,118 +205,92 @@ backend backend-site3-local
217 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200205 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
218206
219backend backend-cached-site4-local207backend backend-cached-site4-local
208 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk
220 http-request set-header Host site4.local209 http-request set-header Host site4.local
221 http-request set-header X-Cache-Request-IP %[src]210 http-request set-header X-Cache-Request-IP %[src]
222 http-check send hdr Host site4.local
223 http-check send hdr User-Agent haproxy/httpchk
224 option httpchk HEAD / HTTP/1.0
225 balance leastconn211 balance leastconn
226 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200212 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200
227213
228backend backend-cached-site5214backend backend-cached-site5
215 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
229 http-request set-header Host site5.local216 http-request set-header Host site5.local
230 http-request set-header X-Cache-Request-IP %[src]217 http-request set-header X-Cache-Request-IP %[src]
231 http-check send hdr Host site5.local
232 http-check send hdr User-Agent haproxy/httpchk
233 option httpchk HEAD / HTTP/1.0
234 balance leastconn218 balance leastconn
235 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200219 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200
236220
237backend backend-site5221backend backend-site5
222 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
238 http-request set-header Host site5.local223 http-request set-header Host site5.local
239 http-check send hdr Host site5.local
240 http-check send hdr User-Agent haproxy/httpchk
241 option httpchk HEAD / HTTP/1.0
242 option redispatch 1224 option redispatch 1
243 balance leastconn225 balance leastconn
244 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200226 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
245227
246backend backend-site5-2228backend backend-site5-2
229 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
247 http-request set-header Host site5.local230 http-request set-header Host site5.local
248 http-check send hdr Host site5.local
249 http-check send hdr User-Agent haproxy/httpchk
250 option httpchk HEAD / HTTP/1.0
251 option redispatch 1231 option redispatch 1
252 balance leastconn232 balance leastconn
253 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200233 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
254234
255backend backend-cached-site6-local235backend backend-cached-site6-local
236 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
256 http-request set-header Host site6.local237 http-request set-header Host site6.local
257 http-request set-header X-Cache-Request-IP %[src]238 http-request set-header X-Cache-Request-IP %[src]
258 http-check send hdr Host site6.local
259 http-check send hdr User-Agent haproxy/httpchk
260 option httpchk HEAD / HTTP/1.0
261 balance leastconn239 balance leastconn
262 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200240 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200
263241
264backend backend-site6-local242backend backend-site6-local
243 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
265 http-request set-header Host site6.local244 http-request set-header Host site6.local
266 http-check send hdr Host site6.local
267 http-check send hdr User-Agent haproxy/httpchk
268 option httpchk HEAD / HTTP/1.0
269 option redispatch 1245 option redispatch 1
270 balance leastconn246 balance leastconn
271 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt247 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt
272248
273backend backend-cached-site7-local249backend backend-cached-site7-local
250 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
274 http-request set-header Host site7.local251 http-request set-header Host site7.local
275 http-request set-header X-Cache-Request-IP %[src]252 http-request set-header X-Cache-Request-IP %[src]
276 http-check send hdr Host site7.local
277 http-check send hdr User-Agent haproxy/httpchk
278 option httpchk HEAD / HTTP/1.0
279 balance leastconn253 balance leastconn
280 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200254 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200
281255
282backend backend-site7-local256backend backend-site7-local
257 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
283 http-request set-header Host site7.local258 http-request set-header Host site7.local
284 http-check send hdr Host site7.local
285 http-check send hdr User-Agent haproxy/httpchk
286 option httpchk HEAD / HTTP/1.0
287 option redispatch 1259 option redispatch 1
288 balance leastconn260 balance leastconn
289 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200261 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
290262
291backend backend-cached-site8-local263backend backend-cached-site8-local
264 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
292 http-request set-header Host site8.local265 http-request set-header Host site8.local
293 http-request set-header X-Cache-Request-IP %[src]266 http-request set-header X-Cache-Request-IP %[src]
294 http-check send hdr Host site8.local
295 http-check send hdr User-Agent haproxy/httpchk
296 option httpchk HEAD / HTTP/1.0
297 balance leastconn267 balance leastconn
298 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200268 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200
299269
300backend backend-site8-local270backend backend-site8-local
271 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
301 http-request set-header Host site8.local272 http-request set-header Host site8.local
302 http-check send hdr Host site8.local
303 http-check send hdr User-Agent haproxy/httpchk
304 option httpchk HEAD / HTTP/1.0
305 option redispatch 1273 option redispatch 1
306 balance leastconn274 balance leastconn
307 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200275 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
308276
309backend backend-site8-local-2277backend backend-site8-local-2
278 option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk
310 http-request set-header Host auth.site8.local279 http-request set-header Host auth.site8.local
311 http-check send hdr Host auth.site8.local
312 http-check send hdr User-Agent haproxy/httpchk
313 option httpchk HEAD / HTTP/1.0
314 option redispatch 1280 option redispatch 1
315 balance leastconn281 balance leastconn
316 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt282 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt
317283
318backend backend-cached-site9-local284backend backend-cached-site9-local
285 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
319 http-request set-header Host site9.local286 http-request set-header Host site9.local
320 http-request set-header X-Cache-Request-IP %[src]287 http-request set-header X-Cache-Request-IP %[src]
321 http-check send hdr Host site9.local
322 http-check send hdr User-Agent haproxy/httpchk
323 option httpchk HEAD / HTTP/1.0
324 balance leastconn288 balance leastconn
325 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200289 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200
326290
327backend backend-site9-local291backend backend-site9-local
292 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
328 http-request set-header Host site9.local293 http-request set-header Host site9.local
329 http-check send hdr Host site9.local
330 http-check send hdr User-Agent haproxy/httpchk
331 option httpchk HEAD / HTTP/1.0
332 option redispatch 1294 option redispatch 1
333 balance leastconn295 balance leastconn
334 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200296 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
index 846b16d..7931e5e 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
@@ -90,19 +90,15 @@ listen site1-local
90 default_backend backend-site1-local90 default_backend backend-site1-local
9191
92backend backend-cached-site1-local92backend backend-cached-site1-local
93 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
93 http-request set-header Host site1.local94 http-request set-header Host site1.local
94 http-request set-header X-Cache-Request-IP %[src]95 http-request set-header X-Cache-Request-IP %[src]
95 http-check send hdr Host site1.local
96 http-check send hdr User-Agent haproxy/httpchk
97 option httpchk HEAD / HTTP/1.0
98 balance leastconn96 balance leastconn
99 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 20097 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200
10098
101backend backend-site1-local99backend backend-site1-local
100 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
102 http-request set-header Host site1.local101 http-request set-header Host site1.local
103 http-check send hdr Host site1.local
104 http-check send hdr User-Agent haproxy/httpchk
105 option httpchk HEAD / HTTP/1.0
106 retries 3102 retries 3
107 option redispatch 1103 option redispatch 1
108 balance leastconn104 balance leastconn
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
index 37a6665..e8536e0 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
@@ -96,19 +96,15 @@ listen site1-local
96 default_backend backend-site1-local96 default_backend backend-site1-local
9797
98backend backend-cached-site1-local98backend backend-cached-site1-local
99 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
99 http-request set-header Host site1.local100 http-request set-header Host site1.local
100 http-request set-header X-Cache-Request-IP %[src]101 http-request set-header X-Cache-Request-IP %[src]
101 http-check send hdr Host site1.local
102 http-check send hdr User-Agent haproxy/httpchk
103 option httpchk HEAD / HTTP/1.0
104 balance leastconn102 balance leastconn
105 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200103 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200
106104
107backend backend-site1-local105backend backend-site1-local
106 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
108 http-request set-header Host site1.local107 http-request set-header Host site1.local
109 http-check send hdr Host site1.local
110 http-check send hdr User-Agent haproxy/httpchk
111 option httpchk HEAD / HTTP/1.0
112 option redispatch 1108 option redispatch 1
113 balance leastconn109 balance leastconn
114 server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200110 server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt
index 5ae5568..47c5663 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt
@@ -155,19 +155,15 @@ listen site9-local
155 default_backend backend-site9-local155 default_backend backend-site9-local
156156
157backend backend-cached-site1-local157backend backend-cached-site1-local
158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
158 http-request set-header Host site1.local159 http-request set-header Host site1.local
159 http-request set-header X-Cache-Request-IP %[src]160 http-request set-header X-Cache-Request-IP %[src]
160 http-check send hdr Host site1.local
161 http-check send hdr User-Agent haproxy/httpchk
162 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0
163 balance leastconn161 balance leastconn
164 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600
165163
166backend backend-site1-local164backend backend-site1-local
165 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
167 http-request set-header Host site1.local166 http-request set-header Host site1.local
168 http-check send hdr Host site1.local
169 http-check send hdr User-Agent haproxy/httpchk
170 option httpchk HEAD / HTTP/1.0
171 option redispatch 1167 option redispatch 1
172 balance leastconn168 balance leastconn
173 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200169 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
@@ -175,19 +171,15 @@ backend backend-site1-local
175 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200171 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
176172
177backend backend-cached-site2-local173backend backend-cached-site2-local
174 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
178 http-request set-header Host site2.local175 http-request set-header Host site2.local
179 http-request set-header X-Cache-Request-IP %[src]176 http-request set-header X-Cache-Request-IP %[src]
180 http-check send hdr Host site2.local
181 http-check send hdr User-Agent haproxy/httpchk
182 option httpchk GET /check/ HTTP/1.0
183 balance leastconn177 balance leastconn
184 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072178 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072
185179
186backend backend-site2-local180backend backend-site2-local
181 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
187 http-request set-header Host site2.local182 http-request set-header Host site2.local
188 http-check send hdr Host site2.local
189 http-check send hdr User-Agent haproxy/httpchk
190 option httpchk GET /check/ HTTP/1.0
191 option redispatch 1183 option redispatch 1
192 balance leastconn184 balance leastconn
193 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt185 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
@@ -195,19 +187,15 @@ backend backend-site2-local
195 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt187 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
196188
197backend backend-cached-site3-local189backend backend-cached-site3-local
190 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
198 http-request set-header Host site3.local191 http-request set-header Host site3.local
199 http-request set-header X-Cache-Request-IP %[src]192 http-request set-header X-Cache-Request-IP %[src]
200 http-check send hdr Host site3.local
201 http-check send hdr User-Agent haproxy/httpchk
202 option httpchk HEAD / HTTP/1.0
203 balance leastconn193 balance leastconn
204 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096194 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
205195
206backend backend-site3-local196backend backend-site3-local
197 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
207 http-request set-header Host site3.local198 http-request set-header Host site3.local
208 http-check send hdr Host site3.local
209 http-check send hdr User-Agent haproxy/httpchk
210 option httpchk HEAD / HTTP/1.0
211 option forwardfor except 127.0.0.1 192.168.1.1199 option forwardfor except 127.0.0.1 192.168.1.1
212 option forceclose200 option forceclose
213 option redispatch 1201 option redispatch 1
@@ -217,118 +205,92 @@ backend backend-site3-local
217 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200205 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
218206
219backend backend-cached-site4-local207backend backend-cached-site4-local
208 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk
220 http-request set-header Host site4.local209 http-request set-header Host site4.local
221 http-request set-header X-Cache-Request-IP %[src]210 http-request set-header X-Cache-Request-IP %[src]
222 http-check send hdr Host site4.local
223 http-check send hdr User-Agent haproxy/httpchk
224 option httpchk HEAD / HTTP/1.0
225 balance leastconn211 balance leastconn
226 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200212 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200
227213
228backend backend-cached-site5214backend backend-cached-site5
215 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
229 http-request set-header Host site5.local216 http-request set-header Host site5.local
230 http-request set-header X-Cache-Request-IP %[src]217 http-request set-header X-Cache-Request-IP %[src]
231 http-check send hdr Host site5.local
232 http-check send hdr User-Agent haproxy/httpchk
233 option httpchk HEAD / HTTP/1.0
234 balance leastconn218 balance leastconn
235 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200219 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200
236220
237backend backend-site5221backend backend-site5
222 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
238 http-request set-header Host site5.local223 http-request set-header Host site5.local
239 http-check send hdr Host site5.local
240 http-check send hdr User-Agent haproxy/httpchk
241 option httpchk HEAD / HTTP/1.0
242 option redispatch 1224 option redispatch 1
243 balance leastconn225 balance leastconn
244 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200226 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
245227
246backend backend-site5-2228backend backend-site5-2
229 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
247 http-request set-header Host site5.local230 http-request set-header Host site5.local
248 http-check send hdr Host site5.local
249 http-check send hdr User-Agent haproxy/httpchk
250 option httpchk HEAD / HTTP/1.0
251 option redispatch 1231 option redispatch 1
252 balance leastconn232 balance leastconn
253 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200233 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
254234
255backend backend-cached-site6-local235backend backend-cached-site6-local
236 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
256 http-request set-header Host site6.local237 http-request set-header Host site6.local
257 http-request set-header X-Cache-Request-IP %[src]238 http-request set-header X-Cache-Request-IP %[src]
258 http-check send hdr Host site6.local
259 http-check send hdr User-Agent haproxy/httpchk
260 option httpchk HEAD / HTTP/1.0
261 balance leastconn239 balance leastconn
262 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200240 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200
263241
264backend backend-site6-local242backend backend-site6-local
243 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
265 http-request set-header Host site6.local244 http-request set-header Host site6.local
266 http-check send hdr Host site6.local
267 http-check send hdr User-Agent haproxy/httpchk
268 option httpchk HEAD / HTTP/1.0
269 option redispatch 1245 option redispatch 1
270 balance leastconn246 balance leastconn
271 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt247 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt
272248
273backend backend-cached-site7-local249backend backend-cached-site7-local
250 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
274 http-request set-header Host site7.local251 http-request set-header Host site7.local
275 http-request set-header X-Cache-Request-IP %[src]252 http-request set-header X-Cache-Request-IP %[src]
276 http-check send hdr Host site7.local
277 http-check send hdr User-Agent haproxy/httpchk
278 option httpchk HEAD / HTTP/1.0
279 balance leastconn253 balance leastconn
280 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200254 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200
281255
282backend backend-site7-local256backend backend-site7-local
257 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
283 http-request set-header Host site7.local258 http-request set-header Host site7.local
284 http-check send hdr Host site7.local
285 http-check send hdr User-Agent haproxy/httpchk
286 option httpchk HEAD / HTTP/1.0
287 option redispatch 1259 option redispatch 1
288 balance leastconn260 balance leastconn
289 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200261 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
290262
291backend backend-cached-site8-local263backend backend-cached-site8-local
264 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
292 http-request set-header Host site8.local265 http-request set-header Host site8.local
293 http-request set-header X-Cache-Request-IP %[src]266 http-request set-header X-Cache-Request-IP %[src]
294 http-check send hdr Host site8.local
295 http-check send hdr User-Agent haproxy/httpchk
296 option httpchk HEAD / HTTP/1.0
297 balance leastconn267 balance leastconn
298 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200268 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200
299269
300backend backend-site8-local270backend backend-site8-local
271 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
301 http-request set-header Host site8.local272 http-request set-header Host site8.local
302 http-check send hdr Host site8.local
303 http-check send hdr User-Agent haproxy/httpchk
304 option httpchk HEAD / HTTP/1.0
305 option redispatch 1273 option redispatch 1
306 balance leastconn274 balance leastconn
307 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200275 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
308276
309backend backend-site8-local-2277backend backend-site8-local-2
278 option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk
310 http-request set-header Host auth.site8.local279 http-request set-header Host auth.site8.local
311 http-check send hdr Host auth.site8.local
312 http-check send hdr User-Agent haproxy/httpchk
313 option httpchk HEAD / HTTP/1.0
314 option redispatch 1280 option redispatch 1
315 balance leastconn281 balance leastconn
316 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt282 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt
317283
318backend backend-cached-site9-local284backend backend-cached-site9-local
285 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
319 http-request set-header Host site9.local286 http-request set-header Host site9.local
320 http-request set-header X-Cache-Request-IP %[src]287 http-request set-header X-Cache-Request-IP %[src]
321 http-check send hdr Host site9.local
322 http-check send hdr User-Agent haproxy/httpchk
323 option httpchk HEAD / HTTP/1.0
324 balance leastconn288 balance leastconn
325 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200289 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200
326290
327backend backend-site9-local291backend backend-site9-local
292 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
328 http-request set-header Host site9.local293 http-request set-header Host site9.local
329 http-check send hdr Host site9.local
330 http-check send hdr User-Agent haproxy/httpchk
331 option httpchk HEAD / HTTP/1.0
332 option redispatch 1294 option redispatch 1
333 balance leastconn295 balance leastconn
334 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200296 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt
index 1248506..b110384 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt
@@ -95,19 +95,15 @@ listen site1-local-2
95 default_backend backend-site1-local-295 default_backend backend-site1-local-2
9696
97backend backend-cached-site1-local97backend backend-cached-site1-local
98 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
98 http-request set-header Host site1.local99 http-request set-header Host site1.local
99 http-request set-header X-Cache-Request-IP %[src]100 http-request set-header X-Cache-Request-IP %[src]
100 http-check send hdr Host site1.local
101 http-check send hdr User-Agent haproxy/httpchk
102 option httpchk HEAD / HTTP/1.0
103 balance leastconn101 balance leastconn
104 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400102 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400
105103
106backend backend-site1-local104backend backend-site1-local
105 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
107 http-request set-header Host site1.local106 http-request set-header Host site1.local
108 http-check send hdr Host site1.local
109 http-check send hdr User-Agent haproxy/httpchk
110 option httpchk HEAD / HTTP/1.0
111 option allbackups107 option allbackups
112 option redispatch 1108 option redispatch 1
113 balance leastconn109 balance leastconn
@@ -115,10 +111,8 @@ backend backend-site1-local
115 server server_2 192.168.1.2:8080 backup check inter 5s rise 2 fall 5 maxconn 200111 server server_2 192.168.1.2:8080 backup check inter 5s rise 2 fall 5 maxconn 200
116112
117backend backend-site1-local-2113backend backend-site1-local-2
114 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
118 http-request set-header Host site1.local115 http-request set-header Host site1.local
119 http-check send hdr Host site1.local
120 http-check send hdr User-Agent haproxy/httpchk
121 option httpchk HEAD / HTTP/1.0
122 option redispatch 1116 option redispatch 1
123 balance leastconn117 balance leastconn
124 server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200118 server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt
index 6a2c85a..8ad76cb 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt
@@ -155,19 +155,15 @@ listen site9-local
155 default_backend backend-site9-local155 default_backend backend-site9-local
156156
157backend backend-cached-site1-local157backend backend-cached-site1-local
158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
158 http-request set-header Host site1.local159 http-request set-header Host site1.local
159 http-request set-header X-Cache-Request-IP %[src]160 http-request set-header X-Cache-Request-IP %[src]
160 http-check send hdr Host site1.local
161 http-check send hdr User-Agent haproxy/httpchk
162 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0
163 balance roundrobin161 balance roundrobin
164 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600
165163
166backend backend-site1-local164backend backend-site1-local
165 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
167 http-request set-header Host site1.local166 http-request set-header Host site1.local
168 http-check send hdr Host site1.local
169 http-check send hdr User-Agent haproxy/httpchk
170 option httpchk HEAD / HTTP/1.0
171 option redispatch 1167 option redispatch 1
172 balance roundrobin168 balance roundrobin
173 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200169 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
@@ -175,19 +171,15 @@ backend backend-site1-local
175 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200171 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
176172
177backend backend-cached-site2-local173backend backend-cached-site2-local
174 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
178 http-request set-header Host site2.local175 http-request set-header Host site2.local
179 http-request set-header X-Cache-Request-IP %[src]176 http-request set-header X-Cache-Request-IP %[src]
180 http-check send hdr Host site2.local
181 http-check send hdr User-Agent haproxy/httpchk
182 option httpchk GET /check/ HTTP/1.0
183 balance roundrobin177 balance roundrobin
184 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072178 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072
185179
186backend backend-site2-local180backend backend-site2-local
181 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
187 http-request set-header Host site2.local182 http-request set-header Host site2.local
188 http-check send hdr Host site2.local
189 http-check send hdr User-Agent haproxy/httpchk
190 option httpchk GET /check/ HTTP/1.0
191 option redispatch 1183 option redispatch 1
192 balance roundrobin184 balance roundrobin
193 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt185 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
@@ -195,19 +187,15 @@ backend backend-site2-local
195 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt187 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
196188
197backend backend-cached-site3-local189backend backend-cached-site3-local
190 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
198 http-request set-header Host site3.local191 http-request set-header Host site3.local
199 http-request set-header X-Cache-Request-IP %[src]192 http-request set-header X-Cache-Request-IP %[src]
200 http-check send hdr Host site3.local
201 http-check send hdr User-Agent haproxy/httpchk
202 option httpchk HEAD / HTTP/1.0
203 balance roundrobin193 balance roundrobin
204 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096194 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
205195
206backend backend-site3-local196backend backend-site3-local
197 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
207 http-request set-header Host site3.local198 http-request set-header Host site3.local
208 http-check send hdr Host site3.local
209 http-check send hdr User-Agent haproxy/httpchk
210 option httpchk HEAD / HTTP/1.0
211 option forwardfor except 127.0.0.1 192.168.1.1199 option forwardfor except 127.0.0.1 192.168.1.1
212 option forceclose200 option forceclose
213 option redispatch 1201 option redispatch 1
@@ -217,118 +205,92 @@ backend backend-site3-local
217 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200205 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
218206
219backend backend-cached-site4-local207backend backend-cached-site4-local
208 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk
220 http-request set-header Host site4.local209 http-request set-header Host site4.local
221 http-request set-header X-Cache-Request-IP %[src]210 http-request set-header X-Cache-Request-IP %[src]
222 http-check send hdr Host site4.local
223 http-check send hdr User-Agent haproxy/httpchk
224 option httpchk HEAD / HTTP/1.0
225 balance roundrobin211 balance roundrobin
226 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200212 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200
227213
228backend backend-cached-site5214backend backend-cached-site5
215 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
229 http-request set-header Host site5.local216 http-request set-header Host site5.local
230 http-request set-header X-Cache-Request-IP %[src]217 http-request set-header X-Cache-Request-IP %[src]
231 http-check send hdr Host site5.local
232 http-check send hdr User-Agent haproxy/httpchk
233 option httpchk HEAD / HTTP/1.0
234 balance roundrobin218 balance roundrobin
235 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200219 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200
236220
237backend backend-site5221backend backend-site5
222 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
238 http-request set-header Host site5.local223 http-request set-header Host site5.local
239 http-check send hdr Host site5.local
240 http-check send hdr User-Agent haproxy/httpchk
241 option httpchk HEAD / HTTP/1.0
242 option redispatch 1224 option redispatch 1
243 balance roundrobin225 balance roundrobin
244 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200226 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
245227
246backend backend-site5-2228backend backend-site5-2
229 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
247 http-request set-header Host site5.local230 http-request set-header Host site5.local
248 http-check send hdr Host site5.local
249 http-check send hdr User-Agent haproxy/httpchk
250 option httpchk HEAD / HTTP/1.0
251 option redispatch 1231 option redispatch 1
252 balance roundrobin232 balance roundrobin
253 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200233 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
254234
255backend backend-cached-site6-local235backend backend-cached-site6-local
236 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
256 http-request set-header Host site6.local237 http-request set-header Host site6.local
257 http-request set-header X-Cache-Request-IP %[src]238 http-request set-header X-Cache-Request-IP %[src]
258 http-check send hdr Host site6.local
259 http-check send hdr User-Agent haproxy/httpchk
260 option httpchk HEAD / HTTP/1.0
261 balance roundrobin239 balance roundrobin
262 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200240 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200
263241
264backend backend-site6-local242backend backend-site6-local
243 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
265 http-request set-header Host site6.local244 http-request set-header Host site6.local
266 http-check send hdr Host site6.local
267 http-check send hdr User-Agent haproxy/httpchk
268 option httpchk HEAD / HTTP/1.0
269 option redispatch 1245 option redispatch 1
270 balance roundrobin246 balance roundrobin
271 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt247 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt
272248
273backend backend-cached-site7-local249backend backend-cached-site7-local
250 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
274 http-request set-header Host site7.local251 http-request set-header Host site7.local
275 http-request set-header X-Cache-Request-IP %[src]252 http-request set-header X-Cache-Request-IP %[src]
276 http-check send hdr Host site7.local
277 http-check send hdr User-Agent haproxy/httpchk
278 option httpchk HEAD / HTTP/1.0
279 balance roundrobin253 balance roundrobin
280 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200254 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200
281255
282backend backend-site7-local256backend backend-site7-local
257 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
283 http-request set-header Host site7.local258 http-request set-header Host site7.local
284 http-check send hdr Host site7.local
285 http-check send hdr User-Agent haproxy/httpchk
286 option httpchk HEAD / HTTP/1.0
287 option redispatch 1259 option redispatch 1
288 balance roundrobin260 balance roundrobin
289 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200261 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
290262
291backend backend-cached-site8-local263backend backend-cached-site8-local
264 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
292 http-request set-header Host site8.local265 http-request set-header Host site8.local
293 http-request set-header X-Cache-Request-IP %[src]266 http-request set-header X-Cache-Request-IP %[src]
294 http-check send hdr Host site8.local
295 http-check send hdr User-Agent haproxy/httpchk
296 option httpchk HEAD / HTTP/1.0
297 balance roundrobin267 balance roundrobin
298 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200268 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200
299269
300backend backend-site8-local270backend backend-site8-local
271 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
301 http-request set-header Host site8.local272 http-request set-header Host site8.local
302 http-check send hdr Host site8.local
303 http-check send hdr User-Agent haproxy/httpchk
304 option httpchk HEAD / HTTP/1.0
305 option redispatch 1273 option redispatch 1
306 balance roundrobin274 balance roundrobin
307 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200275 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
308276
309backend backend-site8-local-2277backend backend-site8-local-2
278 option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk
310 http-request set-header Host auth.site8.local279 http-request set-header Host auth.site8.local
311 http-check send hdr Host auth.site8.local
312 http-check send hdr User-Agent haproxy/httpchk
313 option httpchk HEAD / HTTP/1.0
314 option redispatch 1280 option redispatch 1
315 balance roundrobin281 balance roundrobin
316 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt282 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt
317283
318backend backend-cached-site9-local284backend backend-cached-site9-local
285 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
319 http-request set-header Host site9.local286 http-request set-header Host site9.local
320 http-request set-header X-Cache-Request-IP %[src]287 http-request set-header X-Cache-Request-IP %[src]
321 http-check send hdr Host site9.local
322 http-check send hdr User-Agent haproxy/httpchk
323 option httpchk HEAD / HTTP/1.0
324 balance roundrobin288 balance roundrobin
325 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200289 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200
326290
327backend backend-site9-local291backend backend-site9-local
292 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
328 http-request set-header Host site9.local293 http-request set-header Host site9.local
329 http-check send hdr Host site9.local
330 http-check send hdr User-Agent haproxy/httpchk
331 option httpchk HEAD / HTTP/1.0
332 option redispatch 1294 option redispatch 1
333 balance roundrobin295 balance roundrobin
334 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200296 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt
index 557a128..fb75f2e 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt
@@ -156,19 +156,15 @@ listen site9-local
156 default_backend backend-site9-local156 default_backend backend-site9-local
157157
158backend backend-cached-site1-local158backend backend-cached-site1-local
159 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
159 http-request set-header Host site1.local160 http-request set-header Host site1.local
160 http-request set-header X-Cache-Request-IP %[src]161 http-request set-header X-Cache-Request-IP %[src]
161 http-check send hdr Host site1.local
162 http-check send hdr User-Agent haproxy/httpchk
163 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0
164 balance leastconn162 balance leastconn
165 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600163 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600
166164
167backend backend-site1-local165backend backend-site1-local
166 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
168 http-request set-header Host site1.local167 http-request set-header Host site1.local
169 http-check send hdr Host site1.local
170 http-check send hdr User-Agent haproxy/httpchk
171 option httpchk HEAD / HTTP/1.0
172 option redispatch 1168 option redispatch 1
173 balance leastconn169 balance leastconn
174 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200170 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
@@ -176,19 +172,15 @@ backend backend-site1-local
176 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200172 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
177173
178backend backend-cached-site2-local174backend backend-cached-site2-local
175 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
179 http-request set-header Host site2.local176 http-request set-header Host site2.local
180 http-request set-header X-Cache-Request-IP %[src]177 http-request set-header X-Cache-Request-IP %[src]
181 http-check send hdr Host site2.local
182 http-check send hdr User-Agent haproxy/httpchk
183 option httpchk GET /check/ HTTP/1.0
184 balance leastconn178 balance leastconn
185 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072179 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072
186180
187backend backend-site2-local181backend backend-site2-local
182 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
188 http-request set-header Host site2.local183 http-request set-header Host site2.local
189 http-check send hdr Host site2.local
190 http-check send hdr User-Agent haproxy/httpchk
191 option httpchk GET /check/ HTTP/1.0
192 option redispatch 1184 option redispatch 1
193 balance leastconn185 balance leastconn
194 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt186 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
@@ -196,19 +188,15 @@ backend backend-site2-local
196 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt188 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
197189
198backend backend-cached-site3-local190backend backend-cached-site3-local
191 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
199 http-request set-header Host site3.local192 http-request set-header Host site3.local
200 http-request set-header X-Cache-Request-IP %[src]193 http-request set-header X-Cache-Request-IP %[src]
201 http-check send hdr Host site3.local
202 http-check send hdr User-Agent haproxy/httpchk
203 option httpchk HEAD / HTTP/1.0
204 balance leastconn194 balance leastconn
205 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096195 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
206196
207backend backend-site3-local197backend backend-site3-local
198 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
208 http-request set-header Host site3.local199 http-request set-header Host site3.local
209 http-check send hdr Host site3.local
210 http-check send hdr User-Agent haproxy/httpchk
211 option httpchk HEAD / HTTP/1.0
212 option forwardfor except 127.0.0.1 192.168.1.1200 option forwardfor except 127.0.0.1 192.168.1.1
213 option forceclose201 option forceclose
214 option redispatch 1202 option redispatch 1
@@ -218,118 +206,92 @@ backend backend-site3-local
218 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200206 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
219207
220backend backend-cached-site4-local208backend backend-cached-site4-local
209 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk
221 http-request set-header Host site4.local210 http-request set-header Host site4.local
222 http-request set-header X-Cache-Request-IP %[src]211 http-request set-header X-Cache-Request-IP %[src]
223 http-check send hdr Host site4.local
224 http-check send hdr User-Agent haproxy/httpchk
225 option httpchk HEAD / HTTP/1.0
226 balance leastconn212 balance leastconn
227 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200213 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200
228214
229backend backend-cached-site5215backend backend-cached-site5
216 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
230 http-request set-header Host site5.local217 http-request set-header Host site5.local
231 http-request set-header X-Cache-Request-IP %[src]218 http-request set-header X-Cache-Request-IP %[src]
232 http-check send hdr Host site5.local
233 http-check send hdr User-Agent haproxy/httpchk
234 option httpchk HEAD / HTTP/1.0
235 balance leastconn219 balance leastconn
236 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200220 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200
237221
238backend backend-site5222backend backend-site5
223 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
239 http-request set-header Host site5.local224 http-request set-header Host site5.local
240 http-check send hdr Host site5.local
241 http-check send hdr User-Agent haproxy/httpchk
242 option httpchk HEAD / HTTP/1.0
243 option redispatch 1225 option redispatch 1
244 balance leastconn226 balance leastconn
245 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200227 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
246228
247backend backend-site5-2229backend backend-site5-2
230 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
248 http-request set-header Host site5.local231 http-request set-header Host site5.local
249 http-check send hdr Host site5.local
250 http-check send hdr User-Agent haproxy/httpchk
251 option httpchk HEAD / HTTP/1.0
252 option redispatch 1232 option redispatch 1
253 balance leastconn233 balance leastconn
254 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200234 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
255235
256backend backend-cached-site6-local236backend backend-cached-site6-local
237 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
257 http-request set-header Host site6.local238 http-request set-header Host site6.local
258 http-request set-header X-Cache-Request-IP %[src]239 http-request set-header X-Cache-Request-IP %[src]
259 http-check send hdr Host site6.local
260 http-check send hdr User-Agent haproxy/httpchk
261 option httpchk HEAD / HTTP/1.0
262 balance leastconn240 balance leastconn
263 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200241 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200
264242
265backend backend-site6-local243backend backend-site6-local
244 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
266 http-request set-header Host site6.local245 http-request set-header Host site6.local
267 http-check send hdr Host site6.local
268 http-check send hdr User-Agent haproxy/httpchk
269 option httpchk HEAD / HTTP/1.0
270 option redispatch 1246 option redispatch 1
271 balance leastconn247 balance leastconn
272 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt248 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt
273249
274backend backend-cached-site7-local250backend backend-cached-site7-local
251 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
275 http-request set-header Host site7.local252 http-request set-header Host site7.local
276 http-request set-header X-Cache-Request-IP %[src]253 http-request set-header X-Cache-Request-IP %[src]
277 http-check send hdr Host site7.local
278 http-check send hdr User-Agent haproxy/httpchk
279 option httpchk HEAD / HTTP/1.0
280 balance leastconn254 balance leastconn
281 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200255 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200
282256
283backend backend-site7-local257backend backend-site7-local
258 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
284 http-request set-header Host site7.local259 http-request set-header Host site7.local
285 http-check send hdr Host site7.local
286 http-check send hdr User-Agent haproxy/httpchk
287 option httpchk HEAD / HTTP/1.0
288 option redispatch 1260 option redispatch 1
289 balance leastconn261 balance leastconn
290 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200262 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
291263
292backend backend-cached-site8-local264backend backend-cached-site8-local
265 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
293 http-request set-header Host site8.local266 http-request set-header Host site8.local
294 http-request set-header X-Cache-Request-IP %[src]267 http-request set-header X-Cache-Request-IP %[src]
295 http-check send hdr Host site8.local
296 http-check send hdr User-Agent haproxy/httpchk
297 option httpchk HEAD / HTTP/1.0
298 balance leastconn268 balance leastconn
299 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200269 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200
300270
301backend backend-site8-local271backend backend-site8-local
272 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
302 http-request set-header Host site8.local273 http-request set-header Host site8.local
303 http-check send hdr Host site8.local
304 http-check send hdr User-Agent haproxy/httpchk
305 option httpchk HEAD / HTTP/1.0
306 option redispatch 1274 option redispatch 1
307 balance leastconn275 balance leastconn
308 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200276 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
309277
310backend backend-site8-local-2278backend backend-site8-local-2
279 option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk
311 http-request set-header Host auth.site8.local280 http-request set-header Host auth.site8.local
312 http-check send hdr Host auth.site8.local
313 http-check send hdr User-Agent haproxy/httpchk
314 option httpchk HEAD / HTTP/1.0
315 option redispatch 1281 option redispatch 1
316 balance leastconn282 balance leastconn
317 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt283 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt
318284
319backend backend-cached-site9-local285backend backend-cached-site9-local
286 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
320 http-request set-header Host site9.local287 http-request set-header Host site9.local
321 http-request set-header X-Cache-Request-IP %[src]288 http-request set-header X-Cache-Request-IP %[src]
322 http-check send hdr Host site9.local
323 http-check send hdr User-Agent haproxy/httpchk
324 option httpchk HEAD / HTTP/1.0
325 balance leastconn289 balance leastconn
326 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200290 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200
327291
328backend backend-site9-local292backend backend-site9-local
293 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
329 http-request set-header Host site9.local294 http-request set-header Host site9.local
330 http-check send hdr Host site9.local
331 http-check send hdr User-Agent haproxy/httpchk
332 option httpchk HEAD / HTTP/1.0
333 option redispatch 1295 option redispatch 1
334 balance leastconn296 balance leastconn
335 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200297 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt
index f232c44..f6c4138 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt
@@ -155,19 +155,15 @@ listen site9-local
155 default_backend backend-site9-local155 default_backend backend-site9-local
156156
157backend backend-cached-site1-local157backend backend-cached-site1-local
158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
158 http-request set-header Host site1.local159 http-request set-header Host site1.local
159 http-request set-header X-Cache-Request-IP %[src]160 http-request set-header X-Cache-Request-IP %[src]
160 http-check send hdr Host site1.local
161 http-check send hdr User-Agent haproxy/httpchk
162 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0
163 balance leastconn161 balance leastconn
164 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600
165163
166backend backend-site1-local164backend backend-site1-local
165 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
167 http-request set-header Host site1.local166 http-request set-header Host site1.local
168 http-check send hdr Host site1.local
169 http-check send hdr User-Agent haproxy/httpchk
170 option httpchk HEAD / HTTP/1.0
171 retry-on all-retryable-errors167 retry-on all-retryable-errors
172 option redispatch 1168 option redispatch 1
173 balance leastconn169 balance leastconn
@@ -176,19 +172,15 @@ backend backend-site1-local
176 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200172 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
177173
178backend backend-cached-site2-local174backend backend-cached-site2-local
175 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
179 http-request set-header Host site2.local176 http-request set-header Host site2.local
180 http-request set-header X-Cache-Request-IP %[src]177 http-request set-header X-Cache-Request-IP %[src]
181 http-check send hdr Host site2.local
182 http-check send hdr User-Agent haproxy/httpchk
183 option httpchk GET /check/ HTTP/1.0
184 balance leastconn178 balance leastconn
185 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072179 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072
186180
187backend backend-site2-local181backend backend-site2-local
182 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
188 http-request set-header Host site2.local183 http-request set-header Host site2.local
189 http-check send hdr Host site2.local
190 http-check send hdr User-Agent haproxy/httpchk
191 option httpchk GET /check/ HTTP/1.0
192 retry-on all-retryable-errors184 retry-on all-retryable-errors
193 option redispatch 1185 option redispatch 1
194 balance leastconn186 balance leastconn
@@ -197,19 +189,15 @@ backend backend-site2-local
197 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt189 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
198190
199backend backend-cached-site3-local191backend backend-cached-site3-local
192 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
200 http-request set-header Host site3.local193 http-request set-header Host site3.local
201 http-request set-header X-Cache-Request-IP %[src]194 http-request set-header X-Cache-Request-IP %[src]
202 http-check send hdr Host site3.local
203 http-check send hdr User-Agent haproxy/httpchk
204 option httpchk HEAD / HTTP/1.0
205 balance leastconn195 balance leastconn
206 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096196 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
207197
208backend backend-site3-local198backend backend-site3-local
199 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
209 http-request set-header Host site3.local200 http-request set-header Host site3.local
210 http-check send hdr Host site3.local
211 http-check send hdr User-Agent haproxy/httpchk
212 option httpchk HEAD / HTTP/1.0
213 option forwardfor except 127.0.0.1 192.168.1.1201 option forwardfor except 127.0.0.1 192.168.1.1
214 option forceclose202 option forceclose
215 retry-on all-retryable-errors203 retry-on all-retryable-errors
@@ -220,124 +208,98 @@ backend backend-site3-local
220 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200208 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
221209
222backend backend-cached-site4-local210backend backend-cached-site4-local
211 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk
223 http-request set-header Host site4.local212 http-request set-header Host site4.local
224 http-request set-header X-Cache-Request-IP %[src]213 http-request set-header X-Cache-Request-IP %[src]
225 http-check send hdr Host site4.local
226 http-check send hdr User-Agent haproxy/httpchk
227 option httpchk HEAD / HTTP/1.0
228 balance leastconn214 balance leastconn
229 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200215 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200
230216
231backend backend-cached-site5217backend backend-cached-site5
218 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
232 http-request set-header Host site5.local219 http-request set-header Host site5.local
233 http-request set-header X-Cache-Request-IP %[src]220 http-request set-header X-Cache-Request-IP %[src]
234 http-check send hdr Host site5.local
235 http-check send hdr User-Agent haproxy/httpchk
236 option httpchk HEAD / HTTP/1.0
237 balance leastconn221 balance leastconn
238 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200222 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200
239223
240backend backend-site5224backend backend-site5
225 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
241 http-request set-header Host site5.local226 http-request set-header Host site5.local
242 http-check send hdr Host site5.local
243 http-check send hdr User-Agent haproxy/httpchk
244 option httpchk HEAD / HTTP/1.0
245 retry-on all-retryable-errors227 retry-on all-retryable-errors
246 option redispatch 1228 option redispatch 1
247 balance leastconn229 balance leastconn
248 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200230 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
249231
250backend backend-site5-2232backend backend-site5-2
233 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
251 http-request set-header Host site5.local234 http-request set-header Host site5.local
252 http-check send hdr Host site5.local
253 http-check send hdr User-Agent haproxy/httpchk
254 option httpchk HEAD / HTTP/1.0
255 retry-on all-retryable-errors235 retry-on all-retryable-errors
256 option redispatch 1236 option redispatch 1
257 balance leastconn237 balance leastconn
258 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200238 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
259239
260backend backend-cached-site6-local240backend backend-cached-site6-local
241 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
261 http-request set-header Host site6.local242 http-request set-header Host site6.local
262 http-request set-header X-Cache-Request-IP %[src]243 http-request set-header X-Cache-Request-IP %[src]
263 http-check send hdr Host site6.local
264 http-check send hdr User-Agent haproxy/httpchk
265 option httpchk HEAD / HTTP/1.0
266 balance leastconn244 balance leastconn
267 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200245 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200
268246
269backend backend-site6-local247backend backend-site6-local
248 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
270 http-request set-header Host site6.local249 http-request set-header Host site6.local
271 http-check send hdr Host site6.local
272 http-check send hdr User-Agent haproxy/httpchk
273 option httpchk HEAD / HTTP/1.0
274 retry-on all-retryable-errors250 retry-on all-retryable-errors
275 option redispatch 1251 option redispatch 1
276 balance leastconn252 balance leastconn
277 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt253 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt
278254
279backend backend-cached-site7-local255backend backend-cached-site7-local
256 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
280 http-request set-header Host site7.local257 http-request set-header Host site7.local
281 http-request set-header X-Cache-Request-IP %[src]258 http-request set-header X-Cache-Request-IP %[src]
282 http-check send hdr Host site7.local
283 http-check send hdr User-Agent haproxy/httpchk
284 option httpchk HEAD / HTTP/1.0
285 balance leastconn259 balance leastconn
286 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200260 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200
287261
288backend backend-site7-local262backend backend-site7-local
263 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
289 http-request set-header Host site7.local264 http-request set-header Host site7.local
290 http-check send hdr Host site7.local
291 http-check send hdr User-Agent haproxy/httpchk
292 option httpchk HEAD / HTTP/1.0
293 retry-on all-retryable-errors265 retry-on all-retryable-errors
294 option redispatch 1266 option redispatch 1
295 balance leastconn267 balance leastconn
296 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200268 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
297269
298backend backend-cached-site8-local270backend backend-cached-site8-local
271 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
299 http-request set-header Host site8.local272 http-request set-header Host site8.local
300 http-request set-header X-Cache-Request-IP %[src]273 http-request set-header X-Cache-Request-IP %[src]
301 http-check send hdr Host site8.local
302 http-check send hdr User-Agent haproxy/httpchk
303 option httpchk HEAD / HTTP/1.0
304 balance leastconn274 balance leastconn
305 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200275 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200
306276
307backend backend-site8-local277backend backend-site8-local
278 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
308 http-request set-header Host site8.local279 http-request set-header Host site8.local
309 http-check send hdr Host site8.local
310 http-check send hdr User-Agent haproxy/httpchk
311 option httpchk HEAD / HTTP/1.0
312 retry-on all-retryable-errors280 retry-on all-retryable-errors
313 option redispatch 1281 option redispatch 1
314 balance leastconn282 balance leastconn
315 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200283 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
316284
317backend backend-site8-local-2285backend backend-site8-local-2
286 option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk
318 http-request set-header Host auth.site8.local287 http-request set-header Host auth.site8.local
319 http-check send hdr Host auth.site8.local
320 http-check send hdr User-Agent haproxy/httpchk
321 option httpchk HEAD / HTTP/1.0
322 retry-on all-retryable-errors288 retry-on all-retryable-errors
323 option redispatch 1289 option redispatch 1
324 balance leastconn290 balance leastconn
325 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt291 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt
326292
327backend backend-cached-site9-local293backend backend-cached-site9-local
294 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
328 http-request set-header Host site9.local295 http-request set-header Host site9.local
329 http-request set-header X-Cache-Request-IP %[src]296 http-request set-header X-Cache-Request-IP %[src]
330 http-check send hdr Host site9.local
331 http-check send hdr User-Agent haproxy/httpchk
332 option httpchk HEAD / HTTP/1.0
333 balance leastconn297 balance leastconn
334 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200298 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200
335299
336backend backend-site9-local300backend backend-site9-local
301 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
337 http-request set-header Host site9.local302 http-request set-header Host site9.local
338 http-check send hdr Host site9.local
339 http-check send hdr User-Agent haproxy/httpchk
340 option httpchk HEAD / HTTP/1.0
341 retry-on all-retryable-errors303 retry-on all-retryable-errors
342 option redispatch 1304 option redispatch 1
343 balance leastconn305 balance leastconn
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt
index d25cb73..72b12df 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt
@@ -90,19 +90,15 @@ listen site1-local
90 default_backend backend-site1-local90 default_backend backend-site1-local
9191
92backend backend-cached-site1-local92backend backend-cached-site1-local
93 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
93 http-request set-header Host site1.local94 http-request set-header Host site1.local
94 http-request set-header X-Cache-Request-IP %[src]95 http-request set-header X-Cache-Request-IP %[src]
95 http-check send hdr Host site1.local
96 http-check send hdr User-Agent haproxy/httpchk
97 option httpchk HEAD / HTTP/1.0
98 balance leastconn96 balance leastconn
99 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 40097 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400
10098
101backend backend-site1-local99backend backend-site1-local
100 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
102 http-request set-header Host site1.local101 http-request set-header Host site1.local
103 http-check send hdr Host site1.local
104 http-check send hdr User-Agent haproxy/httpchk
105 option httpchk HEAD / HTTP/1.0
106 option redispatch 1102 option redispatch 1
107 balance leastconn103 balance leastconn
108 server-template server_1_ 2 _http._tcp.us.archive.ubuntu.com:80 resolvers dns init-addr last,libc,none check inter 5s rise 2 fall 5 maxconn 200104 server-template server_1_ 2 _http._tcp.us.archive.ubuntu.com:80 resolvers dns init-addr last,libc,none check inter 5s rise 2 fall 5 maxconn 200
diff --git a/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt b/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt
index 0e56720..227a011 100644
--- a/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt
+++ b/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt
@@ -1,29 +1,23 @@
11
2backend backend-site1-local2backend backend-site1-local
3 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
3 http-request set-header Host site1.local4 http-request set-header Host site1.local
4 http-check send hdr Host site1.local
5 http-check send hdr User-Agent haproxy/httpchk
6 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0
7 balance leastconn5 balance leastconn
8 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2006 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
9 server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 2007 server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
10 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 2008 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
119
12backend backend-site2-local10backend backend-site2-local
11 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
13 http-request set-header Host site2.local12 http-request set-header Host site2.local
14 http-check send hdr Host site2.local
15 http-check send hdr User-Agent haproxy/httpchk
16 option httpchk GET /check/ HTTP/1.0
17 balance leastconn13 balance leastconn
18 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt14 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
19 server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt15 server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
20 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt16 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
2117
22backend backend-site3-local18backend backend-site3-local
19 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
23 http-request set-header Host site3.local20 http-request set-header Host site3.local
24 http-check send hdr Host site3.local
25 http-check send hdr User-Agent haproxy/httpchk
26 option httpchk HEAD / HTTP/1.0
27 option forwardfor except 127.0.0.1 192.168.1.121 option forwardfor except 127.0.0.1 192.168.1.1
28 option forceclose22 option forceclose
29 balance leastconn23 balance leastconn
@@ -32,57 +26,43 @@ backend backend-site3-local
32 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 20026 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
3327
34backend backend-site528backend backend-site5
29 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
35 http-request set-header Host site5.local30 http-request set-header Host site5.local
36 http-check send hdr Host site5.local
37 http-check send hdr User-Agent haproxy/httpchk
38 option httpchk HEAD / HTTP/1.0
39 balance leastconn31 balance leastconn
40 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 20032 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
4133
42backend backend-site5-234backend backend-site5-2
35 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
43 http-request set-header Host site5.local36 http-request set-header Host site5.local
44 http-check send hdr Host site5.local
45 http-check send hdr User-Agent haproxy/httpchk
46 option httpchk HEAD / HTTP/1.0
47 balance leastconn37 balance leastconn
48 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 20038 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
4939
50backend backend-site6-local40backend backend-site6-local
41 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
51 http-request set-header Host site6.local42 http-request set-header Host site6.local
52 http-check send hdr Host site6.local
53 http-check send hdr User-Agent haproxy/httpchk
54 option httpchk HEAD / HTTP/1.0
55 balance leastconn43 balance leastconn
56 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt44 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt
5745
58backend backend-site7-local46backend backend-site7-local
47 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
59 http-request set-header Host site7.local48 http-request set-header Host site7.local
60 http-check send hdr Host site7.local
61 http-check send hdr User-Agent haproxy/httpchk
62 option httpchk HEAD / HTTP/1.0
63 balance leastconn49 balance leastconn
64 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 20050 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
6551
66backend backend-site8-local52backend backend-site8-local
53 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
67 http-request set-header Host site8.local54 http-request set-header Host site8.local
68 http-check send hdr Host site8.local
69 http-check send hdr User-Agent haproxy/httpchk
70 option httpchk HEAD / HTTP/1.0
71 balance leastconn55 balance leastconn
72 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 20056 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
7357
74backend backend-site8-local-258backend backend-site8-local-2
59 option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk
75 http-request set-header Host auth.site8.local60 http-request set-header Host auth.site8.local
76 http-check send hdr Host auth.site8.local
77 http-check send hdr User-Agent haproxy/httpchk
78 option httpchk HEAD / HTTP/1.0
79 balance leastconn61 balance leastconn
80 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt62 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt
8163
82backend backend-site9-local64backend backend-site9-local
65 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
83 http-request set-header Host site9.local66 http-request set-header Host site9.local
84 http-check send hdr Host site9.local
85 http-check send hdr User-Agent haproxy/httpchk
86 option httpchk HEAD / HTTP/1.0
87 balance leastconn67 balance leastconn
88 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 20068 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200
diff --git a/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt b/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt
index 1c8ea3c..e5812ab 100644
--- a/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt
+++ b/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt
@@ -1,8 +1,6 @@
11
2backend backend-site1-local2backend backend-site1-local
3 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
3 http-request set-header Host site1.local4 http-request set-header Host site1.local
4 http-check send hdr Host site1.local
5 http-check send hdr User-Agent haproxy/httpchk
6 option httpchk HEAD / HTTP/1.0
7 balance leastconn5 balance leastconn
8 server server_1 archive.ubuntu.com:80 resolvers dns init-addr last,libc,none check inter 5s rise 2 fall 5 maxconn 2006 server server_1 archive.ubuntu.com:80 resolvers dns init-addr last,libc,none check inter 5s rise 2 fall 5 maxconn 200
diff --git a/tests/unit/files/haproxy_config_rendered_test_output.txt b/tests/unit/files/haproxy_config_rendered_test_output.txt
index 650b4fd..0de7d52 100644
--- a/tests/unit/files/haproxy_config_rendered_test_output.txt
+++ b/tests/unit/files/haproxy_config_rendered_test_output.txt
@@ -106,30 +106,24 @@ listen combined-444
106 use_backend backend-site8-local if { hdr(Host) -i site8.local }106 use_backend backend-site8-local if { hdr(Host) -i site8.local }
107107
108backend backend-site1-local108backend backend-site1-local
109 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
109 http-request set-header Host site1.local110 http-request set-header Host site1.local
110 http-check send hdr Host site1.local
111 http-check send hdr User-Agent haproxy/httpchk
112 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0
113 balance leastconn111 balance leastconn
114 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200112 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
115 server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200113 server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
116 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200114 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
117115
118backend backend-site2-local116backend backend-site2-local
117 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
119 http-request set-header Host site2.local118 http-request set-header Host site2.local
120 http-check send hdr Host site2.local
121 http-check send hdr User-Agent haproxy/httpchk
122 option httpchk GET /check/ HTTP/1.0
123 balance leastconn119 balance leastconn
124 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt120 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
125 server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt121 server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
126 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt122 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
127123
128backend backend-site3-local124backend backend-site3-local
125 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
129 http-request set-header Host site3.local126 http-request set-header Host site3.local
130 http-check send hdr Host site3.local
131 http-check send hdr User-Agent haproxy/httpchk
132 option httpchk HEAD / HTTP/1.0
133 option forwardfor except 127.0.0.1 192.168.1.1127 option forwardfor except 127.0.0.1 192.168.1.1
134 option forceclose128 option forceclose
135 balance leastconn129 balance leastconn
@@ -138,57 +132,43 @@ backend backend-site3-local
138 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200132 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
139133
140backend backend-site5134backend backend-site5
135 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
141 http-request set-header Host site5.local136 http-request set-header Host site5.local
142 http-check send hdr Host site5.local
143 http-check send hdr User-Agent haproxy/httpchk
144 option httpchk HEAD / HTTP/1.0
145 balance leastconn137 balance leastconn
146 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200138 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
147139
148backend backend-site5-2140backend backend-site5-2
141 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
149 http-request set-header Host site5.local142 http-request set-header Host site5.local
150 http-check send hdr Host site5.local
151 http-check send hdr User-Agent haproxy/httpchk
152 option httpchk HEAD / HTTP/1.0
153 balance leastconn143 balance leastconn
154 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200144 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
155145
156backend backend-site6-local146backend backend-site6-local
147 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
157 http-request set-header Host site6.local148 http-request set-header Host site6.local
158 http-check send hdr Host site6.local
159 http-check send hdr User-Agent haproxy/httpchk
160 option httpchk HEAD / HTTP/1.0
161 balance leastconn149 balance leastconn
162 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt150 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt
163151
164backend backend-site7-local152backend backend-site7-local
153 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
165 http-request set-header Host site7.local154 http-request set-header Host site7.local
166 http-check send hdr Host site7.local
167 http-check send hdr User-Agent haproxy/httpchk
168 option httpchk HEAD / HTTP/1.0
169 balance leastconn155 balance leastconn
170 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200156 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
171157
172backend backend-site8-local158backend backend-site8-local
159 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
173 http-request set-header Host site8.local160 http-request set-header Host site8.local
174 http-check send hdr Host site8.local
175 http-check send hdr User-Agent haproxy/httpchk
176 option httpchk HEAD / HTTP/1.0
177 balance leastconn161 balance leastconn
178 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200162 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
179163
180backend backend-site8-local-2164backend backend-site8-local-2
165 option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk
181 http-request set-header Host auth.site8.local166 http-request set-header Host auth.site8.local
182 http-check send hdr Host auth.site8.local
183 http-check send hdr User-Agent haproxy/httpchk
184 option httpchk HEAD / HTTP/1.0
185 balance leastconn167 balance leastconn
186 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt168 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt
187169
188backend backend-site9-local170backend backend-site9-local
171 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
189 http-request set-header Host site9.local172 http-request set-header Host site9.local
190 http-check send hdr Host site9.local
191 http-check send hdr User-Agent haproxy/httpchk
192 option httpchk HEAD / HTTP/1.0
193 balance leastconn173 balance leastconn
194 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200174 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200
diff --git a/tests/unit/files/haproxy_config_rendered_test_output2.txt b/tests/unit/files/haproxy_config_rendered_test_output2.txt
index 44ecadc..cba6290 100644
--- a/tests/unit/files/haproxy_config_rendered_test_output2.txt
+++ b/tests/unit/files/haproxy_config_rendered_test_output2.txt
@@ -106,30 +106,24 @@ listen combined-444
106 use_backend backend-site8-local if { hdr(Host) -i site8.local }106 use_backend backend-site8-local if { hdr(Host) -i site8.local }
107107
108backend backend-site1-local108backend backend-site1-local
109 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
109 http-request set-header Host site1.local110 http-request set-header Host site1.local
110 http-check send hdr Host site1.local
111 http-check send hdr User-Agent haproxy/httpchk
112 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0
113 balance leastconn111 balance leastconn
114 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200112 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
115 server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200113 server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
116 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200114 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
117115
118backend backend-site2-local116backend backend-site2-local
117 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
119 http-request set-header Host site2.local118 http-request set-header Host site2.local
120 http-check send hdr Host site2.local
121 http-check send hdr User-Agent haproxy/httpchk
122 option httpchk GET /check/ HTTP/1.0
123 balance leastconn119 balance leastconn
124 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt120 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
125 server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt121 server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
126 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt122 server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt
127123
128backend backend-site3-local124backend backend-site3-local
125 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
129 http-request set-header Host site3.local126 http-request set-header Host site3.local
130 http-check send hdr Host site3.local
131 http-check send hdr User-Agent haproxy/httpchk
132 option httpchk HEAD / HTTP/1.0
133 option forwardfor except 127.0.0.1 192.168.1.1127 option forwardfor except 127.0.0.1 192.168.1.1
134 option forceclose128 option forceclose
135 balance leastconn129 balance leastconn
@@ -138,57 +132,43 @@ backend backend-site3-local
138 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200132 server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200
139133
140backend backend-site5134backend backend-site5
135 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
141 http-request set-header Host site5.local136 http-request set-header Host site5.local
142 http-check send hdr Host site5.local
143 http-check send hdr User-Agent haproxy/httpchk
144 option httpchk HEAD / HTTP/1.0
145 balance leastconn137 balance leastconn
146 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200138 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
147139
148backend backend-site5-2140backend backend-site5-2
141 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
149 http-request set-header Host site5.local142 http-request set-header Host site5.local
150 http-check send hdr Host site5.local
151 http-check send hdr User-Agent haproxy/httpchk
152 option httpchk HEAD / HTTP/1.0
153 balance leastconn143 balance leastconn
154 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200144 server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200
155145
156backend backend-site6-local146backend backend-site6-local
147 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
157 http-request set-header Host site6.local148 http-request set-header Host site6.local
158 http-check send hdr Host site6.local
159 http-check send hdr User-Agent haproxy/httpchk
160 option httpchk HEAD / HTTP/1.0
161 balance leastconn149 balance leastconn
162 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt150 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt
163151
164backend backend-site7-local152backend backend-site7-local
153 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
165 http-request set-header Host site7.local154 http-request set-header Host site7.local
166 http-check send hdr Host site7.local
167 http-check send hdr User-Agent haproxy/httpchk
168 option httpchk HEAD / HTTP/1.0
169 balance leastconn155 balance leastconn
170 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200156 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
171157
172backend backend-site8-local158backend backend-site8-local
159 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
173 http-request set-header Host site8.local160 http-request set-header Host site8.local
174 http-check send hdr Host site8.local
175 http-check send hdr User-Agent haproxy/httpchk
176 option httpchk HEAD / HTTP/1.0
177 balance leastconn161 balance leastconn
178 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200162 server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200
179163
180backend backend-site8-local-2164backend backend-site8-local-2
165 option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk
181 http-request set-header Host auth.site8.local166 http-request set-header Host auth.site8.local
182 http-check send hdr Host auth.site8.local
183 http-check send hdr User-Agent haproxy/httpchk
184 option httpchk HEAD / HTTP/1.0
185 balance leastconn167 balance leastconn
186 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt168 server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt
187169
188backend backend-site9-local170backend backend-site9-local
171 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
189 http-request set-header Host site9.local172 http-request set-header Host site9.local
190 http-check send hdr Host site9.local
191 http-check send hdr User-Agent haproxy/httpchk
192 option httpchk HEAD / HTTP/1.0
193 balance leastconn173 balance leastconn
194 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200174 server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200

Subscribers

People subscribed via source and target branches