0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-30 22:34:13 -05:00

Modified shared storage haproxy config to stick only writes, not reads

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
Petu Eusebiu 2022-03-18 16:07:15 +02:00 committed by Ramkumar Chinchani
parent 03dd558ec6
commit ba41368469

View file

@ -34,16 +34,25 @@ defaults
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
frontend local_zot
bind 127.0.0.1:8080
frontend zot
bind *:8080
mode http
default_backend my_zots
acl write_methods method POST PATCH DELETE PUT
use_backend zot-stick-writes if write_methods
default_backend zot-reads
backend my_zots
backend zot-stick-writes
mode http
balance leastconn
stick-table type ip size 1m expire 1h
stick-table type ip size 1m expire 30m
stick on src
server zot1 127.0.0.1:8081 check
server zot2 127.0.0.1:8081 check
server zot3 127.0.0.1:8082 check
server zot2 127.0.0.1:8082 check
server zot3 127.0.0.1:8083 check
backend zot-reads
mode http
balance roundrobin
server zot1 127.0.0.1:8081 check
server zot2 127.0.0.1:8082 check
server zot3 127.0.0.1:8083 check