global
    log 127.0.0.1   local1 info
    daemon
    user vcap
    group vcap
    maxconn 64000

defaults
    log global
    timeout connect 30000ms
    timeout client <%= p("request_timeout_in_seconds").to_i * 1000 %>ms
    timeout server <%= p("request_timeout_in_seconds").to_i * 1000 %>ms

listen mysql-cluster
    stick-table type ip size 1
    stick on dst
    bind 0.0.0.0:3306
    option httpchk GET / HTTP/1.1\r\nHost:\ www
    mode tcp
    option tcplog
<% p('mysql_ips').each do |ip| %>
    server mysql-0 <%= ip %>:3306 check port 9200 inter 5000 rise 2 fall 1
<% end %>

listen stats :1936
    mode http
    stats enable
    stats uri /
    stats auth admin:<%= p("haproxy_stats_password") %>

global
    log 127.0.0.1   local1 info
    daemon
    user vcap
    group vcap
    maxconn 64000

defaults
    log global
    timeout connect 30000ms
    timeout client <%= p("request_timeout_in_seconds").to_i * 1000 %>ms
    timeout server <%= p("request_timeout_in_seconds").to_i * 1000 %>ms

listen mysql-cluster
    stick-table type ip size 65000
    stick on dst
    bind 0.0.0.0:3306
    option httpchk GET / HTTP/1.1\r\nHost:\ www
    mode tcp
    option tcplog
<% p('mysql_ips').each_with_index do |ip, idx| %>
    server mysql-<%= idx %> <%= ip %>:3306 check port 9200 inter 5000 rise 2 fall 1
<% end %>

listen stats :1936
    mode http
    stats enable
    stats uri /
    stats auth admin:<%= p("haproxy_stats_password") %>

Increase HAProxy stick table size.
Increase HAProxy stick table size.

[#77823944]
