mirror of
https://github.com/project-zot/zot.git
synced 2025-01-27 23:01:43 -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:
parent
03dd558ec6
commit
ba41368469
1 changed files with 16 additions and 7 deletions
|
@ -34,16 +34,25 @@ defaults
|
||||||
errorfile 503 /etc/haproxy/errors/503.http
|
errorfile 503 /etc/haproxy/errors/503.http
|
||||||
errorfile 504 /etc/haproxy/errors/504.http
|
errorfile 504 /etc/haproxy/errors/504.http
|
||||||
|
|
||||||
frontend local_zot
|
frontend zot
|
||||||
bind 127.0.0.1:8080
|
bind *:8080
|
||||||
mode http
|
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
|
mode http
|
||||||
balance leastconn
|
balance leastconn
|
||||||
stick-table type ip size 1m expire 1h
|
stick-table type ip size 1m expire 30m
|
||||||
stick on src
|
stick on src
|
||||||
server zot1 127.0.0.1:8081 check
|
server zot1 127.0.0.1:8081 check
|
||||||
server zot2 127.0.0.1:8081 check
|
server zot2 127.0.0.1:8082 check
|
||||||
server zot3 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
|
||||||
|
|
Loading…
Add table
Reference in a new issue