-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathhaproxy.cfg
35 lines (32 loc) · 1.15 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
#
# Sample HAProxy configuration to be used with `freno`
#
# Assumptions:
# - freno listens on port `9777`
# - freno runs on freno.service.host01, freno.service.host02, freno.service.host03
#
#
# only the freno leader will respond to /leader-check with `HTTP 200`. The rest will decline with `HTTP 404`
# This setup suggests haproxy only directs traffic to the single active leader.
#
listen freno
bind 0.0.0.0:9777 process 1
bind 0.0.0.0:9777 process 2
bind 0.0.0.0:9777 process 3
bind 0.0.0.0:9777 process 4
bind 0.0.0.0:9777 process 5
bind 0.0.0.0:9777 process 6
mode http
option httpchk GET /leader-check
maxconn 20000
http-check disable-on-404
balance first
retries 1
timeout connect 1000
timeout check 300
timeout server 86400000
timeout client 60000
default-server port 9777 fall 1 inter 1000 rise 1 downinter 1000 on-marked-down shutdown-sessions weight 10
server freno.service.host01 freno.service.host01.mydomain.com:9777 check
server freno.service.host02 freno.service.host02.mydomain.com:9777 check
server freno.service.host03 freno.service.host03.mydomain.com:9777 check