Skip to content

Commit 3974b17

Browse files
author
Shlomi Noach
committed
adding haproxy.cng sample file
1 parent cb22f68 commit 3974b17

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

resources/haproxy.cfg

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#
2+
# Sample HAProxy configuration to be used with `freno`
3+
#
4+
# Assumptions:
5+
# - freno listens on port `9777`
6+
# - freno runs on freno.service.host01, freno.service.host02, freno.service.host03
7+
#
8+
9+
#
10+
# only the freno leader will respond to /leader-check with `HTTP 200`. The rest will decline with `HTTP 404`
11+
# This setup suggests haproxy only directs traffic to the single active leader.
12+
#
13+
listen freno
14+
bind 0.0.0.0:9777 process 1
15+
bind 0.0.0.0:9777 process 2
16+
bind 0.0.0.0:9777 process 3
17+
bind 0.0.0.0:9777 process 4
18+
bind 0.0.0.0:9777 process 5
19+
bind 0.0.0.0:9777 process 6
20+
21+
mode http
22+
option httpchk GET /leader-check
23+
maxconn 20000
24+
http-check disable-on-404
25+
balance first
26+
retries 1
27+
timeout connect 1000
28+
timeout check 300
29+
timeout server 86400000
30+
timeout client 60000
31+
32+
default-server port 9777 fall 1 inter 1000 rise 1 downinter 1000 on-marked-down shutdown-sessions weight 10
33+
server freno.service.host01 freno.service.host01.mydomain.com:9777 check
34+
server freno.service.host02 freno.service.host02.mydomain.com:9777 check
35+
server freno.service.host03 freno.service.host03.mydomain.com:9777 check

0 commit comments

Comments
 (0)