# this config needs haproxy-1.1.28 or haproxy-1.2.1 global log 127.0.0.1 local0 log 127.0.0.1 local1 notice maxconn 8192 # total max connections per socket (dependent on ulimit) nbproc 2 # number of threads spread-checks 2 # t becomes possible to add some randomness in the check interval between 0 and +/- 50% user haproxy group haproxy daemon defaults mode http balance roundrobin # Type, roundrobin, source or leastconn option abortonclose # if an input channel is closed on the client side remove the request from the queue before it will get served option forwardfor # enable insert of X-Forwarded-For headers option httpchk # enable HTTP protocol to check on servers health option httpclose # disable keepalive (HAProxy does not yet support the HTTP keep-alive mode) option redispatch # if the server is totally stopped, the connection will fail and the proxy will rebalance the client to another server timeout check 3000 # time for httpchk timeout client 5000 # maximum inactivity time on the client side timeout connect 72000 # time to wait for a connection attempt to a server to succeed timeout http-keep-alive 5000 # Keep alive time timeout http-request 120000 # time for complete a request timeout queue 10000 # time to wait in the queue for a connection slot to be free timeout server 5000 # maximum inactivity time on the server side listen STATS 172.16.6.105:9090 stats enable stats uri / stats refresh 12s stats auth edominguez:mypass stats auth mvarela:otropass stats scope REGISTROS stats scope REGCYT stats scope REGCYT2 stats scope REGCYT3 stats scope FONDOS stats scope FONDOS2 frontend REGISTROS 172.16.6.105:80 bind 172.16.6.105:9091,:9092,:8010 bind 172.16.6.105:9095,:9096,:8090 bind 172.16.6.105:9094 acl regcyt2_rule url_dir REGCYT2 acl regcyt3_rule url_dir REGCYT3 use_backend REGCYT2 if regcyt2_rule use_backend REGCYT3 if regcyt3_rule default_backend REGCYT backend REGCYT cookie SERVERID insert nocache indirect fullconn 1600 server epmwserv epmwserv.main.unlugar.mx:9091 cookie A minconn 4 maxconn 300 check weight 1 server epmwserv epmwserv.main.unlugar.mx:9092 cookie B minconn 4 maxconn 300 check weight 1 server hrmsepws hrmsepws.main.unlugar.mx:8010 cookie C minconn 4 maxconn 300 check weight 1 server hrmsepws hrmsepws.main.unlugar.mx:9091 cookie D minconn 4 maxconn 300 check weight 1 backend REGCYT2 cookie SERVERID insert nocache indirect fullconn 1600 server epmwserv epmwserv.main.unlugar.mx:9095 cookie E minconn 4 maxconn 300 check weight 1 server epmwserv epmwserv.main.unlugar.mx:9096 cookie F minconn 4 maxconn 300 check weight 1 server hrmsepws hrmsepws.main.unlugar.mx:8090 cookie G minconn 4 maxconn 300 check weight 1 server hrmsepws hrmsepws.main.unlugar.mx:9092 cookie H minconn 4 maxconn 300 check weight 1 backend REGCYT3 cookie SERVERID insert nocache indirect fullconn 1600 server hrmsepws hrmsepws.main.unlugar.mx:9094 cookie I minconn 4 maxconn 300 check weight 1 server hrmsepws hrmsepws.main.unlugar.mx:9095 cookie J minconn 4 maxconn 300 check weight 1 frontend FONDOS 172.16.6.105:81 bind :9093 bind :9097,:9098 acl fondos2_rule url_dir FONDOS2 use_backend FONDOS2 if fondos2_rule default_backend FONDOS backend FONDOS cookie SERVERID insert nocache indirect fullconn 1600 server epmwserv epmwserv.main.unlugar.mx:9093 cookie K minconn 4 maxconn 300 check weight 1 server hrmsepws hrmsepws.main.unlugar.mx:9093 cookie L minconn 4 maxconn 300 check weight 1 backend FONDOS2 cookie SERVERID insert nocache indirect fullconn 1600 server epmwserv epmwserv.main.unlugar.mx:9098 cookie M minconn 4 maxconn 300 check weight 1 server hrmsepws hrmsepws.main.unlugar.mx:9097 cookie N minconn 4 maxconn 300 check weight 1