Добавить балансировку и идемпотентность для лабораторной 3.

Две реплики API за HAProxy, общий PostgreSQL и повтор сообщения без дубля.
This commit is contained in:
2026-11-13 07:30:46 +00:00
parent 0ab3a341aa
commit e0e1a1e6c1
21 changed files with 1997 additions and 14 deletions
+30
View File
@@ -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