выполненная лаб3
@@ -1,5 +1,22 @@
|
||||
# Доказательства
|
||||
# Доказательства лабораторной 3
|
||||
|
||||
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
|
||||
Дата: 23.10.2026, Europe/Moscow. Все данные синтетические. Токены/пароли не записываются.
|
||||
|
||||
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
|
||||
- `check.txt`, `openapi.txt`, `smoke.txt` — фактический stdout публичных проверок.
|
||||
- `idempotency.json` — 24 одновременных повтора через разные API.
|
||||
- `idempotency-failover.json` — повтор исходного ключа после физической остановки обслужившего API: тот же Message через другой процесс.
|
||||
- `failover.json` — публичные 15-секундные проверки остановок, ошибки, восстановление и реальные Docker ID/состояния.
|
||||
- `persistence.txt`, `containers-initial.json`, `containers-after-restart.json` — прежняя сессия и сообщения после пересоздания настоящих API, PostgreSQL, Redis и LB.
|
||||
- `rolling.json`, `containers-after-rolling.json` — нагрузка во время последовательной замены контейнеров, вывод action, сохранность подтверждений.
|
||||
- `availability-load.json` — отдельная остановка каждого API под смешанной нагрузкой чтения/записи, RPS, ошибки, задержки, сверка сообщений.
|
||||
- `scaling.json` — три повтора для 1/2/4 API, фиксированный и растущий бюджеты.
|
||||
- `saturation.json` — sweep concurrency 1/4/16/64/128 при четырёх API.
|
||||
- `db-bottleneck.json` — две серии с PostgreSQL 0.1 и 1 CPU, два повтора на точку, C=4.
|
||||
- `improvement.json`, `improvement-low.json` — A/B проверки оптимизации членства при C=32 и C=4.
|
||||
- `extra-checks.json` — строгая валидация, область ключа, отзыв/истечение сессии, Redis outage и DB readiness.
|
||||
- `migrations.txt` — повторный запуск мигратора не меняет журнал и applied_at.
|
||||
- `environment-before-db.json`, `environment-final.json` — версии, hardware, размер БД и SHA-256 исходников.
|
||||
- `measurements.csv` — исходные агрегаты каждого измерения; подробные выборки CPU/RAM остаются в JSON.
|
||||
- `*.png`, `*.svg` — графики из сохранённых JSON, генерируются `scripts/plots.py`.
|
||||
|
||||
Методика, команды и интерпретация всех серий — в [REPORT.md](../REPORT.md). Percentiles относятся к успешным итерациям. Указанный RPS — одна подтверждённая POST-итерация, периодически включающая GET истории, а не сумма HTTP-запросов. Ошибки указаны отдельно. Closed-loop нагрузка имеет ограничения, описанные в отчёте.
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
@@ -0,0 +1,59 @@
|
||||
[
|
||||
{
|
||||
"id": "54b5a2f722463aa1ffdcf62ed02754d4be39b0e1c86e0c47bc358e49abddd257",
|
||||
"name": "/mtusi_lab3_solution-api-1",
|
||||
"hostname": "54b5a2f72246",
|
||||
"state": "running",
|
||||
"image": "mtusi-lab3-api:local",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 268435456,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "90c0edd835b0d6ccade0d8859077bacccdeaa0068ec7a7ce99799d06595639d3",
|
||||
"name": "/mtusi_lab3_solution-api-2",
|
||||
"hostname": "90c0edd835b0",
|
||||
"state": "running",
|
||||
"image": "mtusi-lab3-api:local",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 268435456,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "3b0115107acfb7fdb7009b0b3be8283a57cdab24b6e7cfe585a3087c4641384a",
|
||||
"name": "/mtusi_lab3_solution-lb-1",
|
||||
"hostname": "3b0115107acf",
|
||||
"state": "running",
|
||||
"image": "haproxy:3.0.11-alpine",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 134217728,
|
||||
"published_ports": {
|
||||
"8080/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "8080"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "b2896afd3818aaf0aeb1e39e4a55fb8305ec2679729defbc04c2531a7336ed51",
|
||||
"name": "/mtusi_lab3_solution-postgres-1",
|
||||
"hostname": "b2896afd3818",
|
||||
"state": "running",
|
||||
"image": "postgres:16.10-alpine",
|
||||
"nano_cpus": 1000000000,
|
||||
"memory": 536870912,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "033c1cff7786b2a3bd2d1a4702ed8bf3f8c45a54fc3c56571e1328c77bd79c21",
|
||||
"name": "/mtusi_lab3_solution-redis-1",
|
||||
"hostname": "033c1cff7786",
|
||||
"state": "running",
|
||||
"image": "redis:7.4.6-alpine",
|
||||
"nano_cpus": 250000000,
|
||||
"memory": 134217728,
|
||||
"published_ports": {}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,59 @@
|
||||
[
|
||||
{
|
||||
"id": "e0741230f251f1dea1aa04080bfe6bb41db648d85f95fccc37c571a0530ed80d",
|
||||
"name": "/mtusi_lab3_solution-api-3",
|
||||
"hostname": "e0741230f251",
|
||||
"state": "running",
|
||||
"image": "mtusi-lab3-api:local",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 268435456,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "d5980c18e71946c228474e7fefa65959b7917c00657b654b6aaf76800557de9e",
|
||||
"name": "/mtusi_lab3_solution-api-4",
|
||||
"hostname": "d5980c18e719",
|
||||
"state": "running",
|
||||
"image": "mtusi-lab3-api:local",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 268435456,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "3b0115107acfb7fdb7009b0b3be8283a57cdab24b6e7cfe585a3087c4641384a",
|
||||
"name": "/mtusi_lab3_solution-lb-1",
|
||||
"hostname": "3b0115107acf",
|
||||
"state": "running",
|
||||
"image": "haproxy:3.0.11-alpine",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 134217728,
|
||||
"published_ports": {
|
||||
"8080/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "8080"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "b2896afd3818aaf0aeb1e39e4a55fb8305ec2679729defbc04c2531a7336ed51",
|
||||
"name": "/mtusi_lab3_solution-postgres-1",
|
||||
"hostname": "b2896afd3818",
|
||||
"state": "running",
|
||||
"image": "postgres:16.10-alpine",
|
||||
"nano_cpus": 1000000000,
|
||||
"memory": 536870912,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "033c1cff7786b2a3bd2d1a4702ed8bf3f8c45a54fc3c56571e1328c77bd79c21",
|
||||
"name": "/mtusi_lab3_solution-redis-1",
|
||||
"hostname": "033c1cff7786",
|
||||
"state": "running",
|
||||
"image": "redis:7.4.6-alpine",
|
||||
"nano_cpus": 250000000,
|
||||
"memory": 134217728,
|
||||
"published_ports": {}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,59 @@
|
||||
[
|
||||
{
|
||||
"id": "c714bc07cea59fb2341fa083449fa93f72d12a8a34fc91864f0834cdb631393b",
|
||||
"name": "/mtusi_lab3_solution-api-3",
|
||||
"hostname": "c714bc07cea5",
|
||||
"state": "running",
|
||||
"image": "mtusi-lab3-api:local",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 268435456,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "b73f89735b0b4e4a4ac90152b504290ea90ef0946fcc061391e9503415d01154",
|
||||
"name": "/mtusi_lab3_solution-api-4",
|
||||
"hostname": "b73f89735b0b",
|
||||
"state": "running",
|
||||
"image": "mtusi-lab3-api:local",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 268435456,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "3b0115107acfb7fdb7009b0b3be8283a57cdab24b6e7cfe585a3087c4641384a",
|
||||
"name": "/mtusi_lab3_solution-lb-1",
|
||||
"hostname": "3b0115107acf",
|
||||
"state": "running",
|
||||
"image": "haproxy:3.0.11-alpine",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 134217728,
|
||||
"published_ports": {
|
||||
"8080/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "8080"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "953e54bc649aeafd057c38532a059c2502e67656f93e51e29b27599ff3d192c8",
|
||||
"name": "/mtusi_lab3_solution-postgres-1",
|
||||
"hostname": "953e54bc649a",
|
||||
"state": "running",
|
||||
"image": "postgres:16.10-alpine",
|
||||
"nano_cpus": 1000000000,
|
||||
"memory": 536870912,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "033c1cff7786b2a3bd2d1a4702ed8bf3f8c45a54fc3c56571e1328c77bd79c21",
|
||||
"name": "/mtusi_lab3_solution-redis-1",
|
||||
"hostname": "033c1cff7786",
|
||||
"state": "running",
|
||||
"image": "redis:7.4.6-alpine",
|
||||
"nano_cpus": 250000000,
|
||||
"memory": 134217728,
|
||||
"published_ports": {}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,59 @@
|
||||
[
|
||||
{
|
||||
"id": "df99611f85a57cae8ee7a37b3e59daf8a5866b0011a562ca6a3a0fe344726ac9",
|
||||
"name": "/mtusi_lab3_solution-api-1",
|
||||
"hostname": "df99611f85a5",
|
||||
"state": "running",
|
||||
"image": "mtusi-lab3-api:local",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 268435456,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "f18cd1dcf85a453038333137b9915ffa807f1c33352251095cf76112008e8940",
|
||||
"name": "/mtusi_lab3_solution-api-2",
|
||||
"hostname": "f18cd1dcf85a",
|
||||
"state": "running",
|
||||
"image": "mtusi-lab3-api:local",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 268435456,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "65e8ba0676ab8a1eb7d7a14485cc12e34587ed2487546ca1f7b799eae186ca99",
|
||||
"name": "/mtusi_lab3_solution-lb-1",
|
||||
"hostname": "65e8ba0676ab",
|
||||
"state": "running",
|
||||
"image": "haproxy:3.0.11-alpine",
|
||||
"nano_cpus": 500000000,
|
||||
"memory": 134217728,
|
||||
"published_ports": {
|
||||
"8080/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "8080"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "c6fd4157c969d33c7fce9b91552e3737e1e23c1554f9e2b55f8279d8b8e4e7a3",
|
||||
"name": "/mtusi_lab3_solution-postgres-1",
|
||||
"hostname": "c6fd4157c969",
|
||||
"state": "running",
|
||||
"image": "postgres:16.10-alpine",
|
||||
"nano_cpus": 1000000000,
|
||||
"memory": 536870912,
|
||||
"published_ports": {}
|
||||
},
|
||||
{
|
||||
"id": "7f022c81e357a85c20b1447fb95f32764649c8d3004dd83e47b5559a6f5b3803",
|
||||
"name": "/mtusi_lab3_solution-redis-1",
|
||||
"hostname": "7f022c81e357",
|
||||
"state": "running",
|
||||
"image": "redis:7.4.6-alpine",
|
||||
"nano_cpus": 250000000,
|
||||
"memory": 134217728,
|
||||
"published_ports": {}
|
||||
}
|
||||
]
|
||||
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 62 KiB |
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"collected_at": "2026-10-23T14:43:30.688302+00:00",
|
||||
"host": "macOS-27.0.1-arm64-arm-64bit-Mach-O",
|
||||
"machine": "arm64",
|
||||
"logical_cpus": 10,
|
||||
"host_memory_bytes": 25769803776,
|
||||
"host_cpu": "Apple M4",
|
||||
"docker_version": "{\"Platform\":{\"Name\":\"Docker Desktop 4.92.0 (240144)\"},\"Version\":\"29.8.0\",\"ApiVersion\":\"1.56\",\"MinAPIVersion\":\"1.40\",\"Os\":\"linux\",\"Arch\":\"arm64\",\"Components\":[{\"Name\":\"Engine\",\"Version\":\"29.8.0\",\"Details\":{\"ApiVersion\":\"1.56\",\"Arch\":\"arm64\",\"BuildTime\":\"Thu Sep 3 21:49:37 2026\",\"Experimental\":\"false\",\"GitCommit\":\"3ce5872\",\"GoVersion\":\"go1.26.8\",\"KernelVersion\":\"7.0.12-linuxkit\",\"MinAPIVersion\":\"1.40\",\"Module\":\"github.com/moby/moby/v2\",\"ModuleVersion\":\"v2.0.0+unknown\",\"Os\":\"linux\"}},{\"Name\":\"containerd\",\"Version\":\"v2.3.5\",\"Details\":{\"GitCommit\":\"1294c24a7da8e5a793ed378161673abe94118892\"}},{\"Name\":\"runc\",\"Version\":\"1.5.1\",\"Details\":{\"GitCommit\":\"v1.5.1-0-g8f2685a4\"}},{\"Name\":\"docker-init\",\"Version\":\"0.19.0\",\"Details\":{\"GitCommit\":\"de40ad0\"}}],\"GitCommit\":\"3ce5872\",\"GoVersion\":\"go1.26.8\",\"KernelVersion\":\"7.0.12-linuxkit\",\"BuildTime\":\"2026-09-03T21:49:37.000000000+00:00\"}",
|
||||
"compose_version": "Docker Compose version v5.5.1",
|
||||
"docker_resources": {
|
||||
"cpus": 10,
|
||||
"memory_bytes": 8319504384,
|
||||
"os": "Docker Desktop",
|
||||
"architecture": "aarch64"
|
||||
},
|
||||
"dataset": {
|
||||
"users": 358,
|
||||
"chats": 120,
|
||||
"messages": 523342,
|
||||
"idempotency": 523342,
|
||||
"database_bytes": 418255331
|
||||
},
|
||||
"versions": {
|
||||
"python": "Python 3.12.12",
|
||||
"postgres": "postgres (PostgreSQL) 16.10",
|
||||
"redis": "Redis server v=7.4.6 sha=00000000:0 malloc=jemalloc-5.3.0 bits=64 build=4e6e3eabd829953b",
|
||||
"haproxy": "HAProxy version 3.0.11-9e587df 2025/06/02 - https://haproxy.org/\nStatus: long-term supported branch - will stop receiving fixes around Q2 2029.\nKnown bugs: http://www.haproxy.org/bugs/bugs-3.0.11.html\nRunning on: Linux 7.0.12-linuxkit #1 SMP PREEMPT Thu Aug 27 14:02:21 UTC 2026 aarch64"
|
||||
},
|
||||
"source_sha256": {
|
||||
"app/main.py": "99d850d729fc015ee9e20c5151e631ab5dc901927044adb23247c402140dd514",
|
||||
"app/migrate.py": "e8fe9d98bf74fbeb0b402b1dde41e7371f602683e6898990f88abedf1e698243",
|
||||
"migrations/002_idempotency.sql": "3629c3b43d97fcd7e017b42281eb7ccce60821f772f0eccb3b63f925765c0275",
|
||||
"migrations/001_initial.sql": "0fb9c58900c7ecd12d6fafe656a30c86be1e796f655eb5b0334ed290b108e25b",
|
||||
"infra/haproxy.cfg": "119c268704ca5471a9426cd579348544995c968e78c8a3cb7b6213a95028bfb7",
|
||||
"scripts/experiments.py": "0ee3683e0a6e75277c96961c2394bd3a86955a5098cd4e748f23e0969e2d36e8",
|
||||
"compose.yaml": "2a14d0fe4700d0dbdf48d81b0412f18faebe26b122e12bf7dd49ba33c7f26784",
|
||||
"Dockerfile": "1553edea298cc97374384376b908593b1b2398a21c55a91f787393f4cdcb0a31",
|
||||
"requirements.lock": "38c6fdee1220a6a22c9f6ffd9dec973aed420139e30d33325cd85be4ce9f573a"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"collected_at": "2026-10-23T14:50:58.749817+00:00",
|
||||
"host": "macOS-27.0.1-arm64-arm-64bit-Mach-O",
|
||||
"machine": "arm64",
|
||||
"logical_cpus": 10,
|
||||
"host_memory_bytes": 25769803776,
|
||||
"host_cpu": "Apple M4",
|
||||
"docker_version": "{\"Platform\":{\"Name\":\"Docker Desktop 4.92.0 (240144)\"},\"Version\":\"29.8.0\",\"ApiVersion\":\"1.56\",\"MinAPIVersion\":\"1.40\",\"Os\":\"linux\",\"Arch\":\"arm64\",\"Components\":[{\"Name\":\"Engine\",\"Version\":\"29.8.0\",\"Details\":{\"ApiVersion\":\"1.56\",\"Arch\":\"arm64\",\"BuildTime\":\"Thu Sep 3 21:49:37 2026\",\"Experimental\":\"false\",\"GitCommit\":\"3ce5872\",\"GoVersion\":\"go1.26.8\",\"KernelVersion\":\"7.0.12-linuxkit\",\"MinAPIVersion\":\"1.40\",\"Module\":\"github.com/moby/moby/v2\",\"ModuleVersion\":\"v2.0.0+unknown\",\"Os\":\"linux\"}},{\"Name\":\"containerd\",\"Version\":\"v2.3.5\",\"Details\":{\"GitCommit\":\"1294c24a7da8e5a793ed378161673abe94118892\"}},{\"Name\":\"runc\",\"Version\":\"1.5.1\",\"Details\":{\"GitCommit\":\"v1.5.1-0-g8f2685a4\"}},{\"Name\":\"docker-init\",\"Version\":\"0.19.0\",\"Details\":{\"GitCommit\":\"de40ad0\"}}],\"GitCommit\":\"3ce5872\",\"GoVersion\":\"go1.26.8\",\"KernelVersion\":\"7.0.12-linuxkit\",\"BuildTime\":\"2026-09-03T21:49:37.000000000+00:00\"}",
|
||||
"compose_version": "Docker Compose version v5.5.1",
|
||||
"docker_resources": {
|
||||
"cpus": 10,
|
||||
"memory_bytes": 8319504384,
|
||||
"os": "Docker Desktop",
|
||||
"architecture": "aarch64"
|
||||
},
|
||||
"dataset": {
|
||||
"users": 412,
|
||||
"chats": 138,
|
||||
"messages": 656975,
|
||||
"idempotency": 656975,
|
||||
"database_bytes": 523973091
|
||||
},
|
||||
"versions": {
|
||||
"python": "Python 3.12.12",
|
||||
"postgres": "postgres (PostgreSQL) 16.10",
|
||||
"redis": "Redis server v=7.4.6 sha=00000000:0 malloc=jemalloc-5.3.0 bits=64 build=4e6e3eabd829953b",
|
||||
"haproxy": "HAProxy version 3.0.11-9e587df 2025/06/02 - https://haproxy.org/\nStatus: long-term supported branch - will stop receiving fixes around Q2 2029.\nKnown bugs: http://www.haproxy.org/bugs/bugs-3.0.11.html\nRunning on: Linux 7.0.12-linuxkit #1 SMP PREEMPT Thu Aug 27 14:02:21 UTC 2026 aarch64"
|
||||
},
|
||||
"source_sha256": {
|
||||
"app/main.py": "99d850d729fc015ee9e20c5151e631ab5dc901927044adb23247c402140dd514",
|
||||
"app/migrate.py": "e8fe9d98bf74fbeb0b402b1dde41e7371f602683e6898990f88abedf1e698243",
|
||||
"migrations/002_idempotency.sql": "3629c3b43d97fcd7e017b42281eb7ccce60821f772f0eccb3b63f925765c0275",
|
||||
"migrations/001_initial.sql": "0fb9c58900c7ecd12d6fafe656a30c86be1e796f655eb5b0334ed290b108e25b",
|
||||
"infra/haproxy.cfg": "119c268704ca5471a9426cd579348544995c968e78c8a3cb7b6213a95028bfb7",
|
||||
"scripts/experiments.py": "0ee3683e0a6e75277c96961c2394bd3a86955a5098cd4e748f23e0969e2d36e8",
|
||||
"compose.yaml": "2a14d0fe4700d0dbdf48d81b0412f18faebe26b122e12bf7dd49ba33c7f26784",
|
||||
"Dockerfile": "1553edea298cc97374384376b908593b1b2398a21c55a91f787393f4cdcb0a31",
|
||||
"requirements.lock": "38c6fdee1220a6a22c9f6ffd9dec973aed420139e30d33325cd85be4ce9f573a"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"contract_extra": "PASS: 128-codepoint UTF-8 password with colon; malformed JSON and oversized limit rejected",
|
||||
"strict_message_validation": "PASS",
|
||||
"key_scope": "PASS: 3 independent messages",
|
||||
"canonical_json_order": "PASS: reversed fields and explicit [] replay the same message",
|
||||
"cursor_scope": "PASS: cursor from another chat rejected with 400",
|
||||
"revoked_session_cannot_replay": "PASS",
|
||||
"same_key_after_physical_failover": "PASS: same Message and 201 via a different process with original token",
|
||||
"redis_outage": "PASS: profile falls back to PostgreSQL, ready=200",
|
||||
"postgres_outage": "live 200\nready 503; no DB failover claimed",
|
||||
"expiry": "PASS: TTL=2 seconds, old token gives 401"
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
[
|
||||
{
|
||||
"attempt": 1,
|
||||
"stdout": "python3 tests/resilience.py --mode failover --action-script \"scripts/stop-one.sh\" --base-url \"http://localhost:8080\" \nExecuting explicit failover hook; hook output suppressed to avoid leaking secrets.\n{\"observed_instances_before\": 2, \"successful_writes\": 127, \"failed_attempts\": 2, \"first_recovery_seconds\": 0.943}\nPASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.\n",
|
||||
"stopped": [
|
||||
"mtusi_lab3_solution-api-2"
|
||||
],
|
||||
"inventory_after": [
|
||||
{
|
||||
"name": "mtusi_lab3_solution-api-1",
|
||||
"state": "running",
|
||||
"id": "df99611f85a5"
|
||||
},
|
||||
{
|
||||
"name": "mtusi_lab3_solution-api-2",
|
||||
"state": "exited",
|
||||
"id": "f18cd1dcf85a"
|
||||
},
|
||||
{
|
||||
"name": "mtusi_lab3_solution-lb-1",
|
||||
"state": "running",
|
||||
"id": "65e8ba0676ab"
|
||||
},
|
||||
{
|
||||
"name": "mtusi_lab3_solution-migrate-1",
|
||||
"state": "exited",
|
||||
"id": "407405e4541b"
|
||||
},
|
||||
{
|
||||
"name": "mtusi_lab3_solution-postgres-1",
|
||||
"state": "running",
|
||||
"id": "c6fd4157c969"
|
||||
},
|
||||
{
|
||||
"name": "mtusi_lab3_solution-redis-1",
|
||||
"state": "running",
|
||||
"id": "7f022c81e357"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"attempt": 2,
|
||||
"stdout": "python3 tests/resilience.py --mode failover --action-script \"scripts/stop-one.sh\" --base-url \"http://localhost:8080\" \nExecuting explicit failover hook; hook output suppressed to avoid leaking secrets.\n{\"observed_instances_before\": 2, \"successful_writes\": 127, \"failed_attempts\": 2, \"first_recovery_seconds\": 0.94}\nPASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.\n",
|
||||
"stopped": [
|
||||
"mtusi_lab3_solution-api-1"
|
||||
],
|
||||
"inventory_after": [
|
||||
{
|
||||
"name": "mtusi_lab3_solution-api-1",
|
||||
"state": "exited",
|
||||
"id": "df99611f85a5"
|
||||
},
|
||||
{
|
||||
"name": "mtusi_lab3_solution-api-2",
|
||||
"state": "running",
|
||||
"id": "f18cd1dcf85a"
|
||||
},
|
||||
{
|
||||
"name": "mtusi_lab3_solution-lb-1",
|
||||
"state": "running",
|
||||
"id": "65e8ba0676ab"
|
||||
},
|
||||
{
|
||||
"name": "mtusi_lab3_solution-migrate-1",
|
||||
"state": "exited",
|
||||
"id": "407405e4541b"
|
||||
},
|
||||
{
|
||||
"name": "mtusi_lab3_solution-postgres-1",
|
||||
"state": "running",
|
||||
"id": "c6fd4157c969"
|
||||
},
|
||||
{
|
||||
"name": "mtusi_lab3_solution-redis-1",
|
||||
"state": "running",
|
||||
"id": "7f022c81e357"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"original_instance": "d5980c18e719-8c76619b",
|
||||
"replay_instance": "e0741230f251-7f94e597",
|
||||
"same_message": true,
|
||||
"status": 201,
|
||||
"seconds": 0.664,
|
||||
"hook": "Stopping API container d5980c18e71946c228474e7fefa65959b7917c00657b654b6aaf76800557de9e (hostname d5980c18e719)\nFlag --time has been deprecated, use --timeout instead\nd5980c18e71946c228474e7fefa65959b7917c00657b654b6aaf76800557de9e\nd5980c18e71946c228474e7fefa65959b7917c00657b654b6aaf76800557de9e exited\n"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"concurrent_requests": 24,
|
||||
"instances": [
|
||||
"df99611f85a5-04302f1c",
|
||||
"f18cd1dcf85a-e5743b7e"
|
||||
],
|
||||
"distinct_message_ids": 1,
|
||||
"stored_messages": 1,
|
||||
"different_body_status": 409,
|
||||
"absent_vs_empty_attachments": "equal"
|
||||
}
|
||||
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 51 KiB |
@@ -0,0 +1,48 @@
|
||||
experiment,series,replicas,db_cpu,fast_membership,repeat,concurrency,elapsed,success,errors,rps,p50_ms,p95_ms,p99_ms
|
||||
scaling,fixed,1,,,1,32,10.024,5217,0,520.437,68.395,103.915,139.297
|
||||
scaling,fixed,1,,,2,32,10.052,5299,0,527.135,68.481,102.047,116.932
|
||||
scaling,fixed,1,,,3,32,10.025,5272,0,525.9,68.84,100.923,109.326
|
||||
scaling,fixed,2,,,1,32,10.116,4079,0,403.232,99.462,195.694,283.169
|
||||
scaling,fixed,2,,,2,32,10.094,4151,0,411.236,98.189,192.717,280.292
|
||||
scaling,fixed,2,,,3,32,10.077,4190,0,415.791,99.923,190.081,278.196
|
||||
scaling,fixed,4,,,1,32,10.244,3752,0,366.259,5.066,371.938,478.247
|
||||
scaling,fixed,4,,,2,32,10.238,3687,0,360.123,5.424,371.181,504.856
|
||||
scaling,fixed,4,,,3,32,10.246,3850,0,375.738,5.087,336.864,489.03
|
||||
scaling,growing,1,,,1,32,10.098,2168,0,214.701,115.165,274.239,318.435
|
||||
scaling,growing,1,,,2,32,10.113,2167,0,214.269,114.606,276.8,307.213
|
||||
scaling,growing,1,,,3,32,10.106,2127,0,210.467,116.777,279.159,294.331
|
||||
scaling,growing,2,,,1,32,10.09,4128,0,409.104,101.016,194.599,275.12
|
||||
scaling,growing,2,,,2,32,10.054,4126,0,410.395,99.985,199.698,279.349
|
||||
scaling,growing,2,,,3,32,10.052,4105,0,408.395,92.683,194.137,281.407
|
||||
scaling,growing,4,,,1,32,10.082,8932,0,885.975,6.875,150.17,185.407
|
||||
scaling,growing,4,,,2,32,10.084,9137,0,906.072,7.369,142.843,177.629
|
||||
scaling,growing,4,,,3,32,10.189,8828,0,866.451,8.082,149.461,194.614
|
||||
saturation,,4,,,,1,10.0,4934,0,493.38,1.797,3.443,4.551
|
||||
saturation,,4,,,,4,10.003,11263,0,1125.936,2.976,5.607,14.455
|
||||
saturation,,4,,,,16,10.021,9812,0,979.146,6.648,71.968,85.027
|
||||
saturation,,4,,,,64,10.205,9137,0,895.334,7.091,273.343,343.532
|
||||
saturation,,4,,,,128,10.374,9050,0,872.375,111.364,419.207,504.484
|
||||
improvement,,,,False,1,32,10.04,8326,0,829.273,6.939,157.194,181.899
|
||||
improvement,,,,False,2,32,10.079,8491,0,842.468,7.437,152.413,183.534
|
||||
improvement,,,,False,3,32,10.104,8399,0,831.283,5.98,161.926,195.997
|
||||
improvement,,,,True,1,32,10.08,8971,0,890.017,6.052,152.151,187.361
|
||||
improvement,,,,True,2,32,10.03,8965,0,893.861,7.197,143.487,177.139
|
||||
improvement,,,,True,3,32,10.069,9096,0,903.411,6.787,148.475,183.686
|
||||
improvement-low,,,,False,1,4,10.003,11704,0,1170.102,2.902,5.349,9.424
|
||||
improvement-low,,,,True,1,4,10.001,12315,0,1231.321,2.81,5.212,7.819
|
||||
improvement-low,,,,True,2,4,10.002,12221,0,1221.811,2.789,5.213,9.204
|
||||
improvement-low,,,,False,2,4,10.002,11803,0,1180.111,2.921,5.375,8.322
|
||||
improvement-low,,,,False,3,4,10.003,11835,0,1183.097,2.909,5.364,7.932
|
||||
improvement-low,,,,True,3,4,10.004,12145,0,1214.054,2.832,5.216,8.259
|
||||
db-bottleneck,,1,0.1,,1,4,10.001,1476,0,147.589,5.258,97.175,198.596
|
||||
db-bottleneck,,1,0.1,,2,4,10.052,1505,0,149.715,5.395,94.517,195.986
|
||||
db-bottleneck,,2,0.1,,1,4,10.019,919,0,91.726,7.125,103.933,289.423
|
||||
db-bottleneck,,2,0.1,,2,4,10.021,1082,0,107.97,5.426,101.442,201.348
|
||||
db-bottleneck,,4,0.1,,1,4,10.024,888,0,88.588,6.557,104.218,204.894
|
||||
db-bottleneck,,4,0.1,,2,4,10.011,893,0,89.203,7.634,104.923,201.846
|
||||
db-bottleneck,,1,1,,1,4,10.018,4967,0,495.802,3.592,54.138,63.387
|
||||
db-bottleneck,,1,1,,2,4,10.028,4796,0,478.255,3.649,55.078,65.376
|
||||
db-bottleneck,,2,1,,1,4,10.004,10040,0,1003.648,2.879,5.989,25.497
|
||||
db-bottleneck,,2,1,,2,4,10.003,10925,0,1092.152,2.807,5.968,19.362
|
||||
db-bottleneck,,4,1,,1,4,10.002,11911,0,1190.818,2.827,5.197,7.9
|
||||
db-bottleneck,,4,1,,2,4,10.016,11308,0,1129.002,2.869,5.593,14.545
|
||||
|
@@ -0,0 +1,4 @@
|
||||
Command: docker compose run --rm migrate (twice)
|
||||
Before == after (including applied_at): PASS
|
||||
001_initial.sql|2026-10-23 12:05:38.158093+00
|
||||
002_idempotency.sql|2026-10-23 12:05:38.158093+00
|
||||
@@ -0,0 +1,2 @@
|
||||
.venv/bin/python scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
@@ -0,0 +1,3 @@
|
||||
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.
|
||||
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 56 KiB |
@@ -0,0 +1,2 @@
|
||||
python3 tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
|
||||