Permalink
Find file Copy path
55 lines (47 sloc) 1.68 KB
global
...
frontend mysql_ro
<% (1..@nbproc.to_i).each do |proc| %>
bind 0.0.0.0:3306 process <%= proc %>
<% end %>
mode tcp
acl mysql_not_enough_capacity nbsrv(mysql_ro_main) lt 2
use_backend mysql_ro_backup if mysql_not_enough_capacity
default_backend mysql_ro_main
maxconn 20000
timeout client 86400000
backend mysql_ro_main
option httpchk GET /check-lag
http-check disable-on-404
balance roundrobin
retries 1
timeout connect 1000
timeout check 300
timeout server 86400000
default-server port 9876 fall 2 inter 5000 rise 1 downinter 5000 on-marked-down shutdown-sessions weight 10
server my-db-0001 my-db-0001.heliumcarbon.com:3306 check
server my-db-0002 my-db-0002.heliumcarbon.com:3306 check
server my-db-0003 my-db-0003.heliumcarbon.com:3306 check
server my-db-0004 my-db-0004.heliumcarbon.com:3306 check
server my-db-0005 my-db-0005.heliumcarbon.com:3306 check
server my-db-0006 my-db-0006.heliumcarbon.com:3306 check
backend mysql_ro_backup
option httpchk GET /ignore-lag
http-check disable-on-404
balance roundrobin
retries 1
timeout connect 1000
timeout check 300
timeout server 86400000
default-server port 9876 fall 2 inter 10000 rise 1 downinter 10000 on-marked-down shutdown-sessions weight 10
server my-db-0001 my-db-0001.heliumcarbon.com:3306 check
server my-db-0002 my-db-0002.heliumcarbon.com:3306 check
server my-db-0003 my-db-0003.heliumcarbon.com:3306 check
server my-db-0004 my-db-0004.heliumcarbon.com:3306 check
server my-db-0005 my-db-0005.heliumcarbon.com:3306 check
server my-db-0006 my-db-0006.heliumcarbon.com:3306 check
listen monitoring 0.0.0.0:1234
mode health
option tcplog
listen statsctl
...