fix: correct replicas-lb details found in verify

- stop-one.sh: an empty TARGET_INSTANCE_ID now exits 2 in any shell,
  as the design states (${VAR:?} gave 1 under bash).
- driver.py kill-inflight: reproducible "aborted response is not
  retried" scenario (logins in flight, replica killed via stop-one.sh).
- Detection time of a hung replica is fall x (inter + timeout check) =
  8 s, not inter x fall + timeout check = 5 s (docker pause: 7.3 s);
  fixed in haproxy.cfg, balancer.md and the design.
- The 1 CPU replica limit is kept on purpose; the compose comment and
  the design now say that Argon2id uses more and logins are slower.
- load-balancing spec: API_REPLICAS is read by compose and Makefile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-10 18:44:57 +03:00
co-authored by Claude Opus 5.5
parent de93056eab
commit a4ca9ef3a7
10 changed files with 287 additions and 29 deletions
+4 -2
View File
@@ -50,8 +50,10 @@ defaults
timeout client 30s
timeout http-request 10s
timeout http-keep-alive 10s
# больше таймаута проверки внутри /health/ready (2 с); обнаружение
# отказа ≈ inter × fall + timeout check = 1 × 2 + 3 = 5 с ≤ 10 с
# больше таймаута проверки внутри /health/ready (2 с). Следующая
# проверка — через inter после конца предыдущей, поэтому худшее
# обнаружение зависшей реплики ≈ fall × (inter + timeout check) =
# 2 × (1 + 3) = 8 с ≤ 10 с; остановленную проверка не ждёт
timeout check 3s
# request_id ответов, которые создаёт сам LB
unique-id-format lb-%{+X}o%ci%cp%Ts%rt%pid