forked from mistio/mist-ce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaproxy.conf
60 lines (52 loc) · 1.82 KB
/
haproxy.conf
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
global
maxconn 4096 # Total Max Connections. This is dependent on ulimit
nbproc 1
defaults
timeout connect 5s
timeout queue 5s
timeout server 60s
# timeout tunnel 1h
frontend www 0.0.0.0:8000
timeout client 1h
acl is_websocket path_beg /socket.io
use_backend websocket_backend if is_websocket
default_backend www_backend
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 uwsgi1 localhost:8001 weight 1 maxconn 1024 check
# server uwsgi2 localhost:8002 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
#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 127.0.0.1:8888
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth admin:hadmin
timeout client 5s