docs: retake replicas-lb evidence from a4ca9ef after verify
The stand was recreated from a4ca9ef (make down, make run_docker) and
all evidence of the change was taken again on it: stand, distribution,
LB errors, test-persistence, test-failover for each replica (stop and
kill), stop-one refusals, make test and student_test through the LB,
test_isolated, failure_checks and bench self-checks.
New evidence closes scenarios verify found without proof: a real git
clone on non-default ports, a hung replica (docker pause: DOWN after
7.7 s, in-flight request 504), PostgreSQL outage behind the LB, replica
tests failing against one process, aborted responses via
driver.py kill-inflight. REPORT.md gets the corrected detection
formula, the measured cost of the 1 CPU limit for Argon2id and the new
rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
| | |
|
||||
|---|---|
|
||||
| Спеки | `container-run` «Данные переживают рестарт стенда» — «Рестарт hook-ом», «Публичная проверка сохранности»; `sessions` «Прежний токен после рестарта»; `data-storage` «Прежний пользователь после рестарта» |
|
||||
| Change | `replicas-lb`, задача 6.1 |
|
||||
| Дата | 2026-10-10 15:22:14–15:22:23 UTC |
|
||||
| Commit | `4e0cc4e` |
|
||||
| Change | `replicas-lb`, задачи 6.1 и 7.2 |
|
||||
| Дата | 2026-10-10 15:47:53–15:48:02 UTC |
|
||||
| Commit | `a4ca9ef` (стенд пересоздан с этого commit, `stand.md`) |
|
||||
| Стенд | `make run_docker`: проект `mtusi-lab3`, HAProxy на `127.0.0.1:8080`, `api` × 2; тест ходит через LB (`BASE_URL` по умолчанию) |
|
||||
| Хост | Docker Desktop 29.8.1, macOS arm64; ВМ Docker: 12 CPU, 7,7 GiB RAM; ноутбук от батареи |
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
|
||||
```text
|
||||
$ docker compose ps -a (до) # сервис, контейнер, ID, состояние, StartedAt
|
||||
api /mtusi-lab3-api-1 0a93eeb192b4 running exit=0 started=2026-10-10T15:21:58.273921301Z
|
||||
api /mtusi-lab3-api-2 47a14cfd6cd7 running exit=0 started=2026-10-10T15:21:58.203705842Z
|
||||
haproxy /mtusi-lab3-haproxy-1 5ab61b8f1958 running exit=0 started=2026-10-10T15:07:49.288248255Z
|
||||
migrate /mtusi-lab3-migrate-1 7932e099b9f9 exited exit=0 started=2026-10-10T15:07:47.582119254Z
|
||||
postgres /mtusi-lab3-postgres-1 e32b3661ee3a running exit=0 started=2026-10-10T15:07:45.738258545Z
|
||||
valkey /mtusi-lab3-valkey-1 ae69bdd041cb running exit=0 started=2026-10-10T15:07:45.76904342Z
|
||||
api /mtusi-lab3-api-1 3681880fc55f running exit=0 started=2026-10-10T15:46:57.553993883Z
|
||||
api /mtusi-lab3-api-2 8100f940a5fa running exit=0 started=2026-10-10T15:46:57.498271675Z
|
||||
haproxy /mtusi-lab3-haproxy-1 f878fd1fbf83 running exit=0 started=2026-10-10T15:45:09.060002041Z
|
||||
migrate /mtusi-lab3-migrate-1 ffd98512d938 exited exit=0 started=2026-10-10T15:45:06.849190138Z
|
||||
postgres /mtusi-lab3-postgres-1 da3195a39fcf running exit=0 started=2026-10-10T15:47:39.475441666Z
|
||||
valkey /mtusi-lab3-valkey-1 169515bef463 running exit=0 started=2026-10-10T15:45:05.17644172Z
|
||||
$ docker volume inspect -f "{{.Name}} {{.CreatedAt}}" mtusi-lab3_postgres_data
|
||||
mtusi-lab3_postgres_data 2026-10-10T14:03:26Z
|
||||
|
||||
@@ -30,47 +30,51 @@ $ make test-persistence ACTION_SCRIPT=scripts/restart.sh
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
exit=0 за 7.1 с
|
||||
exit=0 за 6.4 с
|
||||
|
||||
$ docker compose ps -a (после)
|
||||
api /mtusi-lab3-api-1 0a93eeb192b4 running exit=0 started=2026-10-10T15:22:20.985687089Z
|
||||
api /mtusi-lab3-api-2 47a14cfd6cd7 running exit=0 started=2026-10-10T15:22:20.908433172Z
|
||||
haproxy /mtusi-lab3-haproxy-1 5ab61b8f1958 running exit=0 started=2026-10-10T15:22:21.059614505Z
|
||||
migrate /mtusi-lab3-migrate-1 7932e099b9f9 exited exit=0 started=2026-10-10T15:22:18.810355546Z
|
||||
postgres /mtusi-lab3-postgres-1 e32b3661ee3a running exit=0 started=2026-10-10T15:22:16.963877587Z
|
||||
valkey /mtusi-lab3-valkey-1 ae69bdd041cb running exit=0 started=2026-10-10T15:22:16.992591753Z
|
||||
api /mtusi-lab3-api-1 3681880fc55f running exit=0 started=2026-10-10T15:47:58.49368355Z
|
||||
api /mtusi-lab3-api-2 8100f940a5fa running exit=0 started=2026-10-10T15:47:58.4427858Z
|
||||
haproxy /mtusi-lab3-haproxy-1 f878fd1fbf83 running exit=0 started=2026-10-10T15:47:58.560031592Z
|
||||
migrate /mtusi-lab3-migrate-1 ffd98512d938 exited exit=0 started=2026-10-10T15:47:56.875245466Z
|
||||
postgres /mtusi-lab3-postgres-1 da3195a39fcf running exit=0 started=2026-10-10T15:47:55.066928966Z
|
||||
valkey /mtusi-lab3-valkey-1 169515bef463 running exit=0 started=2026-10-10T15:47:55.039021882Z
|
||||
$ docker volume inspect -f "{{.Name}} {{.CreatedAt}}" mtusi-lab3_postgres_data
|
||||
mtusi-lab3_postgres_data 2026-10-10T14:03:26Z
|
||||
```
|
||||
|
||||
| Сервис | Контейнер | `StartedAt` до | `StartedAt` после |
|
||||
|---|---|---|---|
|
||||
| haproxy | `5ab61b8f1958` | 15:07:49.288 | 15:22:21.060 |
|
||||
| api | `0a93eeb192b4` | 15:21:58.274 | 15:22:20.986 |
|
||||
| api | `47a14cfd6cd7` | 15:21:58.204 | 15:22:20.908 |
|
||||
| postgres | `e32b3661ee3a` | 15:07:45.738 | 15:22:16.964 |
|
||||
| valkey | `ae69bdd041cb` | 15:07:45.769 | 15:22:16.993 |
|
||||
| migrate | `7932e099b9f9` | 15:07:47.582 | 15:22:18.810 (повторный прогон — no-op) |
|
||||
| haproxy | `f878fd1fbf83` | 15:45:09.060 | 15:47:58.560 |
|
||||
| api | `3681880fc55f` | 15:46:57.554 | 15:47:58.494 |
|
||||
| api | `8100f940a5fa` | 15:46:57.498 | 15:47:58.443 |
|
||||
| postgres | `da3195a39fcf` | 15:47:39.475 | 15:47:55.067 |
|
||||
| valkey | `169515bef463` | 15:45:05.176 | 15:47:55.039 |
|
||||
| migrate | `ffd98512d938` | 15:45:06.849 | 15:47:56.875 (повторный прогон — no-op) |
|
||||
|
||||
Перезапущены LB, обе реплики API, Postgres и Valkey: те же ID
|
||||
контейнеров, новое время старта у всех. Число реплик не изменилось,
|
||||
volume Postgres — тот же (дата создания прежняя).
|
||||
volume Postgres — тот же (дата создания прежняя). Прежний `StartedAt`
|
||||
Postgres — с проверки «PostgreSQL недоступен» (`lb-errors.md`), реплик —
|
||||
с восстановления там же.
|
||||
|
||||
## Журнал LB за окно рестарта
|
||||
|
||||
```text
|
||||
api/api-1: IP changed from '(none)' to '172.30.0.5' by 'docker/dns'.
|
||||
api/api-2: IP changed from '(none)' to '172.30.0.4' by 'DNS cache'.
|
||||
Server api/api-1 ('api') is DOWN/READY (resolves again).
|
||||
Server api/api-1 administratively READY thanks to valid DNS answer.
|
||||
Server api/api-2 ('api') is DOWN/READY (resolves again).
|
||||
Server api/api-2 administratively READY thanks to valid DNS answer.
|
||||
172.30.0.1:61326 [10/Oct/2026:15:22:21.185] entry api/<NOSRV> 0/-1/-1/-1/0 503 0 - - SC-- 1/1/0/0/0 0/0 "GET /health/ready HTTP/1.1"
|
||||
172.30.0.1:61342 [10/Oct/2026:15:22:21.693] entry api/<NOSRV> 0/-1/-1/-1/0 503 0 - - SC-- 1/1/0/0/0 0/0 "GET /health/ready HTTP/1.1"
|
||||
Server api/api-1 is UP, reason: Layer7 check passed, code: 200, check duration: 29ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
|
||||
2026-10-10T15:47:54.367464715Z Proxy entry stopped (cumulated conns: FE: 395, BE: 0).
|
||||
2026-10-10T15:47:58.632091217Z [NOTICE] (1) : Initializing new worker (8)
|
||||
2026-10-10T15:47:58.649502301Z [NOTICE] (1) : Loading success.
|
||||
2026-10-10T15:47:58.649965301Z api/api-1: IP changed from '(none)' to '172.30.0.5' by 'docker/dns'.
|
||||
2026-10-10T15:47:58.649989217Z api/api-2: IP changed from '(none)' to '172.30.0.4' by 'DNS cache'.
|
||||
2026-10-10T15:47:58.649991509Z Server api/api-1 ('api') is DOWN/READY (resolves again).
|
||||
2026-10-10T15:47:58.649995759Z Server api/api-2 ('api') is DOWN/READY (resolves again).
|
||||
2026-10-10T15:47:58.664751676Z 172.30.0.1:58888 [10/Oct/2026:15:47:58.664] entry api/<NOSRV> 0/-1/-1/-1/0 503 0 - - SC-- 1/1/0/0/0 0/0 "GET /health/ready HTTP/1.1"
|
||||
2026-10-10T15:47:59.171462551Z 172.30.0.1:58902 [10/Oct/2026:15:47:59.171] entry api/<NOSRV> 0/-1/-1/-1/0 503 0 - - SC-- 1/1/0/0/0 0/0 "GET /health/ready HTTP/1.1"
|
||||
2026-10-10T15:47:59.678091551Z 172.30.0.1:58906 [10/Oct/2026:15:47:59.677] entry api/<NOSRV> 0/-1/-1/-1/0 503 0 - - SC-- 1/1/0/0/0 0/0 "GET /health/ready HTTP/1.1"
|
||||
2026-10-10T15:47:59.683768718Z Server api/api-1 is UP, reason: Layer7 check passed, code: 200, check duration: 33ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
|
||||
$ make instances # через 2 с после теста
|
||||
0a93eeb192b4: 6
|
||||
47a14cfd6cd7: 6
|
||||
3681880fc55f: 6
|
||||
8100f940a5fa: 6
|
||||
instances: 2
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user