-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhaproxy.cfg
More file actions
36 lines (31 loc) · 871 Bytes
/
haproxy.cfg
File metadata and controls
36 lines (31 loc) · 871 Bytes
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
global
maxconn 4096
defaults
mode http
log global
timeout client 30s
timeout server 30s
timeout connect 10s
option redispatch
option httplog
frontend http
bind *:8080
mode http
timeout client 1000s
use_backend all
backend all
option forwardfor
# Enable Power of Two Random Choices Algorithm
balance random(2)
# Enable Layer 7 retries
retry-on all-retryable-errors
retries 3
# retrying POST requests can be dangerous
# make sure you understand the implications before removing
http-request disable-l7-retry if METH_POST
timeout server 1000s
timeout connect 1000s
server s1 app1:8000 weight 1 maxconn 1024 check
server s2 app2:8000 weight 1 maxconn 1024 check
server s3 app3:8000 weight 1 maxconn 1024 check
server s4 app4:8000 weight 1 maxconn 1024 check