forked from mtusi2026/mtusi2026lab3
Добавить балансировку и идемпотентность для лабораторной 3.
Две реплики API за HAProxy, общий PostgreSQL и повтор сообщения без дубля.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
global
|
||||
maxconn 200
|
||||
|
||||
defaults
|
||||
mode http
|
||||
timeout connect 1s
|
||||
timeout client 10s
|
||||
timeout server 2s
|
||||
option httplog
|
||||
option redispatch
|
||||
retries 2
|
||||
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 1s
|
||||
|
||||
frontend http
|
||||
bind *:80
|
||||
default_backend api
|
||||
|
||||
backend api
|
||||
balance roundrobin
|
||||
option httpchk
|
||||
http-check send meth GET uri /health/ready ver HTTP/1.1 hdr host localhost
|
||||
http-check expect status 200
|
||||
default-server inter 1s fall 1 rise 1
|
||||
server-template api 4 api:8080 check resolvers docker init-addr none resolve-prefer ipv4
|
||||
Reference in New Issue
Block a user