1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-14 18:27:25 +08:00
docker-labs/haproxy/haproxy.cfg
Marcos Nils a4b0a98df3 Scaling (#109)
Make PWD scalable
2017-03-13 18:07:20 -03:00

33 lines
707 B
INI

defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend http-in
bind *:8080
acl host_localhost hdr(host) localhost
acl host_pwd1 hdr_reg(host) -i ^.*\.?host1\.localhost$
acl host_pwd2 hdr_reg(host) -i ^.*\.?host2\.localhost$
use_backend all if host_localhost
use_backend pwd1 if host_pwd1
use_backend pwd2 if host_pwd2
backend all
balance roundrobin
option httpchk GET /ping HTTP/1.0
http-check expect rstatus 200
default-server inter 3s fall 3 rise 2
server node1 pwd1:3000 check
server node2 pwd2:3000 check
backend pwd1
server node1 pwd1:3000
backend pwd2
server node2 pwd2:3000