Skip to content

Commit 3a018e5

Browse files
committed
set default weight for lb backends to 50 (to match lbcheck/blauw)
1 parent 97f19b3 commit 3a018e5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

roles/haproxy/templates/haproxy_backend.cfg.j2

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#---------------------------------------------------------------------
2222
#
2323
backend {{ application.name }}_be
24-
option httpchk {{ application.ha_method }} {{ application.ha_url }}
24+
option httpchk {{ application.ha_method }} {{ application.ha_url }}
2525
http-check send ver HTTP/1.1 hdr Host {{ application.vhost_name }}
2626

2727
{%if application.x_forwarded_port is defined %}
@@ -35,8 +35,8 @@
3535
cookie HTTPSERVERID insert nocache indirect httponly secure maxidle {{ haproxy_cookie_max_idle }}
3636

3737
{% for server in application.servers %}
38-
server {{ server.label }} {{ server.ip }}:{% if server.port is defined %}{{ server.port }}{% else %}{{ application.port }}{% endif %} cookie {{ server.label }} check inter 8000 fall 5 rise 2 maxconn {{ application.maxconn | default('35') }} {% if application.sslbackend is defined%} ssl verify required verifyhost {{ application.backend_vhost_name }} ca-file {{ application.backend_ca_file }}{% endif %} weight 100
39-
38+
server {{ server.label }} {{ server.ip }}:{% if server.port is defined %}{{ server.port }}{% else %}{{ application.port }}{% endif %} cookie {{ server.label }} check inter 8000 fall 5 rise 2 maxconn {{ application.maxconn | default('35') }} {% if application.sslbackend is defined%} ssl verify required verifyhost {{ application.backend_vhost_name }} ca-file {{ application.backend_ca_file }}{% endif %} weight 50
39+
4040
{% endfor %}
4141

4242
{% endfor %}
@@ -48,7 +48,7 @@
4848
#---------------------------------------------------------------------
4949
#
5050
backend {{ application.name }}_staging_be
51-
option httpchk {{ application.ha_method }} {{ application.ha_url }}
51+
option httpchk {{ application.ha_method }} {{ application.ha_url }}
5252
http-check send ver HTTP/1.1 hdr Host {{ application.vhost_name }}
5353

5454
{%if application.x_forwarded_port is defined %}
@@ -62,8 +62,8 @@
6262
cookie HTTPSERVERIDSTAGING insert nocache indirect httponly secure maxidle {{ haproxy_cookie_max_idle }}
6363

6464
{% for server in application.stagingservers %}
65-
server {{ server.label }} {{ server.ip }}:{{ application.port }} cookie {{ server.label }} check inter 8000 fall 5 rise 2 maxconn {{ application.maxconn | default('35') }} {% if application.sslbackend is defined%} ssl verify required verifyhost {{ application.backend_vhost_name }} ca-file {{ application.backend_ca_file }}{% endif %} weight 100
66-
65+
server {{ server.label }} {{ server.ip }}:{{ application.port }} cookie {{ server.label }} check inter 8000 fall 5 rise 2 maxconn {{ application.maxconn | default('35') }} {% if application.sslbackend is defined%} ssl verify required verifyhost {{ application.backend_vhost_name }} ca-file {{ application.backend_ca_file }}{% endif %} weight 50
66+
6767
{% endfor %}
6868
{% endif %}
6969
{% endfor %}

0 commit comments

Comments
 (0)