-
Notifications
You must be signed in to change notification settings - Fork 1
/
haproxy_cache.cfg
62 lines (53 loc) · 1.41 KB
/
haproxy_cache.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
global
log 127.0.0.1 local2
maxconn 4000
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
frontend stats
bind *:1936
http-request use-service prometheus-exporter if { path /metrics }
stats enable
stats uri /stats
stats refresh 10s
cache bfcache
total-max-size 96
max-age 6000
frontend bookface
bind *:80
mode http
default_backend docker_bf_web_service
acl use_cache path -i -m beg /images
use_backend cachedcontent if use_cache
backend cachedcontent
balance roundrobin
http-request cache-use bfcache
http-response cache-store bfcache
server web web:80
backend docker_bf_web_service
balance roundrobin
server web web:80
frontend db
bind *:26257
mode tcp
default_backend databases
backend databases
mode tcp
balance roundrobin
server db1 server1-ip:26257
server db2 server2-ip:26257
server db3 server3-ip:26257