1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-04 01:17:49 +08:00
Make PWD scalable
This commit is contained in:
Marcos Nils
2017-03-13 18:07:20 -03:00
committed by Jonathan Leibiusky
parent 7df7a7c68f
commit a4b0a98df3
9 changed files with 103 additions and 21 deletions

32
haproxy/haproxy.cfg Normal file
View File

@@ -0,0 +1,32 @@
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