contrail-api: change default "balance" option to leastconn
Current balance default "roundrobin" is not good for performance,
as with it we can end up with several "heavy" requests going
to the same worker. With "leastconn" method, the request is scheduled
to a worker with the least active sessions, therefore we avoid performance
issue when several requests are queueing at one worker.
Related-PROD: PROD-35897
Change-Id: I0098391ba92b7fd62e0326a34d8580062a708f81
diff --git a/haproxy/files/haproxy.cfg b/haproxy/files/haproxy.cfg
index 9fa605e..96228dd 100644
--- a/haproxy/files/haproxy.cfg
+++ b/haproxy/files/haproxy.cfg
@@ -170,7 +170,7 @@
{%- for option in listen.get('options', []) %}
option {{ option }}
{%- endfor %}
- balance {{ listen.get('balance', 'roundrobin') }}
+ balance {{ listen.get('balance', 'leastconn') }}
{%- elif listen.get('type', None) == 'contrail-analytics' %}
{%- for option in listen.get('options', []) %}
option {{ option }}