-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhaproxy.cfg
66 lines (56 loc) · 2.02 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
global
maxconn 4096 # Total Max Connections. This is dependent on ulimit
nbproc 1
defaults
timeout connect 5s
timeout queue 5s
timeout server 30s
timeout tunnel 1h
frontend www 0.0.0.0:8000
timeout client 1h
default_backend www_backend
acl is_websocket path_beg /socket.io
acl is_websocket hdr(Upgrade) -i WebSocket
acl is_websocket hdr_beg(Host) -i ws
use_backend websocket_backend if is_websocket
tcp-request inspect-delay 500ms
tcp-request content accept if HTTP
use_backend flashsocket_backend if !HTTP
frontend flash_policy 0.0.0.0:843
timeout client 5s
default_backend flashpolicy_backend
backend www_backend
mode http
balance roundrobin
option forwardfor # This sets X-Forwarded-For
timeout client 5s
server server1 localhost:8001 weight 1 maxconn 1024 check
server server2 localhost:8002 weight 1 maxconn 1024 check
server server3 localhost:8003 weight 1 maxconn 1024 check
backend websocket_backend
mode http
balance roundrobin
option forwardfor # This sets X-Forwarded-For
option http-server-close
option forceclose
no option httpclose
cookie SERVERID insert indirect nocache
server socket1 localhost:8081 cookie socket1 weight 1 maxconn 1024 check
server socket2 localhost:8082 cookie socket2 weight 1 maxconn 1024 check
server socket3 localhost:8083 cookie socket3 weight 1 maxconn 1024 check
backend flashsocket_backend
server socket1 localhost:8081 weight 1 maxconn 1024 check
server socket2 localhost:8082 weight 1 maxconn 1024 check
server socket3 localhost:8083 weight 1 maxconn 1024 check
backend flashpolicy_backend
server socket1 localhost:10843 weight 1 maxconn 1024 check
server socket2 localhost:10844 weight 1 maxconn 1024 check
server socket3 localhost:10845 weight 1 maxconn 1024 check
listen stats :8888
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth admin:admin
timeout client 5s