forked from mtusi2026/mtusi2026lab3
feat: add 5 experiment
This commit is contained in:
@@ -0,0 +1,148 @@
|
||||
# 3: одна сессия через разные API
|
||||
|
||||
## Что проверяется
|
||||
|
||||
Одна Bearer-сессия обслуживается разными контейнерами через LB без повторного входа; X-Instance-Id соответствует контейнерам.
|
||||
|
||||
Статус выполнения проверок: **PASS**. Для исследования PASS означает успешную проверку данных и правил анализа; решение гипотезы указано отдельно и может быть неопределённым.
|
||||
|
||||
Запуск: `lab3-report-04`. Команды выполнены из корня проекта в WSL; время и версии указаны в manifest.
|
||||
|
||||
## Команды и фактический вывод
|
||||
|
||||
### inventory
|
||||
|
||||
Проверка приложения.
|
||||
|
||||
```sh
|
||||
python3 scripts/generate_evidence.py --inspect
|
||||
```
|
||||
|
||||
Начало UTC: `2026-10-10T16:21:17.236315+00:00`; конец UTC: `2026-10-10T16:21:18.715399+00:00`; exit code: **0**.
|
||||
|
||||
Фрагмент вывода; полный журнал доступен по ссылке ниже.
|
||||
|
||||
```text
|
||||
{
|
||||
"containers": [
|
||||
{
|
||||
"service": "api",
|
||||
"instance": "04f3baa4775a",
|
||||
"state": "running",
|
||||
"exit_code": 0,
|
||||
"health": "healthy",
|
||||
"cpu": 500000000,
|
||||
"memory": 134217728,
|
||||
"ports": {},
|
||||
"networks": {
|
||||
"highload-lab3_data": {
|
||||
"address": "172.25.0.5"
|
||||
},
|
||||
"highload-lab3_proxy": {
|
||||
"address": "172.24.0.3"
|
||||
}
|
||||
},
|
||||
"image": "sha256:363f45fa05716cae10a22502ffcf239d6caa1071b83ffff36f38293bfc23c01b",
|
||||
"started": "2026-10-10T16:14:19.585285959Z",
|
||||
"container_id": "04f3baa4775a9bbbdddef6946e6afd668350a2122344523620da4c9ab01b7d98",
|
||||
"gomaxprocs": "1"
|
||||
},
|
||||
{
|
||||
"service": "api",
|
||||
"instance": "4864ca4d784f",
|
||||
"state": "running",
|
||||
"exit_code": 0,
|
||||
"health": "healthy",
|
||||
"cpu": 500000000,
|
||||
"memory": 134217728,
|
||||
"ports": {},
|
||||
"networks": {
|
||||
"highload-lab3_data": {
|
||||
"address": "172.25.0.4"
|
||||
},
|
||||
"highload-lab3_proxy": {
|
||||
"address": "172.24.0.2"
|
||||
}
|
||||
},
|
||||
"image": "sha256:363f45fa05716cae10a22502ffcf239d6caa1071b83ffff36f38293bfc23c01b",
|
||||
"started": "2026-10-10T16:15:26.924492269Z",
|
||||
"container_id": "4864ca4d784f90c711346dfa3e290dfeb54e65f53dd2aa0019cf224976513cc1",
|
||||
"gomaxprocs": "1"
|
||||
},
|
||||
{
|
||||
"service": "db",
|
||||
"instance": "edfcf3091ee4",
|
||||
"state": "running",
|
||||
"exit_code": 0,
|
||||
"health": "healthy",
|
||||
"cpu": 1000000000,
|
||||
"memory": 536870912,
|
||||
"ports": {},
|
||||
"networks": {
|
||||
"highload-lab3_data": {
|
||||
"address": "172.25.0.3"
|
||||
}
|
||||
},
|
||||
"image": "sha256:38471f330eb885e04de130b768d6db4e10469e2311879c7e5c699f6d2d8a1c74",
|
||||
"started": "2026-10-10T16:14:14.990276912Z",
|
||||
"container_id": "edfcf3091ee410c68a4d6845fee0aaed1477744abba90d7b6de8dffbfe51f05c"
|
||||
},
|
||||
{
|
||||
"service": "frontend",
|
||||
"instance": "ceb091ff4cee",
|
||||
"state": "running",
|
||||
"exit_code": 0,
|
||||
"health": "healthy",
|
||||
... [пропущенные строки — в полном журнале] ...
|
||||
"path": "/health/ready",
|
||||
"status": 200,
|
||||
"instance": "4864ca4d784f"
|
||||
}
|
||||
],
|
||||
"migration_version_dirty": "3|f",
|
||||
"git_ignored": [
|
||||
".env",
|
||||
".memory/"
|
||||
],
|
||||
"hook_scope": {
|
||||
"restart.sh": {
|
||||
"sha256": "0bdb05ec336f4e175ab2a76f172fcab06512003f70962adcd3e4c64567da1c43"
|
||||
},
|
||||
"stop-one.sh": {
|
||||
"sha256": "6eda7ff0eaaf521a2510e3b4ea2675ec7cd44851aeedf7300ca099ade9fa46f8"
|
||||
}
|
||||
}
|
||||
}
|
||||
PASS: actual containers and HAProxy addresses agree; migration 3 clean; storage/API private; secrets ignored
|
||||
```
|
||||
|
||||
Полный сохранённый вывод: [evidence/criteria/runs/lab3-report-04/inventory.txt](runs/lab3-report-04/inventory.txt).
|
||||
|
||||
|
||||
### idempotency
|
||||
|
||||
Проверка приложения.
|
||||
|
||||
```sh
|
||||
python3 scripts/check_idempotency.py
|
||||
```
|
||||
|
||||
Начало UTC: `2026-10-10T16:23:44.736019+00:00`; конец UTC: `2026-10-10T16:23:50.648039+00:00`; exit code: **0**.
|
||||
|
||||
Вывод команды:
|
||||
|
||||
```text
|
||||
{"concurrent_requests": 24, "observed_instances": ["04f3baa4775a", "4864ca4d784f"], "messages_after_concurrent_repeat": 1}
|
||||
PASS: shared session, concurrent replay across replicas, key/body validation, independent scopes, reauthentication on replay
|
||||
```
|
||||
|
||||
Полный сохранённый вывод: [evidence/criteria/runs/lab3-report-04/idempotency.txt](runs/lab3-report-04/idempotency.txt).
|
||||
|
||||
|
||||
## Реализация и дополнительные доказательства
|
||||
|
||||
- [infra/haproxy.cfg](../../infra/haproxy.cfg)
|
||||
- [src/backend/handlers/instance.go](../../src/backend/handlers/instance.go)
|
||||
- [src/backend/repositories/redis.go](../../src/backend/repositories/redis.go)
|
||||
- [scripts/check_idempotency.py](../../scripts/check_idempotency.py)
|
||||
- [evidence/criteria/runs/lab3-report-04/manifest.json](runs/lab3-report-04/manifest.json)
|
||||
Reference in New Issue
Block a user