-
Notifications
You must be signed in to change notification settings - Fork 3
/
haproxy.cfg
63 lines (53 loc) · 1.61 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
# Requires recent Haproxy to work with websockets (for example 1.4.16).
global
log 127.0.0.1 local2 debug
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
# Set timeouts to your needs
timeout client 60s
timeout connect 60s
timeout server 60s
frontend all 0.0.0.0:3000
mode http
timeout client 120s
option forwardfor
# Fake connection:close, required in this setup.
option http-server-close
option http-pretend-keepalive
#acl is_sockjs path_beg /sockjs
#acl is_stats path_beg /stats
#use_backend sockjs if is_sockjs
#use_backend stats if is_stats
#default_backend static
default_backend meteor
backend meteor
balance roundrobin
cookie SERVERID insert indirect nocache
server srv_meteor1 127.0.0.1:9000 cookie m1
server srv_meteor2 127.0.0.1:9003 cookie m2
server srv_meteor3 127.0.0.1:9005 cookie m3
server srv_meteor4 127.0.0.1:9007 cookie m4
#backend sockjs
# # Load-balance according to hash created from first two
# # directories in url path. For example requests going to /1/
# # should be handled by single server (assuming resource prefix is
# # one-level deep, like "/echo").
#
# # ws://localhost:3000/sockjs/127/sk5ec60x/websocket
# # ws://localhost:3000/sockjs/146/26xxhg99/websocket
# balance uri depth 2
# timeout server 120s
# server srv_sockjs1 127.0.0.1:9005
# server srv_sockjs2 127.0.0.1:9007
#backend static
# balance roundrobin
# server srv_static 127.0.0.1:3300
#
#backend stats
# stats uri /stats
# stats enable