Skip to content

Commit 6d0b137

Browse files
adk3798ShwetaBhosale1
authored andcommitted
mgr/cephadm: change balance in haproxy cfg to roundrobin in tcp mode
This was recommended to better support large deployments that are trying to send lots of data per client and want multiple backend gateways serving each client Signed-off-by: Adam King <[email protected]>
1 parent 588d831 commit 6d0b137

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/pybind/mgr/cephadm/templates/services/ingress/haproxy.cfg.j2

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ backend backend
8686
{% endif %}
8787
{% if mode == 'tcp' %}
8888
mode tcp
89-
balance source
90-
hash-type consistent
89+
balance roundrobin
9190
{% if default_server_opts %}
9291
default-server {{ default_server_opts|join(" ") }}
9392
{% endif %}

src/pybind/mgr/cephadm/tests/test_services.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,8 +2786,7 @@ def fake_get_addr(hostname: str) -> str:
27862786
' default_backend backend\n\n'
27872787
'backend backend\n'
27882788
' mode tcp\n'
2789-
' balance source\n'
2790-
' hash-type consistent\n'
2789+
' balance roundrobin\n'
27912790
)
27922791
if enable_haproxy_protocol:
27932792
haproxy_txt += ' default-server send-proxy-v2\n'
@@ -3606,8 +3605,7 @@ def fake_keys():
36063605
' default_backend backend\n\n'
36073606
'backend backend\n'
36083607
' mode tcp\n'
3609-
' balance source\n'
3610-
' hash-type consistent\n'
3608+
' balance roundrobin\n'
36113609
' default-server send-proxy-v2\n'
36123610
' server nfs.foo.0 192.168.122.111:12049 check\n'
36133611
)

0 commit comments

Comments
 (0)