-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaproxy.cfg
78 lines (62 loc) · 1.9 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
global
log 127.0.0.1 local0 debug
stats timeout 60s
maxconn 200000
daemon
nbproc 2
cpu-map 1 0
cpu-map 2 1
stats bind-process 2
defaults
log global
mode http
maxconn 100000
option httplog
option dontlognull
option http-server-close
timeout connect 1000000
timeout client 10000000
timeout server 10000000
timeout check 100000
log-format {"type":"haproxy","timestamp":%Ts,"http_status":%ST,"http_request":%HP,"remote_addr":"%ci","bytes_read":%B,"upstream_addr":"%si","backend_name":"%b","retries":%rc,"bytes_uploaded":%U,"upstream_response_time":"%Tr","upstream_connect_time":"%Tc","session_duration":"%Tt","termination_state":"%ts","host_header":%[capture.req.hdr(0)]}
resolvers clusterdns
nameserver dns 10.60.0.10:53
resolve_retries 3
hold valid 30s
frontend example.com
bind :80
http-request capture req.hdr(Host) len 20
#ACL
#paths
acl mflights_results path_beg /m/flights/results
acl mpwaflights_results path_beg /m/pwa/flights/results
acl m_all path_beg /m
acl blackhole path_beg /health
#rules
http-request set-log-level silent if blackhole
#backends
use_backend apache_mobile if mflights_results
use_backend apache_mobile if mpwaflights_results
use_backend apache_mobile if m_all
use_backend chennai_dc if mflights_results
use_backend chennai_dc if mpwaflights_results
use_backend local_backend if blackhole
backend chennai_dc
balance roundrobin
retries 0
server chennai_dc_1 14.141.162.168:443 ssl verify none
backend local_backend
mode http
errorfile 503 /usr/local/etc/haproxy/200pingdom.http
backend apache_mobile
balance roundrobin
retries 0
server apache_mobile apache-httpd4mobile.apache.svc.cluster.local:80 resolvers clusterdns check
listen stats
bind :1936
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth Username:Password