forked from mistio/mist-ce
-
Notifications
You must be signed in to change notification settings - Fork 1
/
haproxy.conf
42 lines (35 loc) · 1.07 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
global
maxconn 4096 # Total Max Connections. This is dependent on ulimit
nbproc 1
defaults
mode http
timeout client 5s
timeout connect 5s
timeout queue 5s
timeout server 60s
frontend www localhost:8000
timeout client 1h
option forwardfor # This sets X-Forwarded-For
option http-server-close
option http-pretend-keepalive
acl is_websocket path_beg /socket
use_backend websocket_backend if is_websocket
default_backend www_backend
backend www_backend
balance roundrobin
timeout client 5s
server uwsgi1 localhost:8001 weight 1 maxconn 1024
# server uwsgi2 localhost:8002 weight 1 maxconn 1024 check
backend websocket_backend
balance roundrobin
timeout server 120s
server socket1 localhost:8081 cookie socket1 weight 1 maxconn 1024 check
# server socket2 localhost:8082 cookie socket2 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