fix(lab4): preserve error contract and verify storage consistency

This commit is contained in:
kolya5544
2026-11-11 18:25:57 +03:00
parent f875e2977f
commit 0150b91ec0
18 changed files with 1051 additions and 35 deletions
+13 -1
View File
@@ -17,7 +17,8 @@ defaults
timeout queue 5s
retries 3
option redispatch 1
retry-on conn-failure empty-response response-timeout 0rtt-rejected
# Only retry before a connection is established: upload POST has no idempotency key.
retry-on conn-failure
# Docker DNS (127.0.0.11): адреса реплик API обновляются без перезапуска LB (scale up/down, пересоздание контейнеров).
resolvers docker
@@ -33,6 +34,9 @@ resolvers docker
frontend public
bind :8080
# If the shared DB is down, live API processes still produce contract JSON,
# validate missing credentials, and serve /health/live independently of DB.
use_backend api_live if { nbsrv(api) eq 0 }
default_backend api
# Внутренний healthcheck самого LB (контейнерный HEALTHCHECK); наружу не публикуется.
@@ -48,3 +52,11 @@ backend api
http-check expect status 200
default-server check inter 1s fall 2 rise 2 resolvers docker init-addr none
server-template api 1-8 api:8080
backend api_live
balance roundrobin
option httpchk
http-check send meth GET uri /health/live
http-check expect status 200
default-server check inter 1s fall 2 rise 2 resolvers docker init-addr none
server-template api 1-8 api:8080