Реализовать lab3: HAProxy, API×N, идемпотентность и трек 1.
Горизонтальное масштабирование за LB с общими сессиями Redis, X-Instance-Id, обязательным Idempotency-Key в PostgreSQL, сценариями failover/persistence и измерением цены масштабирования при фиксированном CPU/RAM бюджете.
This commit is contained in:
+11
-3
@@ -1,5 +1,13 @@
|
||||
# Доказательства
|
||||
# Evidence
|
||||
|
||||
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
|
||||
Текстовые выводы публичных и собственных проверок. Не кладите сюда токены, пароли и дампы сессий.
|
||||
|
||||
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
|
||||
| Файл | Что доказывает |
|
||||
| --- | --- |
|
||||
| `smoke-pass.txt` | `make test` (lab3 smoke: idempotency + instance id) |
|
||||
| `instances.txt` | ≥2 разных `X-Instance-Id` через LB |
|
||||
| `persistence.txt` | `make test-persistence ACTION_SCRIPT=scripts/restart.sh` |
|
||||
| `failover-1.txt` / `failover-2.txt` | поочерёдный отказ каждой API-реплики |
|
||||
| `student-test.txt` | собственные Go-тесты (idempotency race, deps down, …) |
|
||||
| `ps.txt` | API без publish наружу; CPU/RAM limits; LB на `:8080` |
|
||||
| `track1/` | трек 5: RPS при 1/2/4 репликах и grow-серия |
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
:0
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
@@ -0,0 +1,4 @@
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 104, "failed_attempts": 1, "first_recovery_seconds": 2.45}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,4 @@
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 94, "failed_attempts": 1, "first_recovery_seconds": 2.82}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,4 @@
|
||||
observed X-Instance-Id via LB:
|
||||
5c2febc72d04
|
||||
6f977988feb1
|
||||
count=2
|
||||
@@ -0,0 +1 @@
|
||||
500000000 268435456 {"8080/tcp":null}
|
||||
@@ -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.
|
||||
@@ -0,0 +1,7 @@
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 50 seconds ago Up 3 seconds (health: starting) 8080/tcp
|
||||
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 50 seconds ago Up 25 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 49 seconds ago Up 25 seconds (healthy) 127.0.0.1:8080->8080/tcp
|
||||
mtusi2026lab3-migrate-1 mtusi2026lab3-migrate "/server -migrate" migrate 4 seconds ago Exited (0) 2 seconds ago
|
||||
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 58 seconds ago Up 25 seconds (healthy) 127.0.0.1:5432->5432/tcp
|
||||
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 58 seconds ago Up 24 seconds (healthy) 127.0.0.1:6379->6379/tcp
|
||||
@@ -0,0 +1,7 @@
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api About a minute ago Up 19 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api About a minute ago Exited (0) 15 seconds ago
|
||||
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb About a minute ago Up 41 seconds (healthy) 127.0.0.1:8080->8080/tcp
|
||||
mtusi2026lab3-migrate-1 mtusi2026lab3-migrate "/server -migrate" migrate 20 seconds ago Exited (0) 19 seconds ago
|
||||
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres About a minute ago Up 41 seconds (healthy) 127.0.0.1:5432->5432/tcp
|
||||
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis About a minute ago Up 41 seconds (healthy) 127.0.0.1:6379->6379/tcp
|
||||
@@ -0,0 +1,6 @@
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 7 seconds ago Up 5 seconds (health: starting) 8080/tcp
|
||||
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 7 seconds ago Up 5 seconds (health: starting) 8080/tcp
|
||||
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 34 seconds ago Up 32 seconds (healthy) 127.0.0.1:8080->8080/tcp
|
||||
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 52 seconds ago Up 51 seconds (healthy) 127.0.0.1:5432->5432/tcp
|
||||
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 52 seconds ago Up 51 seconds (healthy) 127.0.0.1:6379->6379/tcp
|
||||
@@ -0,0 +1,7 @@
|
||||
Container mtusi2026lab3-api-1 Running
|
||||
Container mtusi2026lab3-api-2 Running
|
||||
Container mtusi2026lab3-lb-1 Running
|
||||
Container mtusi2026lab3-api-1 Running
|
||||
Container mtusi2026lab3-api-2 Starting
|
||||
Container mtusi2026lab3-api-2 Started
|
||||
Container mtusi2026lab3-lb-1 Running
|
||||
@@ -0,0 +1,2 @@
|
||||
{"successful_writes": 33, "failed_attempts": 70}
|
||||
PASS: rolling recreate under load completed
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,185 @@
|
||||
go test ./student-tests/ -v -count=1 -timeout 180s
|
||||
=== RUN TestMalformedJSONAndValidation
|
||||
api_test.go:73: → битый JSON, хвост после объекта, лишнее поле, пустой текст, чужой чат
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/users status=400 request_id=82502122-e299-413e-a454-059549f1db06 duration_ms=0
|
||||
api_test.go:76: status=400 body={"error":{"code":"invalid_request","message":"malformed json","request_id":"82502122-e299-413e-a454-059549f1db06"}}
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/users status=400 request_id=f620552d-a5de-4f1a-990f-c2cd66d99b78 duration_ms=0
|
||||
api_test.go:83: status=400 body={"error":{"code":"invalid_request","message":"malformed json","request_id":"f620552d-a5de-4f1a-990f-c2cd66d99b78"}}
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/users status=201 request_id=d16e4fd8-9d25-43ed-9f98-ae67851ed42c duration_ms=53
|
||||
api_test.go:88: создан ok_user_0b3aa182 id=75e06162-aff8-4c24-b10d-9620a50189b6
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/auth/sessions status=201 request_id=2a1553f4-7ec2-4cd1-860c-b1e2716c58f2 duration_ms=39
|
||||
api_test.go:89: сессия выпущена, длина токена=64 (значение не печатаем)
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/chats status=201 request_id=a75c4f01-e734-4e4e-b646-c4d7741e70e2 duration_ms=10
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/chats/85a4b239-bf50-4f7c-ac5a-c96dc7991831/messages status=400 request_id=c364a82e-6455-407e-8171-cf8fc5f583ad duration_ms=0
|
||||
api_test.go:96: status=400 body={"error":{"code":"invalid_request","message":"malformed json","request_id":"c364a82e-6455-407e-8171-cf8fc5f583ad"}}
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/chats/85a4b239-bf50-4f7c-ac5a-c96dc7991831/messages status=400 request_id=d65cd251-e7e5-4481-a652-e47538eee956 duration_ms=0
|
||||
api_test.go:96: status=400 body={"error":{"code":"invalid_request","message":"malformed json","request_id":"d65cd251-e7e5-4481-a652-e47538eee956"}}
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/chats/85a4b239-bf50-4f7c-ac5a-c96dc7991831/messages status=400 request_id=7c7dc7ef-6675-4dc6-bf8f-7ef48aa0ab02 duration_ms=0
|
||||
api_test.go:103: status=400 body={"error":{"code":"invalid_request","message":"invalid text","request_id":"7c7dc7ef-6675-4dc6-bf8f-7ef48aa0ab02"}}
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/users status=201 request_id=8ed32fcb-dee3-49d5-be05-eb3657cc460d duration_ms=28
|
||||
api_test.go:108: создан outsider_f6dc956a id=5a9797fb-7ba6-4e15-8587-8aa59d40d9de
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/auth/sessions status=201 request_id=ba923b7f-edeb-476a-b613-e565c5a576cf duration_ms=29
|
||||
api_test.go:109: сессия выпущена, длина токена=64 (значение не печатаем)
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/chats/85a4b239-bf50-4f7c-ac5a-c96dc7991831/messages status=404 request_id=89e82723-1e18-42d7-80d7-8bff739389ad duration_ms=6
|
||||
api_test.go:111: status=404 body={"error":{"code":"not_found","message":"object not found","request_id":"89e82723-1e18-42d7-80d7-8bff739389ad"}}
|
||||
api_test.go:115: ✓ валидация JSON, хвоста, пустого текста и чужого чата
|
||||
--- PASS: TestMalformedJSONAndValidation (0.17s)
|
||||
=== RUN TestMessageTextPreservedAndLengthOnOriginal
|
||||
api_test.go:121: → пробелы по краям сохраняются; длина считается по исходному тексту
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/users status=201 request_id=18304831-da8e-46a6-b4b0-a22b14164c0d duration_ms=32
|
||||
api_test.go:122: создан text_user_b7e1d958 id=d6ae736e-a66f-4dd7-8cc1-00a6e0c1544e
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/auth/sessions status=201 request_id=1b6bbefc-ce95-4a07-8e03-9b1a5fe7c8ae duration_ms=29
|
||||
api_test.go:123: сессия выпущена, длина токена=64 (значение не печатаем)
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/chats status=201 request_id=818e462b-9f65-47b4-af19-e28112de7cff duration_ms=2
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/chats/0f0dc75f-1c0b-40db-8164-f3b0c4e02137/messages status=201 request_id=a43b9d37-4525-4a7d-9f99-22d8cfd9e59b duration_ms=4
|
||||
api_test.go:130: status=201 body={"chat_id":"0f0dc75f-1c0b-40db-8164-f3b0c4e02137","created_at":"2026-11-06T17:46:06.477Z","id":"d79cc695-026b-41f1-995e-266ed033e556","sender_id":"d6ae736e-a66f-4dd7-8cc1-00a6e0c1544e","text":" строка\nс пробелами "}
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/chats/0f0dc75f-1c0b-40db-8164-f3b0c4e02137/messages status=400 request_id=633bed72-2e32-46a9-a08a-785f69e11c73 duration_ms=0
|
||||
api_test.go:142: status=400 body={"error":{"code":"invalid_request","message":"invalid text","request_id":"633bed72-2e32-46a9-a08a-785f69e11c73"}}
|
||||
api_test.go:146: ✓ текст сохранён целиком, обход лимита через TrimSpace закрыт
|
||||
--- PASS: TestMessageTextPreservedAndLengthOnOriginal (0.07s)
|
||||
=== RUN TestSessionRejectsJSONBody
|
||||
api_test.go:152: → POST /auth/sessions с телом должен быть 400 даже при верном Basic
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/users status=201 request_id=832252b5-494d-4883-9c1e-c4e13359256d duration_ms=28
|
||||
api_test.go:153: создан body_user_f7fed7a7 id=76627b78-1f74-42fc-9d03-9e3d90a24212
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/auth/sessions status=400 request_id=99776f27-00fc-474b-80fc-fb10d223601a duration_ms=0
|
||||
api_test.go:157: status=400 body={"error":{"code":"invalid_request","message":"session create must not have a body","request_id":"99776f27-00fc-474b-80fc-fb10d223601a"}}
|
||||
api_test.go:161: ✓ вход без JSON body
|
||||
--- PASS: TestSessionRejectsJSONBody (0.03s)
|
||||
=== RUN TestWrongPasswordLogoutAndIgnoredUserHeader
|
||||
api_test.go:167: → неверный пароль, Basic на бизнес-методе, X-User-Id, logout
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/users status=201 request_id=b33cebf9-78d0-4d84-a869-2b991b57120c duration_ms=49
|
||||
api_test.go:168: создан auth_user_f2aa9ca5 id=e7e6c3a8-718b-4731-97d0-d6bcc38a7927
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/users status=201 request_id=0be0610f-10cb-4330-a7d6-33433ce6f8c4 duration_ms=27
|
||||
api_test.go:169: создан auth_other_8d1c78ab id=523b562b-8ae9-49fc-83a6-120e5732aa79
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/auth/sessions status=401 request_id=795419f7-7fbe-4391-9c05-049473f467d7 duration_ms=28
|
||||
api_test.go:174: status=401 body={"error":{"code":"unauthorized","message":"authentication required","request_id":"795419f7-7fbe-4391-9c05-049473f467d7"}}
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/auth/sessions status=201 request_id=45f65dfd-bd2d-4ac8-8b2b-da1d4b3d6d0c duration_ms=34
|
||||
api_test.go:179: сессия выпущена, длина токена=64 (значение не печатаем)
|
||||
2026/11/06 20:46:06 method=GET path=/api/v1/users/me status=401 request_id=c54d4b50-be84-46b5-92a4-f5956bf89616 duration_ms=0
|
||||
api_test.go:183: status=401 body={"error":{"code":"unauthorized","message":"authentication required","request_id":"c54d4b50-be84-46b5-92a4-f5956bf89616"}}
|
||||
2026/11/06 20:46:06 method=GET path=/api/v1/users/me status=401 request_id=363b4c77-e5a7-455d-839a-5a3f9a6244ec duration_ms=0
|
||||
api_test.go:189: status=401 body={"error":{"code":"unauthorized","message":"authentication required","request_id":"363b4c77-e5a7-455d-839a-5a3f9a6244ec"}}
|
||||
2026/11/06 20:46:06 method=GET path=/api/v1/users/me status=200 request_id=d87440cd-27f2-4183-a277-e90f70fa8e80 duration_ms=1
|
||||
api_test.go:198: status=200 body={"created_at":"2026-11-06T17:46:06.563Z","display_name":"Студент","id":"e7e6c3a8-718b-4731-97d0-d6bcc38a7927","username":"auth_user_f2aa9ca5"}
|
||||
2026/11/06 20:46:06 method=DELETE path=/api/v1/auth/sessions/current status=204 request_id=62ff5724-32bd-492c-9e15-e9d3956356e8 duration_ms=0
|
||||
api_test.go:204: logout status=204
|
||||
2026/11/06 20:46:06 method=GET path=/api/v1/users/me status=401 request_id=f495e2f2-0dea-4525-ba92-30461ee7c456 duration_ms=0
|
||||
2026/11/06 20:46:06 method=DELETE path=/api/v1/auth/sessions/current status=401 request_id=f55f3f25-0ed1-483b-aa18-15dee90d0648 duration_ms=0
|
||||
api_test.go:216: ✓ пароль, заголовки и отзыв сессии
|
||||
--- PASS: TestWrongPasswordLogoutAndIgnoredUserHeader (0.15s)
|
||||
=== RUN TestSessionExpiry
|
||||
api_test.go:222: → SESSION_TTL=2s: тот же токен после паузы должен стать 401, TTL рестартом API не продлевается
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/users status=201 request_id=9291cb27-d279-46d0-90df-abc5010b6469 duration_ms=28
|
||||
api_test.go:223: создан ttl_user_bf52abe7 id=f12b0275-5d5c-41a5-be2b-17b95c6ffe94
|
||||
2026/11/06 20:46:06 method=POST path=/api/v1/auth/sessions status=201 request_id=8eeac3c6-5b03-4a72-b47e-84cbb1bd7cd1 duration_ms=29
|
||||
api_test.go:224: сессия выпущена, длина токена=64 (значение не печатаем)
|
||||
2026/11/06 20:46:09 method=GET path=/api/v1/users/me status=401 request_id=4b4016cf-40ba-49a1-a536-fded793098de duration_ms=1
|
||||
api_test.go:227: status=401 body={"error":{"code":"unauthorized","message":"authentication required","request_id":"4b4016cf-40ba-49a1-a536-fded793098de"}}
|
||||
api_test.go:231: ✓ истёкшая сессия отклонена
|
||||
--- PASS: TestSessionExpiry (2.57s)
|
||||
=== RUN TestDuplicateUsernameRace
|
||||
api_test.go:238: → 8 параллельных регистраций username=race_13b2e314
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=201 request_id=98b7cabe-a9a3-48e9-856b-667f4e25c443 duration_ms=95
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=409 request_id=310438e7-62b0-4243-926e-5984cf9f7f31 duration_ms=98
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=409 request_id=bc8611ed-4a07-45e9-9ab2-276f15c80746 duration_ms=99
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=409 request_id=359c5ecd-43c2-4b4e-9846-73c044250997 duration_ms=101
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=409 request_id=752c74ac-8cda-4905-a92f-7a4c8de4c55a duration_ms=108
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=409 request_id=b79e711a-6017-4287-9d78-beedd0996f60 duration_ms=109
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=409 request_id=2c56cb2f-89bf-4636-aba2-a508dfbbc488 duration_ms=110
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=409 request_id=4375b0f8-3cb5-4f9b-80a6-377b54c239df duration_ms=111
|
||||
api_test.go:263: created=1 conflict=7
|
||||
api_test.go:267: ✓ UNIQUE username выдержал гонку
|
||||
--- PASS: TestDuplicateUsernameRace (0.14s)
|
||||
=== RUN TestChatCreateRollsBack
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=201 request_id=e00f3a1b-3d87-4dbf-acc4-4511c7ad88a8 duration_ms=42
|
||||
api_test.go:273: создан roll_user_4e5e1481 id=40d54c17-c429-404e-8c79-4276ec80de85
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/auth/sessions status=201 request_id=56669740-a3d6-4cac-996c-1de21c5d3222 duration_ms=78
|
||||
api_test.go:274: сессия выпущена, длина токена=64 (значение не печатаем)
|
||||
api_test.go:277: → создание чата с несуществующим участником должно откатиться, title=rollback-7c25ebeb-1184-43ab-bf55-ea03b9a798bd
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/chats status=400 request_id=04d22041-678b-4164-a931-3fce67c2cb8f duration_ms=12
|
||||
api_test.go:280: status=400 body={"error":{"code":"invalid_request","message":"unknown member","request_id":"04d22041-678b-4164-a931-3fce67c2cb8f"}}
|
||||
api_test.go:288: строк chats с этим title после ошибки: 0
|
||||
api_test.go:292: ✓ транзакция создания чата откатилась
|
||||
--- PASS: TestChatCreateRollsBack (0.14s)
|
||||
=== RUN TestPaginationPages
|
||||
api_test.go:298: → три сообщения, две страницы limit=2, затем последняя
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=201 request_id=b0815bd7-8ebc-4fdd-99d3-66ece6241da8 duration_ms=77
|
||||
api_test.go:299: создан page_user_e98926ce id=0886a2ab-448f-4e4c-85dd-1fd070883523
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/auth/sessions status=201 request_id=93c6547d-8fa1-4334-83f1-505534305f92 duration_ms=92
|
||||
api_test.go:300: сессия выпущена, длина токена=64 (значение не печатаем)
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/chats status=201 request_id=ad862b85-9219-40a7-993d-ba506a9dfb45 duration_ms=13
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/chats/0543e598-c52f-42eb-905b-80fa0d477598/messages status=201 request_id=8f4d9da8-7abf-4d66-a4e7-c8ff784cbaeb duration_ms=19
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/chats/0543e598-c52f-42eb-905b-80fa0d477598/messages status=201 request_id=7bcd1b07-9071-43bb-9ff1-d7f18559557b duration_ms=3
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/chats/0543e598-c52f-42eb-905b-80fa0d477598/messages status=201 request_id=c417896e-d061-44f6-9984-a8e5c77764b6 duration_ms=8
|
||||
2026/11/06 20:46:09 method=GET path=/api/v1/chats/0543e598-c52f-42eb-905b-80fa0d477598/messages status=200 request_id=393c6e66-6853-4609-a458-b17d858ed07b duration_ms=2
|
||||
api_test.go:310: status=200 body={"items":[{"chat_id":"0543e598-c52f-42eb-905b-80fa0d477598","created_at":"2026-11-06T17:46:09.707Z","id":"7baf8fda-3541-4183-8af3-c6788bb1c2cd","sender_id":"0886a2ab-448f-4e4c-85dd-1fd070883523","text":"раз"},{"chat_id":"0543e598-c52f-42eb-905b-80fa0d477598","created_at":"2026-11-06T17:46:09.715Z","id":"f960271d-045c-4ec2-a5d8-8e135402a904","sender_id":"0886a2ab-448f-4e4c-85dd-1fd070883523","te...
|
||||
2026/11/06 20:46:09 method=GET path=/api/v1/chats/0543e598-c52f-42eb-905b-80fa0d477598/messages status=200 request_id=3c18f8fe-8f42-4570-9cde-478beea37a6e duration_ms=1
|
||||
api_test.go:318: status=200 body={"items":[{"chat_id":"0543e598-c52f-42eb-905b-80fa0d477598","created_at":"2026-11-06T17:46:09.725Z","id":"ea86bb15-c6a7-4059-8177-e54c2b4d9c07","sender_id":"0886a2ab-448f-4e4c-85dd-1fd070883523","text":"три"}],"next_cursor":null}
|
||||
api_test.go:324: ✓ keyset обошёл историю без зависания cursor
|
||||
--- PASS: TestPaginationPages (0.23s)
|
||||
=== RUN TestRedisDownIsNotAnonymous
|
||||
api_test.go:328: → закрытый клиент Redis: вход и Bearer дают 503, а не 200 от анонима
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=201 request_id=1942453a-9f9c-4837-a004-8c99e5253c91 duration_ms=53
|
||||
api_test.go:340: создан redis_down_a3d94db1 id=3833f1aa-b200-4e2a-a7f3-8ea35efcf275
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/auth/sessions status=503 request_id=9078472e-cb44-41c0-a910-8654261b01e0 duration_ms=39
|
||||
api_test.go:344: status=503 body={"error":{"code":"unavailable","message":"dependency unavailable","request_id":"9078472e-cb44-41c0-a910-8654261b01e0"}}
|
||||
2026/11/06 20:46:09 method=GET path=/api/v1/users/me status=503 request_id=a6107a51-fd7c-40b2-be2e-b2545ba82665 duration_ms=0
|
||||
api_test.go:351: status=503 body={"error":{"code":"unavailable","message":"dependency unavailable","request_id":"a6107a51-fd7c-40b2-be2e-b2545ba82665"}}
|
||||
api_test.go:355: ✓ сбой Redis не стал анонимным доступом
|
||||
--- PASS: TestRedisDownIsNotAnonymous (0.10s)
|
||||
=== RUN TestPostgresDownIsNotAnonymous
|
||||
api_test.go:359: → закрытый пул PostgreSQL: ready/me/login дают 503, без тела пользователя
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/users status=201 request_id=e7c4b84e-f07f-449a-b66c-ed07917a1f28 duration_ms=42
|
||||
api_test.go:362: создан pg_down_6ccc1931 id=05b646b7-4815-439c-96b1-9057413d6957
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/auth/sessions status=201 request_id=16c7eacc-6092-4903-a044-9b5a0a3a81b6 duration_ms=38
|
||||
api_test.go:363: сессия выпущена, длина токена=64 (значение не печатаем)
|
||||
2026/11/06 20:46:09 method=GET path=/health/ready status=503 request_id=d6fb4e1d-f01b-4474-b401-89e094a9eee7 duration_ms=0
|
||||
api_test.go:384: status=503 body={"error":{"code":"unavailable","message":"dependency unavailable","request_id":"d6fb4e1d-f01b-4474-b401-89e094a9eee7"}}
|
||||
2026/11/06 20:46:09 method=GET path=/api/v1/users/me status=503 request_id=52afb042-c70b-4ed8-a9ee-8ab497a758c4 duration_ms=0
|
||||
api_test.go:391: status=503 body={"error":{"code":"unavailable","message":"dependency unavailable","request_id":"52afb042-c70b-4ed8-a9ee-8ab497a758c4"}}
|
||||
2026/11/06 20:46:09 method=POST path=/api/v1/auth/sessions status=503 request_id=90541ca1-961a-4276-96cb-f19172eecf7b duration_ms=0
|
||||
api_test.go:398: status=503 body={"error":{"code":"unavailable","message":"dependency unavailable","request_id":"90541ca1-961a-4276-96cb-f19172eecf7b"}}
|
||||
api_test.go:402: ✓ сбой PostgreSQL не стал анонимным доступом
|
||||
--- PASS: TestPostgresDownIsNotAnonymous (0.15s)
|
||||
=== RUN TestIdempotencyReplayAndConflict
|
||||
api_test.go:409: → повтор того же Idempotency-Key возвращает то же сообщение; другой body — 409
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/users status=201 request_id=4ec37886-8d95-4784-b5d5-1e7dfabcddab duration_ms=29
|
||||
api_test.go:410: создан idem_user_9c6d662f id=53d33900-2eae-4e46-a939-bedb0cc5d928
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/auth/sessions status=201 request_id=d20cc604-21c6-43d5-90c9-6e822d5ff191 duration_ms=32
|
||||
api_test.go:411: сессия выпущена, длина токена=64 (значение не печатаем)
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats status=201 request_id=c4f200f9-64fe-4903-88db-73782e8ee422 duration_ms=3
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/11936c78-4669-481a-a808-a602f56627e0/messages status=201 request_id=0371a103-73f4-4865-b9e3-4ae9c1745f3f duration_ms=7
|
||||
api_test.go:419: status=201 body={"chat_id":"11936c78-4669-481a-a808-a602f56627e0","created_at":"2026-11-06T17:46:10.047Z","id":"6fc605ac-e37e-4640-b90a-2a4c2a8c9042","sender_id":"53d33900-2eae-4e46-a939-bedb0cc5d928","text":"один раз"}
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/11936c78-4669-481a-a808-a602f56627e0/messages status=201 request_id=58363eaf-1693-4f3a-b141-ba06410a7576 duration_ms=6
|
||||
api_test.go:425: status=201 body={"chat_id":"11936c78-4669-481a-a808-a602f56627e0","created_at":"2026-11-06T17:46:10.047Z","id":"6fc605ac-e37e-4640-b90a-2a4c2a8c9042","sender_id":"53d33900-2eae-4e46-a939-bedb0cc5d928","text":"один раз"}
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/11936c78-4669-481a-a808-a602f56627e0/messages status=409 request_id=d33766c6-ce1d-44a2-8aa9-7625c50c4814 duration_ms=3
|
||||
api_test.go:434: status=409 body={"error":{"code":"conflict","message":"idempotency key reused with different body","request_id":"d33766c6-ce1d-44a2-8aa9-7625c50c4814"}}
|
||||
api_test.go:438: ✓ replay и conflict по Idempotency-Key
|
||||
--- PASS: TestIdempotencyReplayAndConflict (0.08s)
|
||||
=== RUN TestIdempotencyKeyRequiredAndConcurrent
|
||||
api_test.go:444: → нет ключа → 400; 8 параллельных POST с одним ключом → ровно одно сообщение
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/users status=201 request_id=3a3990a8-015c-4c86-be56-3e98ebba3950 duration_ms=41
|
||||
api_test.go:445: создан idem_race_33d4db8f id=5415e7f3-4c00-407f-877e-21fa32c903c5
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/auth/sessions status=201 request_id=73ab668c-8f19-4195-8c9c-d1a2e72b9a46 duration_ms=27
|
||||
api_test.go:446: сессия выпущена, длина токена=64 (значение не печатаем)
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats status=201 request_id=d4cabda8-aeda-4ef6-975d-ff7abfc571ed duration_ms=2
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/7bfa2935-365b-4bec-ad28-e8b9a5329627/messages status=400 request_id=5a178619-44f1-4be5-a14c-2392431291d6 duration_ms=0
|
||||
api_test.go:464: status=400 body={"error":{"code":"invalid_request","message":"invalid or missing Idempotency-Key","request_id":"5a178619-44f1-4be5-a14c-2392431291d6"}}
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/7bfa2935-365b-4bec-ad28-e8b9a5329627/messages status=201 request_id=0fcd82fa-4921-40eb-8223-1f072ec8ce45 duration_ms=6
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/7bfa2935-365b-4bec-ad28-e8b9a5329627/messages status=201 request_id=c5388197-6a37-48ee-992d-106bae593dc5 duration_ms=8
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/7bfa2935-365b-4bec-ad28-e8b9a5329627/messages status=201 request_id=0fcdda38-46dc-4bce-a52e-704745db52be duration_ms=10
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/7bfa2935-365b-4bec-ad28-e8b9a5329627/messages status=201 request_id=ecaee0b6-d366-4b20-b458-404e23f80db5 duration_ms=12
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/7bfa2935-365b-4bec-ad28-e8b9a5329627/messages status=201 request_id=a99fb3f0-624a-4a6b-a9b8-5ac18bed4618 duration_ms=15
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/7bfa2935-365b-4bec-ad28-e8b9a5329627/messages status=201 request_id=e8685009-2b1b-43d5-ae95-4d5e724efc12 duration_ms=15
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/7bfa2935-365b-4bec-ad28-e8b9a5329627/messages status=201 request_id=fcf8faaa-d21f-4d90-aa11-5c594266d0a5 duration_ms=16
|
||||
2026/11/06 20:46:10 method=POST path=/api/v1/chats/7bfa2935-365b-4bec-ad28-e8b9a5329627/messages status=201 request_id=b189e688-fd76-4c73-8cb6-76c00423a2d5 duration_ms=17
|
||||
api_test.go:496: unique message ids=1
|
||||
api_test.go:500: ✓ ключ обязателен; конкурентный повтор не плодит дубли
|
||||
--- PASS: TestIdempotencyKeyRequiredAndConcurrent (0.09s)
|
||||
=== RUN TestInstanceIDHeaderPresent
|
||||
api_test.go:506: → каждый ответ содержит непустой X-Instance-Id
|
||||
api_test.go:508: status=200 body={"status":"ok"}
|
||||
api_test.go:512: ✓ X-Instance-Id=test-instance
|
||||
--- PASS: TestInstanceIDHeaderPresent (0.00s)
|
||||
PASS
|
||||
ok mtusi2026lab3/student-tests 5.156s
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"concurrency": 8,
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead.",
|
||||
"elapsed_seconds": 30.0,
|
||||
"successful_requests": 17630,
|
||||
"failed_requests": 2,
|
||||
"error_ratio": 0.000113,
|
||||
"successful_rps": 587.206,
|
||||
"successful_latency_ms": {
|
||||
"p50": 7.806,
|
||||
"p95": 43.069,
|
||||
"p99": 70.326
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
mtusi2026lab3-lb-1 43.72% 10.45MiB / 128MiB
|
||||
mtusi2026lab3-api-2 52.37% 66.08MiB / 512MiB
|
||||
mtusi2026lab3-api-1 55.70% 66.15MiB / 512MiB
|
||||
mtusi2026lab3-postgres-1 90.82% 63.12MiB / 512MiB
|
||||
mtusi2026lab3-redis-1 7.32% 9.688MiB / 256MiB
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"concurrency": 8,
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead.",
|
||||
"elapsed_seconds": 30.0,
|
||||
"successful_requests": 17519,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 583.75,
|
||||
"successful_latency_ms": {
|
||||
"p50": 8.706,
|
||||
"p95": 38.678,
|
||||
"p99": 71.101
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 12 seconds ago Up 10 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 12 seconds ago Up 10 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 39 seconds ago Up 37 seconds (healthy) 127.0.0.1:8080->8080/tcp
|
||||
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 57 seconds ago Up 56 seconds (healthy) 127.0.0.1:5432->5432/tcp
|
||||
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 57 seconds ago Up 56 seconds (healthy) 127.0.0.1:6379->6379/tcp
|
||||
@@ -0,0 +1,5 @@
|
||||
mtusi2026lab3-api-2 3.59% 79.73MiB / 256MiB
|
||||
mtusi2026lab3-api-1 1.48% 80.56MiB / 256MiB
|
||||
mtusi2026lab3-lb-1 5.31% 11.88MiB / 128MiB
|
||||
mtusi2026lab3-postgres-1 0.19% 96.55MiB / 512MiB
|
||||
mtusi2026lab3-redis-1 0.57% 9.75MiB / 256MiB
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"elapsed_seconds": 30.023,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 30969,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 1031.514,
|
||||
"successful_latency_ms": {
|
||||
"p50": 5.836,
|
||||
"p95": 15.396,
|
||||
"p99": 33.891
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 43 seconds ago Up 41 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 43 seconds ago Up 42 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab3-api-3 mtusi2026lab3-api "/server" api 43 seconds ago Up 41 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab3-api-4 mtusi2026lab3-api "/server" api 43 seconds ago Up 41 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 41 seconds ago Up 38 seconds (healthy) 127.0.0.1:8080->8080/tcp
|
||||
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres About a minute ago Up About a minute (healthy) 127.0.0.1:5432->5432/tcp
|
||||
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis About a minute ago Up About a minute (healthy) 127.0.0.1:6379->6379/tcp
|
||||
@@ -0,0 +1,7 @@
|
||||
mtusi2026lab3-lb-1 0.49% 14.12MiB / 128MiB
|
||||
mtusi2026lab3-api-2 3.45% 10.9MiB / 256MiB
|
||||
mtusi2026lab3-api-3 0.58% 11.18MiB / 256MiB
|
||||
mtusi2026lab3-api-1 0.09% 11.75MiB / 256MiB
|
||||
mtusi2026lab3-api-4 0.27% 11.09MiB / 256MiB
|
||||
mtusi2026lab3-postgres-1 7.41% 146.9MiB / 512MiB
|
||||
mtusi2026lab3-redis-1 0.97% 9.758MiB / 256MiB
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"elapsed_seconds": 30.033,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 16449,
|
||||
"failed_requests": 3820,
|
||||
"error_ratio": 0.188465,
|
||||
"successful_rps": 547.704,
|
||||
"successful_latency_ms": {
|
||||
"p50": 7.773,
|
||||
"p95": 33.441,
|
||||
"p99": 61.507
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 28 seconds ago Up 26 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 28 seconds ago Up 27 seconds (healthy) 8080/tcp
|
||||
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 27 seconds ago Up 25 seconds (healthy) 127.0.0.1:8080->8080/tcp
|
||||
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 45 seconds ago Up 44 seconds (healthy) 127.0.0.1:5432->5432/tcp
|
||||
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 45 seconds ago Up 44 seconds (healthy) 127.0.0.1:6379->6379/tcp
|
||||
@@ -0,0 +1,5 @@
|
||||
mtusi2026lab3-lb-1 39.89% 12.01MiB / 128MiB
|
||||
mtusi2026lab3-api-2 58.19% 29.21MiB / 512MiB
|
||||
mtusi2026lab3-api-1 56.66% 31.08MiB / 512MiB
|
||||
mtusi2026lab3-postgres-1 94.16% 89.26MiB / 512MiB
|
||||
mtusi2026lab3-redis-1 7.38% 9.754MiB / 256MiB
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"concurrency": 8,
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead.",
|
||||
"elapsed_seconds": 30.013,
|
||||
"successful_requests": 18347,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 611.308,
|
||||
"successful_latency_ms": {
|
||||
"p50": 8.447,
|
||||
"p95": 37.298,
|
||||
"p99": 68.98
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"concurrency": 8,
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead.",
|
||||
"elapsed_seconds": 30.0,
|
||||
"successful_requests": 13521,
|
||||
"failed_requests": 42384,
|
||||
"error_ratio": 0.758143,
|
||||
"successful_rps": 450.622,
|
||||
"successful_latency_ms": {
|
||||
"p50": 8.277,
|
||||
"p95": 45.456,
|
||||
"p99": 71.757
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"runs": [
|
||||
{
|
||||
"label": "fixed_budget_n1",
|
||||
"successful_rps": 587.206,
|
||||
"error_ratio": 0.000113,
|
||||
"p50_ms": 7.806,
|
||||
"p95_ms": 43.069,
|
||||
"p99_ms": 70.326,
|
||||
"successful_requests": 17630,
|
||||
"failed_requests": 2,
|
||||
"concurrency": 8,
|
||||
"elapsed_seconds": 30.0
|
||||
},
|
||||
{
|
||||
"label": "fixed_budget_n2",
|
||||
"successful_rps": 583.75,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 8.706,
|
||||
"p95_ms": 38.678,
|
||||
"p99_ms": 71.101,
|
||||
"successful_requests": 17519,
|
||||
"failed_requests": 0,
|
||||
"concurrency": 8,
|
||||
"elapsed_seconds": 30.0
|
||||
},
|
||||
{
|
||||
"label": "fixed_budget_n4",
|
||||
"successful_rps": 191.028,
|
||||
"error_ratio": 0.946069,
|
||||
"p50_ms": 7.41,
|
||||
"p95_ms": 58.94,
|
||||
"p99_ms": 209.114,
|
||||
"successful_requests": 5853,
|
||||
"failed_requests": 102674,
|
||||
"concurrency": 8,
|
||||
"elapsed_seconds": 30.0
|
||||
},
|
||||
{
|
||||
"label": "grow_n2_small",
|
||||
"successful_rps": 450.622,
|
||||
"error_ratio": 0.758143,
|
||||
"p50_ms": 8.277,
|
||||
"p95_ms": 45.456,
|
||||
"p99_ms": 71.757,
|
||||
"successful_requests": 13521,
|
||||
"failed_requests": 42384,
|
||||
"concurrency": 8,
|
||||
"elapsed_seconds": 30.0
|
||||
},
|
||||
{
|
||||
"label": "grow_n2_medium",
|
||||
"successful_rps": 611.308,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 8.447,
|
||||
"p95_ms": 37.298,
|
||||
"p99_ms": 68.98,
|
||||
"successful_requests": 18347,
|
||||
"failed_requests": 0,
|
||||
"concurrency": 8,
|
||||
"elapsed_seconds": 30.013
|
||||
},
|
||||
{
|
||||
"label": "grow_n2_large",
|
||||
"successful_rps": 547.704,
|
||||
"error_ratio": 0.188465,
|
||||
"p50_ms": 7.773,
|
||||
"p95_ms": 33.441,
|
||||
"p99_ms": 61.507,
|
||||
"successful_requests": 16449,
|
||||
"failed_requests": 3820,
|
||||
"concurrency": 8,
|
||||
"elapsed_seconds": 30.033
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
# Track 1 summary
|
||||
|
||||
Closed-loop `tests/load.py` (duration=30, concurrency=8). RPS — только успешные HTTP 201.
|
||||
|
||||
| label | RPS | err_ratio | p50 ms | p95 ms | p99 ms | ok | fail |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| fixed_budget_n1 | 587.206 | 0.000113 | 7.806 | 43.069 | 70.326 | 17630 | 2 |
|
||||
| fixed_budget_n2 | 583.75 | 0.0 | 8.706 | 38.678 | 71.101 | 17519 | 0 |
|
||||
| fixed_budget_n4 | 191.028 | 0.946069 | 7.41 | 58.94 | 209.114 | 5853 | 102674 |
|
||||
| grow_n2_small | 450.622 | 0.758143 | 8.277 | 45.456 | 71.757 | 13521 | 42384 |
|
||||
| grow_n2_medium | 611.308 | 0.0 | 8.447 | 37.298 | 68.98 | 18347 | 0 |
|
||||
| grow_n2_large | 547.704 | 0.188465 | 7.773 | 33.441 | 61.507 | 16449 | 3820 |
|
||||
|
||||
Reference in New Issue
Block a user