forked from praekelt/device-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaproxy.cfg
59 lines (50 loc) · 1.75 KB
/
haproxy.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
debug
defaults
log global
mode http
option httplog
option dontlognull
option redispatch
option httpclose
option httpchk GET /health/
timeout connect 5000
timeout client 50000
timeout server 50000
maxconn 2000
retries 3
stats enable
stats uri /haproxy?stats
stats realm Vumi\ Haproxy\ Statistics
stats auth haproxy:stats
frontend devproxy
bind *:8020
mode http
default_backend devproxy-switcher
backend devproxy-switcher
server devproxy-1 127.0.0.1:8021 weight 1 check maxconn 500
server devproxy-2 127.0.0.1:8022 weight 1 check maxconn 500
server devproxy-3 127.0.0.1:8023 weight 1 check maxconn 500
server devproxy-4 127.0.0.1:8024 weight 1 check maxconn 500
server devproxy-5 127.0.0.1:8025 weight 1 check maxconn 500
frontend devproxy-upstream
bind *:8026
mode http
acl is_high hdr_sub(X-UA-map) high
acl is_medium hdr_sub(X-UA-map) medium
use_backend high-backend if is_high
use_backend medium-backend if is_medium
default_backend medium-backend
backend high-backend
server high-backend1 127.0.0.1:8001 weight 1 check maxconn 500
server high-backend2 127.0.0.1:8002 weight 1 check maxconn 500
server high-backend3 127.0.0.1:8003 weight 1 check maxconn 500
server high-backend4 127.0.0.1:8004 weight 1 check maxconn 500
backend medium-backend
server medium-backend1 127.0.0.1:9001 weight 1 check maxconn 500
server medium-backend2 127.0.0.1:9002 weight 1 check maxconn 500
server medium-backend3 127.0.0.1:9003 weight 1 check maxconn 500
server medium-backend4 127.0.0.1:9004 weight 1 check maxconn 500