forked from fzuslide/Honey-pusher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
haproxy.cfg
48 lines (40 loc) · 1.33 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
global
maxconn 1024
defaults
mode http
timeout connect 5s
timeout client 5s
timeout server 60s
frontend all 0.0.0.0:8888
timeout client 24h
default_backend www_backend
option http-server-close
option http-pretend-keepalive
acl is_websocket hdr(upgrade) -i websocket
acl is_websocket hdr_beg(host) -i ws
acl is_sio path_beg /socket.io
use_backend socket_backend if is_sio
backend www_backend
balance roundrobin
option forwardfor # This sets X-Forwarded-For
timeout server 5000
timeout connect 4000
server server1 localhost:8800 weight 1 maxconn 1024 check
backend socket_backend
mode http
balance source
no option httpclose
option http-server-close
option forceclose
option forwardfor
timeout server 24h
timeout connect 24h
timeout queue 5000
server nodejs1 127.0.0.1:8871 weight 1 maxconn 1024 check
server nodejs2 127.0.0.1:8872 weight 1 maxconn 1024 check
server nodejs3 127.0.0.1:8873 weight 1 maxconn 1024 check
server nodejs4 127.0.0.1:8874 weight 1 maxconn 1024 check
#server nodejs5 127.0.0.1:8875 weight 1 maxconn 1024 check
#server nodejs6 127.0.0.1:8876 weight 1 maxconn 1024 check
#server nodejs7 127.0.0.1:8877 weight 1 maxconn 1024 check
#server nodejs8 127.0.0.1:8878 weight 1 maxconn 1024 check