anchor.diff:  defaults
     log  global
     maxconn  8000
  +  source <%="#{node[:bcpc][:management][:vip]}"%>
     mode  http
     option tcplog
     option dontlognull
     option nolinger
     option  redispatch
     retries  3
  -  stats  enable
     timeout  http-request 10s
     timeout  queue 1m
     timeout  connect 5s
  
positive.code:   option  tcplog
    option tcpka
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:443 check" %>
  <% end -%>
  
  listen memcached <%="#{node[:bcpc][:management][:vip]}"%>:11211
    mode tcp
    balance  source
    option tcpka
    server myself 127.0.0.1:11211 check
  
negative.code:   stats realm Haproxy\ Statistics
    stats auth <%="#{get_config('haproxy-stats-user')}"%>:<%="#{get_config('haproxy-stats-password')}"%>
  
  listen stats-vip <%="#{node[:bcpc][:management][:vip]}"%>:1936
    mode http
    server myself <%="#{node[:bcpc][:management][:ip]}"%>:1936
  
  listen mysql-galera <%="#{node[:bcpc][:management][:vip]}"%>:3306
    timeout  client 1h
    timeout  server 1h
    mode tcp
    balance leastconn
    option  tcplog
    option tcpka
    option httpchk
  <% @servers.each do |server| -%>
    <%= "server #{server.hostname} #{server[:bcpc][:management][:ip]}:3306 check port 3307 inter 1s rise 1 fall 1 observe layer4" %>
  <% end -%>
  
  listen rabbitmq-amqp <%="#{node[:bcpc][:management][:vip]}"%>:5672
  