-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhaproxy.cfg
More file actions
70 lines (60 loc) · 1.98 KB
/
haproxy.cfg
File metadata and controls
70 lines (60 loc) · 1.98 KB
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
64
65
66
67
68
69
70
# This configuration is auto configured in i
# docker-entrypoint.sh and values are derivedi
# from namespaces configured in /etc/resolver.conf
# or DNS_RESOLVER (if configured on system env).
#
# e.g. nameserver skydns ${DNS_RESOLVER}:53
#
resolvers kubernetes
global
# debug
maxconn 30000
log 127.0.0.1:514 local0 info
defaults
# never fail on address resolution
default-server init-addr last,libc,none
# Specifies TCP timeout on connect for use by the frontend ft_redis
# Set the max time to wait for a connection attempt to a server to succeed
# The server and client side expected to acknowledge or send data.
defaults REDIS
log global
mode tcp
option tcplog
option log-health-checks
timeout connect 4s
timeout server 90s
timeout client 90s
# Specifies listening socket for accepting client connections using the default
# REDIS TCP timeout and backend bk_redis TCP health check.
frontend ft_redis
option tcplog
option logasap
log global
bind *:6379 name redis
default_backend bk_redis1
# frontend used to return health status without requiring SSL
frontend healthz
bind 0.0.0.0:34180
mode http
# create a status URI in /haproxy_status that will returns
# a 200 is backend is healthy, and 503 if it isn't.
acl backend_dead nbsrv(bk_redis1) le 0
monitor-uri /haproxy_status
monitor fail if backend_dead
# Uncomment the following to add HAPRoxy Statistics
listen stats #Listen on all IP's on port 9000
bind *:9000
mode http
balance
timeout client 5000
timeout connect 4000
timeout server 30000
#This is the virtual URL to access the stats page
stats uri /haproxy_stats
#Authentication realm. This can be set to anything. Escape space characters with a backslash.
stats realm HAProxy\ Statistics
#The user/pass you want to use. Change this password!
stats auth admin:passwordhere
#This allows you to take down and bring up back end servers.
#This will produce an error on older versions of HAProxy.
stats admin if TRUE