Created
May 23, 2016 20:34
-
-
Save ramr/ff0a6a12c99e6233fe2413570635a74e to your computer and use it in GitHub Desktop.
router-disable-sticky-tcp-sessions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/images/router/haproxy/conf/haproxy-config.template b/images/router/haproxy/conf/haproxy-config.template | |
index 82eb147..c06dc80 100644 | |
--- a/images/router/haproxy/conf/haproxy-config.template | |
+++ b/images/router/haproxy/conf/haproxy-config.template | |
@@ -239,7 +239,11 @@ backend be_tcp_{{$cfgIdx}} | |
{{ if ne (env "ROUTER_SYSLOG_ADDRESS" "") ""}} | |
option tcplog | |
{{ end }} | |
+{{ if eq (env "ROUTER_DISABLE_STICKY_SESSIONS" "") "" }} | |
balance source | |
+{{ else }} | |
+ balance leastconn | |
+{{ end }} | |
hash-type consistent | |
timeout check 5000ms | |
{{ range $idx, $endpoint := endpointsForAlias $cfg $serviceUnit }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment