From a57cbcf3292d91164abc24ed101e9712a93b835d Mon Sep 17 00:00:00 2001 From: Vladislav Agapov Date: Fri, 16 Oct 2026 11:42:02 +0300 Subject: [PATCH 1/4] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=B8=20=D0=B0=D0=BA=D1=82=D1=83=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=83=D1=8E=20lab2=20=D0=BA=D0=B0=D0=BA=20=D0=B1=D0=B0=D0=B7?= =?UTF-8?q?=D1=83=20lab3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 28 +- .env.example | 29 +- .github/workflows/application.yml | 50 +++ .gitignore | 3 + .golangci.yml | 21 ++ ARCHITECTURE.md | 44 +++ Dockerfile | 16 + Makefile | 63 +++- REPORT.md | 38 +- charts/messenger/Chart.yaml | 6 + charts/messenger/templates/_helpers.tpl | 7 + charts/messenger/templates/api.yaml | 88 +++++ charts/messenger/templates/guard.yaml | 7 + .../messenger/templates/network-policy.yaml | 22 ++ charts/messenger/templates/postgres.yaml | 66 ++++ charts/messenger/templates/valkey.yaml | 57 +++ charts/messenger/values.schema.json | 9 + charts/messenger/values.yaml | 34 ++ cmd/server/app.go | 97 +++++ cmd/server/app_test.go | 104 ++++++ cmd/server/commands.go | 19 + cmd/server/healthcheck.go | 46 +++ cmd/server/healthcheck_test.go | 111 ++++++ cmd/server/logger.go | 29 ++ cmd/server/main.go | 15 + cmd/server/persistence.go | 77 ++++ cmd/server/persistence_test.go | 48 +++ docs/DEFENSE.md | 89 +++++ docs/PLAN.md | 23 ++ docs/SPEC.md | 48 +++ .../0001-postgres-sessions-shards.md | 33 ++ docs/decisions/0002-helm.md | 15 + go.mod | 36 ++ go.sum | 77 ++++ internal/admission/distributed.go | 18 + internal/admission/limiter.go | 73 ++++ internal/admission/limiter_test.go | 148 ++++++++ internal/config/config.go | 53 +++ internal/config/config_test.go | 241 +++++++++++++ internal/config/controller.go | 157 ++++++++ internal/config/environment.go | 41 +++ internal/config/logger.go | 32 ++ internal/config/memory.go | 54 +++ internal/config/persistence.go | 52 +++ internal/config/persistence_test.go | 34 ++ internal/controller/fx.go | 8 + internal/controller/http/fiber/auth.go | 76 ++++ internal/controller/http/fiber/auth_test.go | 161 +++++++++ internal/controller/http/fiber/chats_test.go | 312 ++++++++++++++++ internal/controller/http/fiber/configure.go | 37 ++ internal/controller/http/fiber/controller.go | 57 +++ .../controller/http/fiber/controller_test.go | 319 +++++++++++++++++ internal/controller/http/fiber/decode.go | 22 ++ .../controller/http/fiber/dependencies.go | 9 + internal/controller/http/fiber/error_codes.go | 22 ++ .../controller/http/fiber/error_registry.go | 33 ++ internal/controller/http/fiber/errors.go | 71 ++++ internal/controller/http/fiber/errors_test.go | 107 ++++++ .../http/fiber/fixtures_auth_test.go | 61 ++++ internal/controller/http/fiber/handlers.go | 96 +++++ internal/controller/http/fiber/headers.go | 7 + internal/controller/http/fiber/health.go | 28 ++ internal/controller/http/fiber/lifecycle.go | 70 ++++ .../controller/http/fiber/lifecycle_test.go | 132 +++++++ internal/controller/http/fiber/mapping.go | 77 ++++ .../controller/http/fiber/messages_test.go | 270 ++++++++++++++ internal/controller/http/fiber/middleware.go | 81 +++++ .../controller/http/fiber/middleware_test.go | 211 +++++++++++ .../controller/http/fiber/public_errors.go | 51 +++ .../http/fiber/public_errors_test.go | 43 +++ internal/controller/http/fiber/routes.go | 22 ++ internal/controller/http/fiber/users_test.go | 130 +++++++ internal/controller/interface.go | 12 + internal/cursor/codec.go | 108 ++++++ internal/cursor/codec_test.go | 179 ++++++++++ internal/hashring/ring.go | 62 ++++ internal/hashring/ring_test.go | 73 ++++ internal/model/dto/models.go | 110 ++++++ internal/model/dto/session.go | 13 + internal/model/http/models.go | 98 +++++ internal/password/password.go | 54 +++ internal/password/password_test.go | 37 ++ internal/service/auth.go | 44 +++ internal/service/authentication/service.go | 123 +++++++ .../service/authentication/service_test.go | 232 ++++++++++++ internal/service/cache.go | 17 + internal/service/cursor.go | 12 + internal/service/errors.go | 23 ++ internal/service/interface.go | 36 ++ internal/service/production/access.go | 62 ++++ internal/service/production/cache_test.go | 84 +++++ internal/service/production/chats.go | 47 +++ .../service/production/chats_page_test.go | 207 +++++++++++ internal/service/production/chats_test.go | 261 ++++++++++++++ internal/service/production/creation.go | 49 +++ internal/service/production/errors.go | 23 ++ internal/service/production/fixture_test.go | 147 ++++++++ internal/service/production/members.go | 42 +++ internal/service/production/messages.go | 38 ++ .../service/production/messages_page_test.go | 231 ++++++++++++ internal/service/production/messages_test.go | 147 ++++++++ internal/service/production/pages.go | 49 +++ internal/service/production/pages_test.go | 53 +++ internal/service/production/pagination.go | 78 ++++ .../service/production/pagination_test.go | 74 ++++ internal/service/production/service.go | 39 ++ internal/service/production/service_test.go | 39 ++ internal/service/production/users.go | 47 +++ internal/service/production/users_test.go | 289 +++++++++++++++ internal/service/production/validation.go | 51 +++ internal/store/interface.go | 54 +++ internal/store/memory/capacity.go | 38 ++ internal/store/memory/chats.go | 66 ++++ internal/store/memory/chats_test.go | 148 ++++++++ internal/store/memory/messages.go | 41 +++ internal/store/memory/messages_test.go | 72 ++++ internal/store/memory/ordering.go | 25 ++ internal/store/memory/store.go | 47 +++ internal/store/memory/store_test.go | 64 ++++ internal/store/memory/users.go | 50 +++ internal/store/memory/users_test.go | 116 ++++++ internal/store/postgres/chats.go | 58 +++ internal/store/postgres/errors_test.go | 52 +++ internal/store/postgres/messages.go | 50 +++ .../store/postgres/migrations/001_initial.sql | 34 ++ internal/store/postgres/sessions.go | 36 ++ internal/store/postgres/store.go | 127 +++++++ internal/store/postgres/store_test.go | 336 ++++++++++++++++++ internal/store/postgres/users.go | 58 +++ internal/strictjson/decode.go | 79 ++++ internal/strictjson/decode_test.go | 52 +++ internal/valkey/admission.go | 132 +++++++ internal/valkey/cache.go | 42 +++ internal/valkey/client.go | 113 ++++++ internal/valkey/client_test.go | 247 +++++++++++++ scripts/coverage.awk | 35 ++ scripts/coverage.sh | 80 +++++ scripts/experiment.sh | 27 ++ scripts/init-secrets.sh | 21 ++ scripts/port-forward.sh | 21 ++ scripts/research.sh | 44 +++ scripts/restart.sh | 12 + scripts/run-load.sh | 40 +++ scripts/scale-shards.sh | 17 + scripts/stop-one.sh | 10 + scripts/test-faults.sh | 112 ++++++ student-tests/README.md | 13 + student-tests/plans.sql | 16 + student-tests/quality_test.go | 125 +++++++ student-tests/research.sql | 26 ++ 150 files changed, 10826 insertions(+), 71 deletions(-) create mode 100644 .github/workflows/application.yml create mode 100644 .golangci.yml create mode 100644 ARCHITECTURE.md create mode 100644 Dockerfile create mode 100644 charts/messenger/Chart.yaml create mode 100644 charts/messenger/templates/_helpers.tpl create mode 100644 charts/messenger/templates/api.yaml create mode 100644 charts/messenger/templates/guard.yaml create mode 100644 charts/messenger/templates/network-policy.yaml create mode 100644 charts/messenger/templates/postgres.yaml create mode 100644 charts/messenger/templates/valkey.yaml create mode 100644 charts/messenger/values.schema.json create mode 100644 charts/messenger/values.yaml create mode 100644 cmd/server/app.go create mode 100644 cmd/server/app_test.go create mode 100644 cmd/server/commands.go create mode 100644 cmd/server/healthcheck.go create mode 100644 cmd/server/healthcheck_test.go create mode 100644 cmd/server/logger.go create mode 100644 cmd/server/main.go create mode 100644 cmd/server/persistence.go create mode 100644 cmd/server/persistence_test.go create mode 100644 docs/DEFENSE.md create mode 100644 docs/PLAN.md create mode 100644 docs/SPEC.md create mode 100644 docs/decisions/0001-postgres-sessions-shards.md create mode 100644 docs/decisions/0002-helm.md create mode 100644 go.mod create mode 100644 go.sum create mode 100644 internal/admission/distributed.go create mode 100644 internal/admission/limiter.go create mode 100644 internal/admission/limiter_test.go create mode 100644 internal/config/config.go create mode 100644 internal/config/config_test.go create mode 100644 internal/config/controller.go create mode 100644 internal/config/environment.go create mode 100644 internal/config/logger.go create mode 100644 internal/config/memory.go create mode 100644 internal/config/persistence.go create mode 100644 internal/config/persistence_test.go create mode 100644 internal/controller/fx.go create mode 100644 internal/controller/http/fiber/auth.go create mode 100644 internal/controller/http/fiber/auth_test.go create mode 100644 internal/controller/http/fiber/chats_test.go create mode 100644 internal/controller/http/fiber/configure.go create mode 100644 internal/controller/http/fiber/controller.go create mode 100644 internal/controller/http/fiber/controller_test.go create mode 100644 internal/controller/http/fiber/decode.go create mode 100644 internal/controller/http/fiber/dependencies.go create mode 100644 internal/controller/http/fiber/error_codes.go create mode 100644 internal/controller/http/fiber/error_registry.go create mode 100644 internal/controller/http/fiber/errors.go create mode 100644 internal/controller/http/fiber/errors_test.go create mode 100644 internal/controller/http/fiber/fixtures_auth_test.go create mode 100644 internal/controller/http/fiber/handlers.go create mode 100644 internal/controller/http/fiber/headers.go create mode 100644 internal/controller/http/fiber/health.go create mode 100644 internal/controller/http/fiber/lifecycle.go create mode 100644 internal/controller/http/fiber/lifecycle_test.go create mode 100644 internal/controller/http/fiber/mapping.go create mode 100644 internal/controller/http/fiber/messages_test.go create mode 100644 internal/controller/http/fiber/middleware.go create mode 100644 internal/controller/http/fiber/middleware_test.go create mode 100644 internal/controller/http/fiber/public_errors.go create mode 100644 internal/controller/http/fiber/public_errors_test.go create mode 100644 internal/controller/http/fiber/routes.go create mode 100644 internal/controller/http/fiber/users_test.go create mode 100644 internal/controller/interface.go create mode 100644 internal/cursor/codec.go create mode 100644 internal/cursor/codec_test.go create mode 100644 internal/hashring/ring.go create mode 100644 internal/hashring/ring_test.go create mode 100644 internal/model/dto/models.go create mode 100644 internal/model/dto/session.go create mode 100644 internal/model/http/models.go create mode 100644 internal/password/password.go create mode 100644 internal/password/password_test.go create mode 100644 internal/service/auth.go create mode 100644 internal/service/authentication/service.go create mode 100644 internal/service/authentication/service_test.go create mode 100644 internal/service/cache.go create mode 100644 internal/service/cursor.go create mode 100644 internal/service/errors.go create mode 100644 internal/service/interface.go create mode 100644 internal/service/production/access.go create mode 100644 internal/service/production/cache_test.go create mode 100644 internal/service/production/chats.go create mode 100644 internal/service/production/chats_page_test.go create mode 100644 internal/service/production/chats_test.go create mode 100644 internal/service/production/creation.go create mode 100644 internal/service/production/errors.go create mode 100644 internal/service/production/fixture_test.go create mode 100644 internal/service/production/members.go create mode 100644 internal/service/production/messages.go create mode 100644 internal/service/production/messages_page_test.go create mode 100644 internal/service/production/messages_test.go create mode 100644 internal/service/production/pages.go create mode 100644 internal/service/production/pages_test.go create mode 100644 internal/service/production/pagination.go create mode 100644 internal/service/production/pagination_test.go create mode 100644 internal/service/production/service.go create mode 100644 internal/service/production/service_test.go create mode 100644 internal/service/production/users.go create mode 100644 internal/service/production/users_test.go create mode 100644 internal/service/production/validation.go create mode 100644 internal/store/interface.go create mode 100644 internal/store/memory/capacity.go create mode 100644 internal/store/memory/chats.go create mode 100644 internal/store/memory/chats_test.go create mode 100644 internal/store/memory/messages.go create mode 100644 internal/store/memory/messages_test.go create mode 100644 internal/store/memory/ordering.go create mode 100644 internal/store/memory/store.go create mode 100644 internal/store/memory/store_test.go create mode 100644 internal/store/memory/users.go create mode 100644 internal/store/memory/users_test.go create mode 100644 internal/store/postgres/chats.go create mode 100644 internal/store/postgres/errors_test.go create mode 100644 internal/store/postgres/messages.go create mode 100644 internal/store/postgres/migrations/001_initial.sql create mode 100644 internal/store/postgres/sessions.go create mode 100644 internal/store/postgres/store.go create mode 100644 internal/store/postgres/store_test.go create mode 100644 internal/store/postgres/users.go create mode 100644 internal/strictjson/decode.go create mode 100644 internal/strictjson/decode_test.go create mode 100644 internal/valkey/admission.go create mode 100644 internal/valkey/cache.go create mode 100644 internal/valkey/client.go create mode 100644 internal/valkey/client_test.go create mode 100644 scripts/coverage.awk create mode 100755 scripts/coverage.sh create mode 100755 scripts/experiment.sh create mode 100755 scripts/init-secrets.sh create mode 100755 scripts/port-forward.sh create mode 100755 scripts/research.sh create mode 100755 scripts/restart.sh create mode 100755 scripts/run-load.sh create mode 100755 scripts/scale-shards.sh create mode 100755 scripts/stop-one.sh create mode 100755 scripts/test-faults.sh create mode 100644 student-tests/README.md create mode 100644 student-tests/plans.sql create mode 100644 student-tests/quality_test.go create mode 100644 student-tests/research.sql diff --git a/.dockerignore b/.dockerignore index bc16e556..a4397ed5 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,20 +1,8 @@ -.git -.github -.env -.env.* -!.env.example -secrets -certs -volumes -data -backups -*.key -*.pem -*.p12 -*.pfx -*.jks -.venv -__pycache__ -node_modules -evidence -.DS_Store +* +!go.mod +!go.sum +!cmd/ +!cmd/** +!internal/ +!internal/** +!Dockerfile diff --git a/.env.example b/.env.example index d32b9be0..e824eb8b 100644 --- a/.env.example +++ b/.env.example @@ -1,13 +1,22 @@ -# Copy to .env for your LOCAL synthetic test environment; never commit .env. -# These are logical interface suggestions; map actual framework names in REPORT.md. +# Synthetic isolated environment only. Never commit the local .env. APP_HOST=0.0.0.0 APP_PORT=8080 -APP_ENV=lab +DATABASE_URL=postgres://messenger:REPLACE_LOCALLY@127.0.0.1:5432/messenger?sslmode=disable +VALKEY_SHARDS=shard0=127.0.0.1:6379,shard1=127.0.0.1:6380 +VALKEY_COORDINATOR=shard0 SESSION_TTL_SECONDS=3600 -# Choose credentials locally. File paths contain no secret values. -DATABASE_URL_FILE=/run/secrets/database_url -# Optional on 3, required use on 4 in lab2; Redis OR Valkey: -SESSION_STORE=postgres -CACHE_URL_FILE=/run/secrets/cache_url -API_REPLICAS=2 -IDEMPOTENCY_TTL_SECONDS=86400 +DEPENDENCY_POOL_SIZE=8 +DEPENDENCY_TIMEOUT_MS=1000 +REQUEST_TIMEOUT_SECONDS=3 +SHUTDOWN_TIMEOUT_SECONDS=5 +MAX_IN_FLIGHT=32 +REQUESTS_PER_SECOND=1000 +AUTH_RATE=100 +AUTH_SLOTS=4 +USER_RATE=100 +USER_SLOTS=8 +USER_WRITE_RATE=50 +USER_WRITE_SLOTS=4 +USER_AUTH_RATE=20 +USER_AUTH_SLOTS=2 +LOG_LEVEL=info diff --git a/.github/workflows/application.yml b/.github/workflows/application.yml new file mode 100644 index 00000000..b9ba4fc3 --- /dev/null +++ b/.github/workflows/application.yml @@ -0,0 +1,50 @@ +name: Application +on: [push, pull_request] +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 15 + services: + postgres: + image: postgres:17.6-alpine + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: isolated-ci-password + POSTGRES_DB: messenger + ports: ['5432:5432'] + options: >- + --health-cmd "pg_isready -U postgres -d messenger" + --health-interval 2s --health-timeout 2s --health-retries 20 + valkey0: + image: valkey/valkey:8.1.3-alpine + ports: ['6379:6379'] + valkey1: + image: valkey/valkey:8.1.3-alpine + ports: ['6380:6379'] + valkey2: + image: valkey/valkey:8.1.3-alpine + ports: ['6381:6379'] + env: + DATABASE_URL: postgres://postgres:isolated-ci-password@localhost:5432/messenger?sslmode=disable + TEST_DATABASE_URL: postgres://postgres:isolated-ci-password@localhost:5432/messenger?sslmode=disable + VALKEY_SHARDS: shard0=localhost:6379,shard1=localhost:6380,shard2=localhost:6381 + TEST_VALKEY_ADDRESS: localhost:6381 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.26.1' + - run: make check + - run: make vet + - uses: golangci/golangci-lint-action@v8 + with: + version: v2.12.2 + - run: make coverage + - run: make test-faults + - uses: actions/upload-artifact@v4 + if: always() + with: + name: coverage + path: coverage/ diff --git a/.gitignore b/.gitignore index b5a71896..b72f046b 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,6 @@ coverage/ .vscode/ # Keep small, sanitized evidence summaries in evidence/ under version control. # Inspect git diff --cached: ignore rules are not a secret scanner. +/server + +/key.json diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 00000000..c00b9409 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,21 @@ +version: "2" +run: + timeout: 3m +linters: + default: none + enable: + - errcheck + - govet + - ineffassign + - staticcheck + - unused + - revive + - gocritic +formatters: + enable: + - gofmt + - goimports + settings: + goimports: + local-prefixes: + - gitea.privcloud.tech/vlad_marlo/mtusi2026lab2 diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md new file mode 100644 index 00000000..e0aef649 --- /dev/null +++ b/ARCHITECTURE.md @@ -0,0 +1,44 @@ +# Архитектура лабораторной 2 + +Статус: реализовано, проверено локально и развёрнуто в Kubernetes dev / highload-applications. Требования: [SPEC](docs/SPEC.md), фактический статус: [PLAN](docs/PLAN.md). + +Сохраняются Fiber v2, Fx, Zap и транспортный реестр fielderr. Composition root связывает интерфейсы с реализациями. Controller декодирует HTTP и преобразует DTO, service валидирует значения и доступ, PostgreSQL store исполняет SQL и транзакции. Парольная криптография и кеширование имеют собственные интерфейсы потребителей. + +## Схема и транзакции + +`users`: UUID PK, username UNIQUE, display_name, password_hash, created_at. `chats`: UUID PK, title, created_at. `chat_members`: составной PK(chat_id,user_id), FK на users/chats. `messages`: UUID PK, chat_id/sender_id FK, text, created_at; индекс (chat_id,created_at,id). `sessions`: hash токена PK, user_id FK, expires_at. Создание чата и всех участников — одна транзакция; ограничение username обеспечивается БД, включая гонки. Вставки сообщений сериализуются на строке чата для монотонного времени в пределах чата. Чтение истории использует keyset и LIMIT, без OFFSET. + +PostgreSQL хранит источник истины. Кэш неизменяемых профилей пользователей допускает безопасное восстановление из БД; сессия проверяется по PostgreSQL при каждом запросе, поэтому logout не зависит от успешной инвалидации кэша. TTL ограничивает срок хранения профиля. История не кэшируется. + +## Admission и шарды + +Клиентское кольцо consistent hashing с виртуальными узлами распределяет пользовательские ключи и кэш между 2–3 самостоятельными Valkey. Это не Redis Cluster с его 16384 hash slots. Глобальный координатор лимитов имеет стабильный адрес и не перемещается при расширении кольца. Группы auth/read/write имеют независимые бюджеты. Слоты ограничивают одновременную работу, rate ограничивает частоту; lease освобождается при завершении и истекает после аварии. Недоступность limiter закрывает admission с ограниченной ошибкой. + +Topology изменяется через остановку admission и drain активных lease; после выдержки полного окна rate новое кольцо безопасно включается. Кэш прогревается по требованию: обязательные данные не перемещаются и не теряются. Это демонстрация шардирования, не высокая доступность: отказ единственного PostgreSQL или глобального координатора останавливает обязательный путь. + +## Go и зависимости + +Указатели на данные конфигурации, nullable значения и конкретные внутренние объекты инфраструктурного адаптера допустимы. Интерфейсы вводятся на границах поведения, прежде всего service/store/admission, а не для каждого поля. Все функции многострочные и документированы; HTTP-коды принадлежат transport. + + +## Результат аудита зависимостей + +Controller получает `service.Service`, `service.Authentication`, `admission.Distributed` и собственный интерфейс `Readiness`. Прямая зависимость от `*admission.Limiter` заменена. Business service получает `store.Interface`, `service.CursorCodec` и `service.ProfileCache`; authentication получает `service.Accounts` и `service.Passwords`. PostgreSQL/Valkey связываются только в `cmd/server`. + +Конкретные указатели `*fiber.App`, `*zap.Logger`, `*fielderr.Registry`, `*pgxpool.Pool`, `*redis.Client` остаются внутри соответствующих инфраструктурных адаптеров. Они не пересекают business service boundary. Nullable cursor и указатели на секции конфигурации являются представлением данных, интерфейсы им не требуются. + +Memory store и локальный limiter сохранены для независимых тестовых fixtures. Production Fx graph использует только PostgreSQL и Valkey. Публичная регистрация проходит через authentication и KDF. `UsersCreate` базового service остаётся операцией профильных fixtures; HTTP route не вызывает её напрямую. + +Основные SQL-запросы используют `pgx.StrictNamedArgs`; статические migration DDL не содержат значений пользователя и выполняются без параметров. Миграция embedded, не зависит от рабочего каталога контейнера. Все чтения rows закрываются и проверяют `rows.Err()`. + +Фактические проверки и эксплуатационные ограничения, включая process-local cursor key, приведены в [REPORT](REPORT.md). Указанные Go conventions проверяются formatter/lint и AST-тестом направления импортов; они не заменяют анализ ответственности компонентов. + +## Классификация ошибок + +PostgreSQL нормализует сетевые ошибки, разрыв соединения, deadline и SQLSTATE недоступности в `store.ErrUnavailable`, сохраняя исходную причину для `errors.Is`. `service.ErrUnavailable` — alias этой общей категории интерфейса хранилища; controller не импортирует драйвер или store. Это сохраняет классификацию и на пути проверки сессии, и в бизнес-операциях. HTTP-слой возвращает фиксированный 503/unavailable без деталей. Неизвестные ошибки SQL остаются 500; ограничения уникальности и отсутствие записи сохраняют прежнее отображение. + +## Развёртывание + +[Helm chart](charts/messenger) — единственный источник ресурсов стенда. Values задают образ, API-конфигурацию, ресурсы и число шардов. Изменение конфигурации меняет checksum pod template и вызывает rollout API. Namespace изолирует лабораторную; имена StatefulSet и PVC стабильны. Credentials создаются отдельно и передаются по именам Secret, без записи паролей в Helm values. + +Смена кольца выполняется командой `make reshard` через Helm upgrade с остановленным API и ожиданием 31 секунды. Runtime topology guard защищает от несовпадающих колец; chart дополнительно запрещает изменение topology при работающем API. Подробности и порядок переноса существующих ресурсов: [ADR-0002](docs/decisions/0002-helm.md). diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..5a479560 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM golang:1.26.1-alpine3.23 AS build +WORKDIR /src +COPY go.mod go.sum ./ +RUN go mod download +COPY cmd/ ./cmd/ +COPY internal/ ./internal/ +RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/server ./cmd/server + +FROM scratch AS runtime +COPY --from=build /out/server /server +USER 65532:65532 +ENV APP_HOST=0.0.0.0 APP_PORT=8080 GOMEMLIMIT=160MiB +EXPOSE 8080 +STOPSIGNAL SIGTERM +HEALTHCHECK --interval=5s --timeout=3s --start-period=3s --retries=3 CMD ["/server", "healthcheck"] +ENTRYPOINT ["/server"] diff --git a/Makefile b/Makefile index 5d86d171..cf02b534 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,10 @@ CA_FILE ?= ACTION_SCRIPT ?= TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",) -.PHONY: help check validate test load test-persistence test-failover +.PHONY: help check validate test load test-persistence help: - @echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes" + @echo "init/deploy/port-forward: Helm stand; chart-check: Helm lint; reshard SHARDS=2|3; test/test-persistence: API; coverage: Go; research: SQL; check/validate: contract" check: $(PYTHON) scripts/check_contract.py @@ -25,6 +25,59 @@ test-persistence: @test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable restart hook"; exit 2) $(PYTHON) tests/resilience.py --mode persistence --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS) -test-failover: - @test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2) - $(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS) +GO ?= go +.PHONY: build test-student coverage vet lint fmt research +build: + $(GO) build -trimpath -o bin/server ./cmd/server +test-student: + $(GO) test -race ./... +coverage: + GO="$(GO)" scripts/coverage.sh +vet: + $(GO) vet ./... +lint: + golangci-lint run ./... +fmt: + golangci-lint fmt +research: + scripts/research.sh + +REGISTRY ?= asisti.registry.twcstorage.ru +IMAGE := $(REGISTRY)/mtusi2026lab2 +IMAGE_TAG ?= dev-$(shell date -u +%Y%m%d%H%M%S) +PLATFORM ?= linux/amd64 +REGISTRY_USER ?= token +REGISTRY_TOKEN_FILE ?= $(HOME)/.secrets/twc-registry-token +KUBE_CONTEXT ?= dev +NAMESPACE ?= highload-applications +RELEASE ?= lab2 +CHART := charts/messenger +VALUES ?= $(CHART)/values.yaml +HELM_ARGS := --kube-context "$(KUBE_CONTEXT)" -n "$(NAMESPACE)" +export KUBE_CONTEXT NAMESPACE RELEASE REGISTRY REGISTRY_USER REGISTRY_TOKEN_FILE + +.PHONY: registry-login build-push init deploy chart-check reload port-forward ready reshard +registry-login: + docker login "$(REGISTRY)" --username "$(REGISTRY_USER)" --password-stdin < "$(REGISTRY_TOKEN_FILE)" +build-push: registry-login + docker buildx build --platform "$(PLATFORM)" --target runtime --tag "$(IMAGE):$(IMAGE_TAG)" --metadata-file evidence/image-build.json --push . +init: + scripts/init-secrets.sh +chart-check: + helm lint $(CHART) -f "$(VALUES)" + helm template "$(RELEASE)" $(CHART) -n "$(NAMESPACE)" -f "$(VALUES)" > /dev/null +deploy: + helm upgrade --install "$(RELEASE)" $(CHART) $(HELM_ARGS) --create-namespace -f "$(VALUES)" $(if $(IMAGE_DIGEST),--set-string image.digest=$(IMAGE_DIGEST),) --wait --timeout 180s +reload: + kubectl --context "$(KUBE_CONTEXT)" -n "$(NAMESPACE)" rollout restart deployment/api + kubectl --context "$(KUBE_CONTEXT)" -n "$(NAMESPACE)" rollout status deployment/api --timeout=180s +port-forward: + scripts/port-forward.sh +ready: + @for attempt in $$(seq 1 60); do curl --fail --silent --max-time 1 "$(BASE_URL)/health/ready" >/dev/null && exit 0; sleep 1; done; echo 'API readiness timeout' >&2; exit 1 +reshard: + SHARDS="$(SHARDS)" scripts/scale-shards.sh + +.PHONY: test-faults +test-faults: + scripts/test-faults.sh diff --git a/REPORT.md b/REPORT.md index c2679005..8dd58bcf 100644 --- a/REPORT.md +++ b/REPORT.md @@ -1,37 +1,3 @@ -# Отчёт — лабораторная 3 +# Базовое состояние -- Автор, группа: TODO -- Целевая оценка; выбранный трек 5, если нужен: TODO -- Commit/PR: TODO после публикации -- Использованные источники, библиотеки и помощь ИИ: TODO - -## Запуск из чистого clone - -TODO: версии runtime/образов, prerequisites, команды создания локальных secrets/.env, build, миграций, запуска, ожидания готовности, тестов и остановки. Указать необходимые действия оператора. Не вставлять секреты. Отдельно указать безопасную остановку и команду намеренного удаления учебных данных. - -## Архитектура и решения - -TODO: схема процессов/хранилищ, источник истины, транзакционные границы, ограничения. Что перенесено из lab2, что изменено в этой работе. Соответствие переменных из .env.example реальной конфигурации. - -## Доказательства критериев - -| Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства | -| --- | --- | --- | --- | -| Публичный smoke | make test | TODO | TODO | -| Остальные пункты уровня 3 | TODO | TODO | TODO | -| Все пункты уровня 4, если заявлен | TODO | TODO | TODO | -| Выбранный трек 5, если заявлен | TODO | TODO | TODO | - -TODO: добавить отдельную строку для каждого заявленного критерия. PASS без команды и наблюдения не является доказательством. Проверка инфраструктурного hook требует подтверждения, какие реальные процессы/хранилища перезапущены. - -## Эксперименты и отказы - -TODO: гипотеза, hardware/лимиты, версии, объём данных, профиль нагрузки, concurrency/arrival rate, длительность/прогрев, повторы, успешные RPS, ошибки, p50/p95/p99, CPU/RAM. Сохранить raw summary без tokens и объяснить ограничения измерения. - -| Воздействие | Что ожидаем | Что наблюдали | Время восстановления / потеря данных | -| --- | --- | --- | --- | -| TODO | TODO | TODO | TODO | - -## Ограничения и следующие шаги - -TODO: какие отказы выдерживаются и какие нет; что не реализовано; где учебное упрощение; какое улучшение подтверждено, а какое пока гипотеза. +Перенесена собственная реализация lab2 из коммита 8173f70. Контракт и публичные проверки lab3 сохранены. Требования lab3 на этом этапе ещё не реализованы. diff --git a/charts/messenger/Chart.yaml b/charts/messenger/Chart.yaml new file mode 100644 index 00000000..14ffef69 --- /dev/null +++ b/charts/messenger/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: messenger +description: Учебный мессенджер с PostgreSQL и шардированным Valkey +version: 0.1.0 +appVersion: lab2 +type: application diff --git a/charts/messenger/templates/_helpers.tpl b/charts/messenger/templates/_helpers.tpl new file mode 100644 index 00000000..2fcf3714 --- /dev/null +++ b/charts/messenger/templates/_helpers.tpl @@ -0,0 +1,7 @@ +{{- define "messenger.shards" -}} +{{- $nodes := list -}} +{{- range $i := until (int .Values.valkey.shards) -}} +{{- $nodes = append $nodes (printf "shard%d=valkey-%d.valkey:6379" $i $i) -}} +{{- end -}} +{{- join "," $nodes -}} +{{- end -}} diff --git a/charts/messenger/templates/api.yaml b/charts/messenger/templates/api.yaml new file mode 100644 index 00000000..594185b8 --- /dev/null +++ b/charts/messenger/templates/api.yaml @@ -0,0 +1,88 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: messenger-config + namespace: {{ .Release.Namespace }} +data: + APP_PORT: '8080' + VALKEY_COORDINATOR: shard0 + VALKEY_SHARDS: {{ include "messenger.shards" . | quote }} +{{- range $key, $value := .Values.api.env }} + {{ $key }}: {{ $value | quote }} +{{- end }} +--- +apiVersion: v1 +kind: Service +metadata: + name: api + namespace: {{ .Release.Namespace }} +spec: + selector: + app: api + ports: + - port: 8080 + targetPort: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: api + namespace: {{ .Release.Namespace }} +spec: + replicas: {{ .Values.api.replicas }} + selector: + matchLabels: + app: api + template: + metadata: + annotations: + checksum/config: {{ printf "%s%s" (include "messenger.shards" .) (toJson .Values.api.env) | sha256sum }} + labels: + app: api + spec: + imagePullSecrets: + - name: {{ .Values.imagePullSecret }} + terminationGracePeriodSeconds: 10 + securityContext: + runAsNonRoot: true + runAsUser: 65532 + seccompProfile: + type: RuntimeDefault + containers: + - name: api + image: "{{ .Values.image.repository }}@{{ .Values.image.digest }}" + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + envFrom: + - configMapRef: + name: messenger-config + env: + - name: DATABASE_URL + valueFrom: + secretKeyRef: + name: {{ .Values.databaseSecret }} + key: database-url + resources: + {{- toYaml .Values.api.resources | nindent 12 }} + startupProbe: + httpGet: + path: /health/ready + port: 8080 + periodSeconds: 2 + failureThreshold: 30 + readinessProbe: + httpGet: + path: /health/ready + port: 8080 + periodSeconds: 2 + livenessProbe: + httpGet: + path: /health/live + port: 8080 + periodSeconds: 5 + securityContext: + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + capabilities: + drop: [ALL] diff --git a/charts/messenger/templates/guard.yaml b/charts/messenger/templates/guard.yaml new file mode 100644 index 00000000..313b843e --- /dev/null +++ b/charts/messenger/templates/guard.yaml @@ -0,0 +1,7 @@ +{{- $live := lookup "v1" "ConfigMap" .Release.Namespace "messenger-config" -}} +{{- if and $live (ne (index $live.data "VALKEY_SHARDS") (include "messenger.shards" .)) -}} +{{- $api := lookup "apps/v1" "Deployment" .Release.Namespace "api" -}} +{{- if or (gt (int .Values.api.replicas) 0) (and $api (gt (int $api.spec.replicas) 0)) -}} +{{- fail "Changing shards requires drained API: use make reshard SHARDS=2 or SHARDS=3" -}} +{{- end -}} +{{- end -}} diff --git a/charts/messenger/templates/network-policy.yaml b/charts/messenger/templates/network-policy.yaml new file mode 100644 index 00000000..433486ac --- /dev/null +++ b/charts/messenger/templates/network-policy.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: private-databases + namespace: {{ .Release.Namespace }} +spec: + podSelector: + matchExpressions: + - key: app + operator: In + values: [postgres, valkey] + policyTypes: [Ingress] + ingress: + - from: + - podSelector: + matchLabels: + app: api + ports: + - protocol: TCP + port: 5432 + - protocol: TCP + port: 6379 diff --git a/charts/messenger/templates/postgres.yaml b/charts/messenger/templates/postgres.yaml new file mode 100644 index 00000000..8d8704a2 --- /dev/null +++ b/charts/messenger/templates/postgres.yaml @@ -0,0 +1,66 @@ +apiVersion: v1 +kind: Service +metadata: + name: postgres + namespace: {{ .Release.Namespace }} +spec: + selector: + app: postgres + ports: + - port: 5432 + targetPort: 5432 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: postgres + namespace: {{ .Release.Namespace }} +spec: + serviceName: postgres + replicas: 1 + selector: + matchLabels: + app: postgres + template: + metadata: + labels: + app: postgres + spec: + terminationGracePeriodSeconds: 30 + containers: + - name: postgres + image: {{ .Values.postgres.image | quote }} + ports: + - containerPort: 5432 + env: + - name: POSTGRES_DB + value: messenger + - name: POSTGRES_USER + value: messenger + - name: POSTGRES_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.databaseSecret }} + key: postgres-password + - name: PGDATA + value: /var/lib/postgresql/data/pgdata + resources: + {{- toYaml .Values.postgres.resources | nindent 12 }} + readinessProbe: + exec: + command: [pg_isready, -U, messenger, -d, messenger] + initialDelaySeconds: 3 + volumeMounts: + - name: data + mountPath: /var/lib/postgresql/data + volumeClaimTemplates: + - metadata: + name: data + spec: +{{- if .Values.storageClass }} + storageClassName: {{ .Values.storageClass | quote }} +{{- end }} + accessModes: [ReadWriteOnce] + resources: + requests: + storage: {{ .Values.postgres.storage }} diff --git a/charts/messenger/templates/valkey.yaml b/charts/messenger/templates/valkey.yaml new file mode 100644 index 00000000..5c996cc7 --- /dev/null +++ b/charts/messenger/templates/valkey.yaml @@ -0,0 +1,57 @@ +apiVersion: v1 +kind: Service +metadata: + name: valkey + namespace: {{ .Release.Namespace }} +spec: + clusterIP: None + selector: + app: valkey + ports: + - port: 6379 + targetPort: 6379 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: valkey + namespace: {{ .Release.Namespace }} +spec: + serviceName: valkey + replicas: {{ .Values.valkey.shards }} + podManagementPolicy: Parallel + selector: + matchLabels: + app: valkey + template: + metadata: + labels: + app: valkey + spec: + terminationGracePeriodSeconds: 30 + containers: + - name: valkey + image: {{ .Values.valkey.image | quote }} + args: [valkey-server, --appendonly, 'yes', --appendfsync, always, --maxmemory, {{ .Values.valkey.maxmemory | quote }}, --maxmemory-policy, noeviction] + ports: + - containerPort: 6379 + resources: + {{- toYaml .Values.valkey.resources | nindent 12 }} + readinessProbe: + exec: + command: [valkey-cli, ping] + initialDelaySeconds: 2 + volumeMounts: + - name: data + mountPath: /data + volumeClaimTemplates: + - metadata: + name: data + spec: +{{- if .Values.storageClass }} + storageClassName: {{ .Values.storageClass | quote }} +{{- end }} + accessModes: [ReadWriteOnce] + resources: + requests: + storage: {{ .Values.valkey.storage }} diff --git a/charts/messenger/values.schema.json b/charts/messenger/values.schema.json new file mode 100644 index 00000000..3640ffe9 --- /dev/null +++ b/charts/messenger/values.schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "valkey": {"type": "object", "properties": {"shards": {"type": "integer", "minimum": 2, "maximum": 3}}}, + "api": {"type": "object", "properties": {"replicas": {"type": "integer", "minimum": 0}}}, + "image": {"type": "object", "properties": {"digest": {"type": "string", "pattern": "^sha256:[a-f0-9]{64}$"}}} + } +} diff --git a/charts/messenger/values.yaml b/charts/messenger/values.yaml new file mode 100644 index 00000000..79800180 --- /dev/null +++ b/charts/messenger/values.yaml @@ -0,0 +1,34 @@ +# Ресурсы lab2 в общем namespace. Секреты создаются через make init. +image: + repository: asisti.registry.twcstorage.ru/mtusi2026lab2 + digest: sha256:3f19c9feb306a88044cc46b25d99592d48f04c21eba477d59676486277b2956c +imagePullSecret: registry-pull +databaseSecret: messenger-secrets +api: + replicas: 1 + resources: + requests: {cpu: 250m, memory: 128Mi} + limits: {cpu: '1', memory: 256Mi} + env: + SESSION_TTL_SECONDS: '3600' + DEPENDENCY_TIMEOUT_MS: '1000' + DEPENDENCY_POOL_SIZE: '8' + REQUEST_TIMEOUT_SECONDS: '3' + SHUTDOWN_TIMEOUT_SECONDS: '5' + GOMEMLIMIT: 160MiB +postgres: + image: postgres:17.6-alpine + storage: 2Gi + resources: + requests: {cpu: 250m, memory: 256Mi} + limits: {cpu: '1', memory: 512Mi} +valkey: + image: valkey/valkey:8.1.3-alpine + shards: 3 + storage: 1Gi + maxmemory: 64mb + resources: + requests: {cpu: 100m, memory: 96Mi} + limits: {cpu: 500m, memory: 128Mi} +# Пустое значение использует default StorageClass. Задать до первой установки. +storageClass: '' diff --git a/cmd/server/app.go b/cmd/server/app.go new file mode 100644 index 00000000..8555b539 --- /dev/null +++ b/cmd/server/app.go @@ -0,0 +1,97 @@ +package main + +import ( + "time" + + "go.uber.org/fx" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/admission" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/controller" + fiberctrl "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/controller/http/fiber" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/password" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service/production" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/postgres" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/valkey" +) + +const applicationStopTimeout = 9 * time.Second + +// CreateApp defines the dependency graph and Fx lifecycle for the lab2 server. +// Constructors do not open sockets; controller.RunControllerFx registers startup +// and shutdown hooks. The outer stop deadline bounds all component cleanup. +func CreateApp() fx.Option { + return fx.Options( + fx.StopTimeout(applicationStopTimeout), + fx.Supply(fx.Annotate(password.Hasher{}, fx.As(new(service.Passwords)))), + fx.Provide( + config.New, + config.NewPersistence, + newDatabase, + newValkey, + newAuthentication, + fx.Annotate(newReadiness, fx.As(new(fiberctrl.Readiness))), + httpConfig, + + loggerConfig, + newLogger, + fx.Annotate(newAdmissionLimiter, fx.As(new(admission.Distributed))), + fiberctrl.NewErrorRegistry, + fx.Annotate(databaseStore, fx.As(new(store.Interface))), + fx.Annotate(databaseAccounts, fx.As(new(service.Accounts))), + fx.Annotate(profileCache, fx.As(new(service.ProfileCache))), + fx.Annotate(cursor.New, fx.As(new(service.CursorCodec))), + fx.Annotate(production.NewCached, fx.As(new(service.Service))), + fx.Annotate(fiberctrl.New, fx.As(new(controller.Controller))), + ), + fx.WithLogger(newFxLogger), + fx.Invoke(controller.RunControllerFx), + ) +} + +// httpConfig provides the HTTP configuration section to Fx. +func httpConfig(cfg *config.Config) *config.Controller { + return cfg.HTTP +} + +// loggerConfig provides the logging configuration section to Fx. +func loggerConfig(cfg *config.Config) *config.Logger { + return cfg.Logger +} + +// newAdmissionLimiter translates configured bounds into separate shared policy budgets. +func newAdmissionLimiter(cfg *config.Controller, client *valkey.Client) (*valkey.Limiter, error) { + global := valkey.Budget{Rate: cfg.Admission.RequestsPerSecond, Slots: cfg.Admission.MaxInFlight} + return valkey.NewLimiter(client, valkey.Limits{ + Global: global, + Groups: map[string]valkey.Budget{ + "auth": {Rate: cfg.Admission.AuthRate, Slots: cfg.Admission.AuthSlots}, + "read": global, + "write": global, + }, + User: valkey.Budget{Rate: cfg.Admission.UserRate, Slots: cfg.Admission.UserSlots}, + UserGroups: map[string]valkey.Budget{ + "auth": {Rate: cfg.Admission.UserAuthRate, Slots: cfg.Admission.UserAuthSlots}, + "read": {Rate: cfg.Admission.UserRate, Slots: cfg.Admission.UserSlots}, + "write": {Rate: cfg.Admission.UserWriteRate, Slots: cfg.Admission.UserWriteSlots}, + }, + }) +} + +// databaseStore exposes business persistence through its consumer interface. +func databaseStore(database *postgres.Store) store.Interface { + return database +} + +// databaseAccounts exposes account and session persistence through its consumer interface. +func databaseAccounts(database *postgres.Store) service.Accounts { + return database +} + +// profileCache exposes immutable profiles without leaking the Valkey client. +func profileCache(client *valkey.Client) service.ProfileCache { + return client +} diff --git a/cmd/server/app_test.go b/cmd/server/app_test.go new file mode 100644 index 00000000..ac283300 --- /dev/null +++ b/cmd/server/app_test.go @@ -0,0 +1,104 @@ +package main + +import ( + "context" + "net" + "os" + "testing" + "time" + + "go.uber.org/fx" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" +) + +// TestDependencyGraph ensures constructor signatures and interface bindings agree. +func TestDependencyGraph(t *testing.T) { + if err := fx.ValidateApp(CreateApp(), fx.NopLogger); err != nil { + t.Fatal(err) + } +} + +// TestInvalidConfigurationStopsStartup checks failure before a listener is acquired. +func TestInvalidConfigurationStopsStartup(t *testing.T) { + t.Setenv("APP_PORT", "0") + app := fx.New(CreateApp(), fx.NopLogger) + if err := app.Start(context.Background()); err == nil { + t.Fatal("invalid listener configuration accepted") + } +} + +// TestCommandValidation ensures unsupported arguments cannot accidentally start a server. +func TestCommandValidation(t *testing.T) { + if err := run([]string{"unknown"}); err == nil { + t.Fatal("unknown command accepted") + } +} + +// TestLoggerConfiguration checks that process logging uses its own validated section. +func TestLoggerConfiguration(t *testing.T) { + if _, err := newLogger(&config.Logger{Level: "invalid"}); err == nil { + t.Fatal("invalid logger configuration accepted") + } +} + +// TestApplicationLifecycle starts the complete Fx graph and drains its real HTTP listener. +func TestApplicationLifecycle(t *testing.T) { + requirePersistence(t) + listener, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatal(err) + } + cfg := config.Default() + cfg.HTTP.Host = "127.0.0.1" + cfg.HTTP.Port = listener.Addr().(*net.TCPAddr).Port + cfg.Logger.Level = "error" + if err := listener.Close(); err != nil { + t.Fatal(err) + } + app := fx.New(CreateApp(), fx.Replace(cfg)) + ctx, cancel := context.WithTimeout(t.Context(), 5*time.Second) + defer cancel() + if err := app.Start(ctx); err != nil { + t.Fatal(err) + } + t.Cleanup(func() { + stopCtx, stopCancel := context.WithTimeout(context.Background(), 5*time.Second) + defer stopCancel() + if err := app.Stop(stopCtx); err != nil { + t.Error(err) + } + }) + if err := checkReadiness(cfg.HTTP); err != nil { + t.Fatal(err) + } +} + +// TestOccupiedListenerFailsStartup ensures bind failures propagate through the Fx lifecycle. +func TestOccupiedListenerFailsStartup(t *testing.T) { + requirePersistence(t) + listener, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatal(err) + } + defer func() { + _ = listener.Close() + }() + cfg := config.Default() + cfg.HTTP.Host = "127.0.0.1" + cfg.HTTP.Port = listener.Addr().(*net.TCPAddr).Port + cfg.Logger.Level = "error" + app := fx.New(CreateApp(), fx.Replace(cfg), fx.NopLogger) + if err := app.Start(t.Context()); err == nil { + _ = app.Stop(t.Context()) + t.Fatal("startup succeeded on an occupied listener") + } +} + +// requirePersistence prevents infrastructure scenarios from silently passing on configuration failure. +func requirePersistence(t *testing.T) { + t.Helper() + if os.Getenv("DATABASE_URL") == "" || os.Getenv("VALKEY_SHARDS") == "" { + t.Skip("DATABASE_URL and VALKEY_SHARDS are required for real application lifecycle tests") + } +} diff --git a/cmd/server/commands.go b/cmd/server/commands.go new file mode 100644 index 00000000..cdce9527 --- /dev/null +++ b/cmd/server/commands.go @@ -0,0 +1,19 @@ +package main + +import ( + "fmt" + + "go.uber.org/fx" +) + +// run dispatches the server command or the container healthcheck. +func run(args []string) error { + if len(args) == 0 { + fx.New(CreateApp()).Run() + return nil + } + if len(args) == 1 && args[0] == "healthcheck" { + return healthcheck() + } + return fmt.Errorf("usage: server [healthcheck]") +} diff --git a/cmd/server/healthcheck.go b/cmd/server/healthcheck.go new file mode 100644 index 00000000..a0cbf386 --- /dev/null +++ b/cmd/server/healthcheck.go @@ -0,0 +1,46 @@ +package main + +import ( + "fmt" + "net" + "net/http" + "strconv" + "time" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" +) + +const readinessProbeTimeout = 2 * time.Second + +// healthcheck loads configuration and runs the container readiness probe. +func healthcheck() error { + cfg, err := config.New() + if err != nil { + return err + } + return checkReadiness(cfg.HTTP) +} + +// checkReadiness checks the local readiness endpoint within the probe timeout. +func checkReadiness(cfg *config.Controller) error { + host := cfg.Host + if host == "0.0.0.0" { + host = "127.0.0.1" + } + if host == "::" { + host = "::1" + } + address := "http://" + net.JoinHostPort(host, strconv.Itoa(cfg.Port)) + "/health/ready" + client := http.Client{Timeout: readinessProbeTimeout} + response, err := client.Get(address) + if err != nil { + return fmt.Errorf("readiness probe: %w", err) + } + defer func() { + _ = response.Body.Close() + }() + if response.StatusCode != http.StatusOK { + return fmt.Errorf("not ready: %d", response.StatusCode) + } + return nil +} diff --git a/cmd/server/healthcheck_test.go b/cmd/server/healthcheck_test.go new file mode 100644 index 00000000..af07c237 --- /dev/null +++ b/cmd/server/healthcheck_test.go @@ -0,0 +1,111 @@ +package main + +import ( + "errors" + "net" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" +) + +// TestRun_Healthcheck verifies command routing to the readiness endpoint. +func TestRun_Healthcheck(t *testing.T) { + // Arrange. + requests := make(chan string, 1) + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + requests <- r.Method + " " + r.URL.Path + w.WriteHeader(http.StatusOK) + })) + t.Cleanup(server.Close) + address := server.Listener.Addr().(*net.TCPAddr) + t.Setenv("APP_HOST", "0.0.0.0") + t.Setenv("APP_PORT", strconv.Itoa(address.Port)) + + // Act. + err := run([]string{"healthcheck"}) + + // Assert. + if err != nil { + t.Fatal(err) + } + select { + case got := <-requests: + if got != "GET /health/ready" { + t.Fatalf("probe=%q", got) + } + default: + t.Fatal("command returned success without probing readiness") + } +} + +// TestHealthcheck_InvalidConfig rejects invalid startup settings before attempting HTTP. +func TestHealthcheck_InvalidConfig(t *testing.T) { + // Arrange. + t.Setenv("APP_PORT", "invalid") + + // Act. + err := healthcheck() + + // Assert. + if err == nil { + t.Fatal("invalid port accepted") + } +} + +// TestCheckReadiness distinguishes unhealthy responses from connection failures. +func TestCheckReadiness(t *testing.T) { + t.Run("Negative: unhealthy response", func(t *testing.T) { + // Arrange. + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { + w.WriteHeader(http.StatusServiceUnavailable) + })) + t.Cleanup(server.Close) + address := server.Listener.Addr().(*net.TCPAddr) + cfg := config.Default().HTTP + cfg.Host = "127.0.0.1" + cfg.Port = address.Port + + // Act. + err := checkReadiness(cfg) + + // Assert. + if err == nil { + t.Fatalf("probe accepted %s", "Negative: unhealthy response") + } + if err.Error() != "not ready: 503" { + t.Fatalf("unexpected health failure: %v", err) + } + + }) + + t.Run("Negative: server unavailable", func(t *testing.T) { + // Arrange. + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { + w.WriteHeader(http.StatusServiceUnavailable) + })) + t.Cleanup(server.Close) + address := server.Listener.Addr().(*net.TCPAddr) + cfg := config.Default().HTTP + cfg.Host = "127.0.0.1" + cfg.Port = address.Port + + server.Close() + + // Act. + err := checkReadiness(cfg) + + // Assert. + if err == nil { + t.Fatalf("probe accepted %s", "Negative: server unavailable") + } + + if _, ok := errors.AsType[*url.Error](err); !ok { + t.Fatalf("connection failure was not preserved: %v", err) + } + + }) +} diff --git a/cmd/server/logger.go b/cmd/server/logger.go new file mode 100644 index 00000000..3aab61bb --- /dev/null +++ b/cmd/server/logger.go @@ -0,0 +1,29 @@ +package main + +import ( + "go.uber.org/fx/fxevent" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" +) + +// newLogger creates a structured logger with the configured severity threshold. +func newLogger(cfg *config.Logger) (*zap.Logger, error) { + if err := cfg.Validate(); err != nil { + return nil, err + } + level, err := zapcore.ParseLevel(cfg.Level) + if err != nil { + return nil, err + } + settings := zap.NewProductionConfig() + settings.Level = zap.NewAtomicLevelAt(level) + settings.DisableStacktrace = true + return settings.Build() +} + +// newFxLogger adapts the application logger for Fx lifecycle events. +func newFxLogger(log *zap.Logger) fxevent.Logger { + return &fxevent.ZapLogger{Logger: log.Named("fx")} +} diff --git a/cmd/server/main.go b/cmd/server/main.go new file mode 100644 index 00000000..1d1fbd58 --- /dev/null +++ b/cmd/server/main.go @@ -0,0 +1,15 @@ +// Command server runs the messenger or its container readiness probe. +package main + +import ( + "fmt" + "os" +) + +// main runs the selected command and reports failures to stderr. +func main() { + if err := run(os.Args[1:]); err != nil { + _, _ = fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} diff --git a/cmd/server/persistence.go b/cmd/server/persistence.go new file mode 100644 index 00000000..5cf5674b --- /dev/null +++ b/cmd/server/persistence.go @@ -0,0 +1,77 @@ +package main + +import ( + "context" + "time" + + "go.uber.org/fx" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service/authentication" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/postgres" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/valkey" +) + +type dependencyReadiness struct { + database *postgres.Store + cache *valkey.Client +} + +// Ping checks persistence and all limiter shards under a shared deadline. +func (d *dependencyReadiness) Ping(ctx context.Context) error { + if err := d.database.Ping(ctx); err != nil { + return err + } + return d.cache.Ping(ctx) +} + +// newDatabase creates the pool and registers its migration/start and shutdown hooks. +func newDatabase(lifecycle fx.Lifecycle, cfg *config.Persistence) (*postgres.Store, error) { + database, err := postgres.New(postgres.Options{ + URL: cfg.DatabaseURL, + MaxConnections: int32(cfg.PoolSize), + Timeout: time.Duration(cfg.TimeoutMilliseconds) * time.Millisecond, + }) + if err != nil { + return nil, err + } + lifecycle.Append(fx.Hook{ + OnStart: database.Start, + OnStop: func(context.Context) error { + database.Close() + return nil + }, + }) + return database, nil +} + +// newValkey creates bounded clients and registers connectivity and cleanup hooks. +func newValkey(lifecycle fx.Lifecycle, cfg *config.Persistence) (*valkey.Client, error) { + client, err := valkey.New(valkey.Options{ + Nodes: cfg.Shards, + Coordinator: cfg.Coordinator, + PoolSize: cfg.PoolSize, + Timeout: time.Duration(cfg.TimeoutMilliseconds) * time.Millisecond, + }) + if err != nil { + return nil, err + } + lifecycle.Append(fx.Hook{ + OnStart: client.Ping, + OnStop: func(context.Context) error { + return client.Close() + }, + }) + return client, nil +} + +// newAuthentication binds credentials and KDF implementations to authentication policy. +func newAuthentication(accounts service.Accounts, passwords service.Passwords, cfg *config.Persistence) (service.Authentication, error) { + return authentication.New(accounts, passwords, time.Duration(cfg.SessionTTLSeconds)*time.Second) +} + +// newReadiness assembles infrastructure checks at the composition boundary. +func newReadiness(database *postgres.Store, cache *valkey.Client) *dependencyReadiness { + return &dependencyReadiness{database: database, cache: cache} +} diff --git a/cmd/server/persistence_test.go b/cmd/server/persistence_test.go new file mode 100644 index 00000000..efe9660b --- /dev/null +++ b/cmd/server/persistence_test.go @@ -0,0 +1,48 @@ +package main + +import ( + "testing" + "time" + + "go.uber.org/fx" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/postgres" +) + +// TestDatabaseProviderRejectsInvalidConfiguration verifies dependency errors propagate before startup. +func TestDatabaseProviderRejectsInvalidConfiguration(t *testing.T) { + var lifecycle fx.Lifecycle + app := fx.New(fx.NopLogger, fx.Populate(&lifecycle)) + if err := app.Err(); err != nil { + t.Fatal(err) + } + if _, err := newDatabase(lifecycle, &config.Persistence{}); err == nil { + t.Fatal("invalid database settings accepted") + } +} + +// TestValkeyProviderRejectsInvalidConfiguration verifies the cache constructor is a real boundary. +func TestValkeyProviderRejectsInvalidConfiguration(t *testing.T) { + var lifecycle fx.Lifecycle + app := fx.New(fx.NopLogger, fx.Populate(&lifecycle)) + if err := app.Err(); err != nil { + t.Fatal(err) + } + if _, err := newValkey(lifecycle, &config.Persistence{}); err == nil { + t.Fatal("invalid cache settings accepted") + } +} + +// TestReadinessStopsAtUnavailableDatabase checks that mandatory persistence failure is visible. +func TestReadinessStopsAtUnavailableDatabase(t *testing.T) { + database, err := postgres.New(postgres.Options{URL: "postgres://localhost/test", MaxConnections: 1, Timeout: time.Second}) + if err != nil { + t.Fatal(err) + } + database.Close() + readiness := newReadiness(database, nil) + if err := readiness.Ping(t.Context()); err == nil { + t.Fatal("closed database reported ready") + } +} diff --git a/docs/DEFENSE.md b/docs/DEFENSE.md new file mode 100644 index 00000000..97c16cc1 --- /dev/null +++ b/docs/DEFENSE.md @@ -0,0 +1,89 @@ +# План защиты лабораторной 2 — 9 минут 30 секунд + +Резерв до лимита 10 минут — 30 секунд. Рабочий каталог — корень репозитория lab2. Демонстрация относится к PostgreSQL, сессиям, Valkey и SQL-исследованию; HPA и балансировка lab3 сюда не входят. + +## Подготовить до защиты + +- Открыть REPORT.md, ARCHITECTURE.md, этот план и два терминала. +- Выполнить `make chart-check`, `make test-faults`; сборка Docker и остановки зависимостей не должны съедать время защиты. +- Открыть сохранённые `evidence/fault-regression.txt`, `evidence/sql-research-domain.json`, `evidence/sql-research-helm.txt`. Это реальные предыдущие измерения с датами, а не результаты сегодняшнего стенда. +- В первом терминале запустить `make port-forward` (localhost:8080); во втором — `make ready` и `make test`. +- Если 8080 занят, использовать `LOCAL_PORT=18082 make port-forward`, а в проверках `BASE_URL=http://localhost:18082`. +- Для воспроизведения SQL-исследования заранее выполнить `make research`: отдельный временный Docker PostgreSQL, не база dev. На защите показывать готовые планы и результаты. + +## 0:00–0:45 — задача и результат + +«Перенесён мессенджер из памяти в PostgreSQL. Подтверждённые сообщения и сессии переживают рестарт. Valkey используется для кэша профилей и распределённых ограничений. Цель — уровни 3 и 4 и трек “План запроса и восстановление”.» + +```sh +helm list --kube-context dev -n highload-applications +kubectl --context dev -n highload-applications get pods -l 'app in (api,postgres,valkey)' +``` + +Показать API, PostgreSQL, три Valkey. Kubernetes — выбранный способ развёртывания; формальное принятие замены Compose/Swarm преподавателем учитывается отдельно. + +## 0:45–1:45 — архитектура и авторизация + +Показать ARCHITECTURE.md и коротко объяснить: + +- Fiber controller принимает HTTP; service проверяет правила и доступ; store выполняет SQL. Реализации связываются через Fx, между слоями — интерфейсы. +- Пароль хранится как Argon2id hash. Basic применяется при входе, затем используется случайный opaque Bearer token. +- В PostgreSQL хранится digest токена и абсолютный срок действия. Сессия проверяется в источнике истины на каждом запросе, поэтому logout действует сразу. +- Valkey кэширует профиль, но не подменяет проверку сессии. Отказ зависимости не открывает анонимный доступ. + +## 1:45–3:00 — работа API + +```sh +make test +``` + +Пояснить, что публичный smoke проверяет цепочку регистрации, входа, чатов и сообщений, авторизацию и пагинацию. Не выводить реальные токены. Пока работает тест, показать schema/migration и ограничения FK/unique. + +## 3:00–4:30 — сохранность после рестарта + +```sh +make test-persistence ACTION_SCRIPT=scripts/restart.sh +``` + +«Тест создаёт сообщение и сессию, перезапускает API, PostgreSQL и Valkey через явно заданный hook. PVC не удаляются. Затем прежний токен читает прежнее подтверждённое сообщение без нового логина.» + +Дождаться PASS. Если инфраструктура задерживает рестарт, не выдавать сохранённый лог за текущий PASS: показать прошлый результат с его датой и продолжить по плану. + +## 4:30–5:45 — реальные отказы зависимостей + +```sh +rg 'PASS:' evidence/fault-regression.txt +``` + +«Команда воспроизведения — make test-faults. Отдельные Docker-контейнеры PostgreSQL и Valkey по очереди останавливаются и замораживаются. Во всех четырёх сценариях запрос истории с действующим токеном получает 503 unavailable. Проверяются readiness=503, liveness=200, отсутствие доступа без токена и по поддельной идентичности, затем восстановление с прежней сессией.» + +Уточнить исправление ревью: сетевые ошибки PostgreSQL классифицируются в store; неизвестная SQL-ошибка остаётся безопасным 500. В измеренном прогоне отказ отвечал за 0.002–0.508 с при timeout зависимости 500 мс. На dev для демонстрации ничего дополнительно останавливать не требуется. + +## 5:45–7:45 — исследовательский трек на 5 + +Гипотеза: индекс `(chat_id, created_at, id)` ускоряет позднюю страницу истории, поскольку соответствует фильтру, курсору и порядку сортировки. + +```sh +jq '[.variants[] | {name, read_ms:[.select_plans[][0]["Execution Time"]]}]' evidence/sql-research-domain.json +rg 'PASS: restore' evidence/sql-research-helm.txt +``` + +Объяснить метод: 100 000 синтетических сообщений, распределение 90/9/1% по чатам; сравнение индекса по chat_id с составным индексом; три повтора чтения и вставки 1000 строк с rollback; EXPLAIN ANALYZE BUFFERS. + +Результат исторического прогона 2026-10-07: чтение 7.646–8.604 мс против 0.055–0.136 мс. Показать в плане исчезновение лишней сортировки и уменьшение объёма обработки. Это эффект конкретного запроса и набора данных, не обещание такого ускорения всего API. По вставке диапазоны перекрываются: измеренного устойчивого штрафа не доказано. + +Backup/restore: логический dump восстановлен в новую БД, совпали 100 000 строк и checksum; приведены выборочные записи. Это не HA и не PITR. + +## 7:45–8:45 — дополнительные лимиты и шарды + +«В Valkey Lua атомарно проверяет rate и слоты одновременных запросов. Есть глобальный бюджет, группы auth/read/write и бюджет пользователя. 429 — превышение частоты, 503 — занятые слоты или недоступность обязательного backend.» + +«Пользовательские ключи распределяются consistent hashing с виртуальными узлами. Это три самостоятельных Valkey и клиентская маршрутизация, не Redis Cluster. Глобальные лимиты согласуются на shard0. Изменение кольца выполняется через остановку и drain API; глобальная координация остаётся точкой отказа.» + +Не запускать reshard в десятиминутной защите: команда намеренно ждёт истечения lease и вызывает простой. Показать `make reshard SHARDS=2` как документированный способ, а измерения — в REPORT. + +## 8:45–9:30 — проверки и ограничения + +Показать `evidence/fault-coverage-per-file.json`: каждый из 57 исполняемых Go-файлов имеет ≥90% statements. Упомянуть race, реальные PostgreSQL/Valkey integration, lint/vet и отдельный fault-сценарий в CI; запуск удалённого runner не подтверждён локальными проверками. + +Ограничения: PostgreSQL и координатор Valkey не реплицированы; hostpath PVC зависят от узла; cursor key lab2 локален процессу, старый cursor после рестарта может стать недействительным; исторические измерения отделены от свежих проверок. Оценку определяет преподаватель. diff --git a/docs/PLAN.md b/docs/PLAN.md new file mode 100644 index 00000000..ba717cdd --- /dev/null +++ b/docs/PLAN.md @@ -0,0 +1,23 @@ +# План лабораторной 2 + +| Задача | Требования | Результат и проверка | Статус | +| --- | --- | --- | --- | +| L2-T01 | L2-REQ-01,08 | Выборочный перенос, новая аутентификация; [smoke](../evidence/smoke.txt) | Выполнено локально | +| L2-T02 | L2-REQ-01,04,05 | PostgreSQL, миграции, rollback, гонки, keyset; [race/integration](../evidence/go-tests-coverage.txt) | Выполнено | +| L2-T03 | L2-REQ-02,03 | Argon2id, сессии, TTL/отзыв, профильный кэш; [fault tests](../evidence/dependencies.json) | Выполнено локально | +| L2-T04 | L2-REQ-06,07 | Группы и user/global budgets, Lua/lease, consistent hashing; unit/integration; [ring](../evidence/hashring.txt) | Выполнено; [расширение 2→3](../evidence/k8s-scale-shards.txt) и smoke прошли | +| L2-T05 | L2-REQ-09 | Helm install/upgrade/restart/reshard, PVC, локальный Docker [persistence](../evidence/persistence.txt) | Выполнено в dev / highload-applications; [smoke/persistence](../evidence/k8s-persistence-three-shards.txt); принятие преподавателем учитывается отдельно | +| L2-T06 | L2-REQ-05,10 | 100 000 сообщений, планы/вставки, backup/restore; [raw results](../evidence/sql-research-domain.json) | Выполнено локально | +| L2-T07 | L2-REQ-08 | DIP-аудит, fmt/lint/vet/race; [порог каждого файла](../evidence/coverage-per-file.json); CI workflow | Локально выполнено; удалённый CI не запускался | +| L2-T09 | L2-REQ-11 | Registry build/push, digest deployment, namespaced pull-secret | Выполнено; [build metadata](../evidence/image-build.json) | +| L2-T08 | Все | [REPORT](../REPORT.md), evidence и инструкция Helm | Выполнено; [итоговый Kubernetes snapshot](../evidence/k8s-deployment.json) | +| L2-T10 | L2-REQ-09,11,12 | Helm chart, values, adoption без потери данных, upgrade, reshard 3→2→3; [проверка](../evidence/helm-deployment.txt) | Выполнено в dev | +| L2-T11 | L2-REQ-08,10,12 | [Покрытие shell/awk](../evidence/helm-coverage-per-file.json), [SQL-эксперимент](../evidence/sql-research-helm.txt), сокращённый REPORT; собственные Python-скрипты удалены | Выполнено | + +Обязательные contracts и публичные tests сохранены. Lab1 и соседние реализации не изменялись. Контейнерный образ опубликован; решение находится в main и PR №52 (Агапов Владислав, БПИ2303). Результат защиты не зафиксирован. Код, локальные измерения, кластерная проверка и принятие работы учитываются отдельно. + +| Задача | Требования | Результат и проверка | Статус | +| --- | --- | --- | --- | +| L2-T12 | L2-REQ-13 | Перенесены 182 файла; module/imports обновлены; build, vet, race, lint, chart-check и неизменность публичных материалов проверены; [результаты](../evidence/gitea-transfer-tests.txt) | Перенос проверен; main опубликован, PR №52 открыт; без redeploy | +| L2-T13 | L2-REQ-03,04 | Классификация PostgreSQL, unit-регрессии, make test-faults: stop/pause обоих backend, запрет анонимного доступа, recovery; evidence/fault-regression.txt; race/coverage ≥90% по каждому файлу | Выполнено локально | +| L2-T14 | L2-REQ-09,11 | Переустановка lab2 в dev из Timeweb; PVC и данные сохранены, smoke/persistence PASS; docs/DEFENSE.md | Выполнено; evidence/timeweb-* | diff --git a/docs/SPEC.md b/docs/SPEC.md new file mode 100644 index 00000000..fb502d49 --- /dev/null +++ b/docs/SPEC.md @@ -0,0 +1,48 @@ +# Спецификация лабораторной 2 + +Версия 4, локальная реализация и развёртывание в Kubernetes dev проверены. Цель: весь уровень 3 и 4, один исследовательский трек уровня 5; дополнительно распределённый admission и демонстрация шардирования. + +Нормативные источники: [задание](../README.md), [курс](../COURSE.md), [контракт](../contracts/README.md), [OpenAPI](../contracts/openapi.json), [правила сдачи](../CONTRIBUTING.md). Обязательные контракты и публичные проверки сохраняются. + +| ID | Требование | Критерий приёмки | +| --- | --- | --- | +| L2-REQ-01 | Перенести бизнес-возможности lab1, хранить пользователей, чаты, участников и сообщения в PostgreSQL | Публичный smoke; уникальность username; FK; атомарное создание чата; миграции с нуля и повторно | +| L2-REQ-02 | Пароль 12–128 Unicode code points, библиотечный KDF; Basic только при входе; случайная opaque Bearer-сессия | Неверный пароль, UTF-8, expiry, logout, игнорирование X-User-Id, WWW-Authenticate | +| L2-REQ-03 | PostgreSQL — источник истины для сессий; Redis/Valkey — осмысленный кэш | Сохранность после полного рестарта; TTL не продлевается; отзыв виден сразу; отказ кэша не предоставляет доступ | +| L2-REQ-04 | Ограниченные pool и timeout; ошибки зависимостей не раскрывают секреты | Изолированные проверки отказа PostgreSQL и Valkey; readiness | +| L2-REQ-05 | Keyset pagination, индекс истории, read-after-write | EXPLAIN ANALYZE BUFFERS на ≥10 000 сообщений; отсутствие повторов неизменной истории | +| L2-REQ-06 | Redis/Valkey admission: глобальные и пользовательские лимиты, группы auth/read/write | Конкурентные запросы не превышают лимит; освобождение lease и TTL при аварии; отказ хранилища закрывает admission | +| L2-REQ-07 | 2–3 шарда и клиентское consistent hashing | При добавлении третьего узла перемещается только часть ключей; сохранение лимитов при смене topology; явное описание SPOF | +| L2-REQ-08 | Проверить DIP и соглашения Go | Controller→service interface; service→store/client interfaces; gofmt, vet, lint, race; ≥90% statements в каждом исполняемом Go-файле, порог CI | +| L2-REQ-09 | Воспроизводимый стенд и restart hook | Bootstrap из отдельного clone, сохранённые volumes, публичный persistence | +| L2-REQ-10 | Полный исследовательский трек | Трек 2: ≥100 000 сообщений, ≥2 варианта запросов/индексов, стоимость записи, backup/restore и сверка; проверен в изолированном PostgreSQL | + +## Инварианты + +Авторизация остаётся в service. Store получает проверенные UUID и обеспечивает транзакции и ограничения. Сессии хранят hash токена; парольный hash никогда не попадает в HTTP User. Кэш не является основанием обойти проверку действительности сессии. Чужой чат возвращает 404. История читается из PostgreSQL для read-after-write. + +Глобальный лимит требует общего координатора: распределение пользовательских ключей по шардам само по себе не даёт атомарного общего лимита. Изменение topology выполняется управляемо; нельзя потерять активные счётчики и предоставить новый burst. + +## Открытые вопросы + +- Основной реализованный стенд — Kubernetes dev; формальное принятие преподавателем отдельно не подтверждено. Второй путь оркестрации не реализуется. +- Исследовательский трек 2 реализован; результаты и ограничения приведены в REPORT. +- Git-публикация и принятие преподавателем не выполнены; commit/push/PR не выполняются без поручения. + +## Развёртывание в dev + +L2-REQ-11: использовать существующий Yandex Container Registry `cr.yandex/crpv8disueqk68pv29jg`, отдельный image `mtusi2026lab2`, контекст `dev` и namespace `highload-applications`. Локальный service-account key читается из `~/key.json`, не копируется в Git и не выводится. Deployment закрепляется по опубликованному digest из build metadata; tag обозначает время сборки. Проверки: pull, rollout, smoke, полный persistence, расширение 2→3 shard и повторный smoke. Применение в dev разрешено; принятие Kubernetes преподавателем учитывается отдельно. + +## Упрощение стенда + +L2-REQ-12: единственный источник Kubernetes-ресурсов — Helm chart. Values задают образ, ресурсы и 2–3 шарда; одна лабораторная размещается в одном namespace. Повторный upgrade сохраняет PVC, секреты и данные. Изменение кольца требует остановки API и истечения lease. Python остаётся только в публичных проверках задания; собственная обвязка заменяется стандартными Helm/Docker/kubectl, shell, SQL и awk. REPORT содержит однозначные команды запуска, фактические проверки и ограничения. Приёмка: helm lint/template, adoption текущего стенда без замены PVC, повторный upgrade, smoke/persistence, проверка новых команд покрытия и SQL-эксперимента. + +## Перенос в Gitea + +L2-REQ-13: решение размещается в репозитории `ssh://git@gitea.privcloud.tech:2222/vlad_marlo/mtusi2026lab2.git`. Имя Go-модуля и внутренние imports соответствуют новому хосту. Задание, contracts и публичные tests нового репозитория сохраняются. Секреты, runtime-данные и история исходного `.git` не переносятся. Проверки: сборка, unit/race, vet, chart lint и неизменность публичных материалов. Измерения от 2026-10-07 остаются историческими и не подменяют проверки переноса. + +## Классификация отказов зависимостей + +Уточнение L2-REQ-04: потеря соединения, timeout и недоступность PostgreSQL возвращают HTTP 503 / `unavailable`, включая проверку действительной сессии. Ошибки SQL/неизвестные ошибки сохраняют безопасный 500. Воспроизводимый `make test-faults` создаёт изолированные Docker-зависимости, останавливает PostgreSQL и Valkey по очереди, проверяет историю с прежним токеном, отсутствие анонимного доступа, readiness/liveness и восстановление. Пользовательский кластер и данные не затрагиваются. + +Уточнение L2-REQ-11 от 2026-10-16: основной registry — `asisti.registry.twcstorage.ru`, локальный токен — `~/.secrets/twc-registry-token`. Helm использует `registry-pull` и опубликованный digest исправления 87e1e5d. Переустановка lab2 в dev сохраняет существующие PVC и Secret БД; соседние releases не изменяются. diff --git a/docs/decisions/0001-postgres-sessions-shards.md b/docs/decisions/0001-postgres-sessions-shards.md new file mode 100644 index 00000000..e982b512 --- /dev/null +++ b/docs/decisions/0001-postgres-sessions-shards.md @@ -0,0 +1,33 @@ +# ADR-0001: PostgreSQL, сессии и шардированный Valkey + +Статус: реализовано, проверено локально и развёрнуто в Kubernetes dev / highload-applications. + +## Контекст + +[Задание](../../README.md) требует устойчивого состояния и аутентификации. Дополнительные требования: общий limiter с группами, пользовательские лимиты и демонстрация consistent hashing на 2–3 шардах. + +## Решение + +PostgreSQL хранит пользователей, credentials, чаты, участников, сообщения и hash сессионного токена с абсолютным expiry. Пароли обрабатывает библиотечный Argon2id: 19 MiB, 2 прохода, один поток, salt 16 bytes, hash 32 bytes. Bearer содержит 32 случайных bytes; хранится только SHA-256 digest. Сессия проверяется по PostgreSQL на каждом запросе. Logout удаляет запись до ответа 204. + +Valkey кэширует неизменяемые профили с TTL 5 минут. Кэш не хранит историю и не определяет действительность сессии. Cache miss, повреждённая запись и ошибка чтения профиля ведут к PostgreSQL. Поскольку Valkey одновременно обслуживает обязательный limiter, отказ его узла закрывает admission; обход кэша не означает обход лимитера. + +Клиентское кольцо использует SHA-256 → 64-bit координату и 256 виртуальных узлов на стабильный ID шарда. Глобальные бюджеты имеют постоянного координатора `shard0`; пользовательские бюджеты и профили распределяются по кольцу. Недоступный шард не исключается автоматически: такое исключение сбросило бы активный пользовательский лимит. + +Lua атомарно проверяет и резервирует два бюджета на одном узле: общий и соответствующей группы. Глобальная резервация предшествует аутентификации, пользовательская следует за ней. Это последовательное консервативное резервирование, а не распределённая транзакция: отклонённый пользовательский запрос уже расходует глобальный rate budget; глобальный slot освобождается. Успешных запросов сверх лимита такой порядок не допускает. + +Rate использует фиксированное окно 1 секунда от первого запроса; на границе возможны два burst подряд. Slots представлены sorted sets с уникальными lease ID, освобождением через ZREM и expiry 30 секунд. HTTP timeout ограничен 15 секундами, по умолчанию 3. Отказ освобождения оставляет временно занятый slot до expiry. Длительная приостановка процесса свыше lease и скачки часов Valkey выходят за гарантию строгой одновременности; это не распределённая блокировка для изменения обязательных данных. + +Смена кольца: остановить все API, дождаться drain и 31 секунду, добавить шард, изменить конфигурацию, сбросить только guard topology, запустить API. Fingerprint стабильных ID проверяется при старте/readiness. Значения профилей на старых владельцах истекают; новые владельцы прогреваются из PostgreSQL. Миграция обязательных данных не нужна. В этой демонстрации расширение требует короткого окна недоступности, online resharding не заявляется. + +## Альтернативы и последствия + +Redis Cluster использует фиксированные hash slots и собственный протокол маршрутизации; это другая модель, чем реализуемое клиентское кольцо. Перенос authoritative sessions в Valkey усложнил бы проверку persistence и инвалидацию при смене кольца. Здесь PostgreSQL остаётся единственным источником истины. + +Один PostgreSQL, один глобальный координатор и локальные PVC не обеспечивают HA. Глобальный координатор ограничивает масштабирование строгого общего лимита. Для lab2 это намеренная, явно проверяемая граница. + +## Проверки и источники + +Проверки кольца, атомарности и групп находятся в `internal/hashring` и `internal/valkey`; сценарии отказов и результаты — в [REPORT](../../REPORT.md). + +Первичные материалы: [Redis rate limiter](https://redis.io/docs/latest/develop/use-cases/rate-limiter/), [pgx StrictNamedArgs](https://pkg.go.dev/github.com/jackc/pgx/v5#StrictNamedArgs). Собственные Lua-операции и ring реализованы в этом репозитории. diff --git a/docs/decisions/0002-helm.md b/docs/decisions/0002-helm.md new file mode 100644 index 00000000..5f270ed9 --- /dev/null +++ b/docs/decisions/0002-helm.md @@ -0,0 +1,15 @@ +# ADR-0002: Helm для учебного стенда + +Принято: 2026-10-07. + +API, PostgreSQL, Valkey, ConfigMap и NetworkPolicy описываются одним Helm chart. Отдельный namespace изолирует лабораторную; внутри него имена ресурсов стабильны. Values содержат изменяемые параметры. Нет параллельного набора статических манифестов и генератора Kubernetes YAML. + +Секреты создаются отдельно один раз и передаются chart по имени. Helm не хранит пароли и registry key в values. StatefulSet сохраняет существующие имена и volumeClaimTemplates. При переходе существующие ресурсы принимаются через однократный `--take-ownership`; namespace, Secret и PVC не принимаются во владение release. + +Смена topology остаётся обслуживанием с остановкой API. Команда сначала выключает API, ждёт истечения lease, обновляет шарды, удаляет только guard topology и возвращает API. Обычный upgrade отклоняется при изменении кольца с работающим API. Ошибка обслуживания оставляет API остановленным; повтор команды продолжает процедуру. + +Chart рассчитан на одну лабораторную в namespace. Он не реализует HA PostgreSQL или Redis Cluster. Следующие лабораторные могут расширить этот chart своими компонентами. + +Источник: [Helm upgrade](https://docs.helm.sh/docs/helm/helm_upgrade/) — параметры upgrade, wait и take-ownership. + +При adoption Helm 4 server-side apply встретил конфликт владельцев `volumeClaimTemplates`, созданных kubectl. Повторный upgrade с `--take-ownership --server-side=false` сохранил StatefulSet и PVC. Обычные последующие upgrade наследуют этот способ применения. Флаг принятия владения не входит в Makefile: он нужен только при переносе существующей установки. diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..388ca407 --- /dev/null +++ b/go.mod @@ -0,0 +1,36 @@ +module gitea.privcloud.tech/vlad_marlo/mtusi2026lab3 + +go 1.26.1 + +require ( + github.com/gofiber/fiber/v2 v2.52.12 + github.com/google/uuid v1.6.0 + github.com/jackc/pgx/v5 v5.9.1 + github.com/redis/go-redis/v9 v9.17.2 + github.com/valyala/fasthttp v1.51.0 + go.lab260.ru/fielderr v0.0.0-20260609150058-2f9540b99e41 + go.uber.org/fx v1.24.0 + go.uber.org/zap v1.27.1 + golang.org/x/crypto v0.49.0 +) + +require ( + github.com/andybalholm/brotli v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/klauspost/compress v1.17.9 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/tcplisten v1.0.0 // indirect + go.uber.org/dig v1.19.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/sys v0.42.0 // indirect + golang.org/x/text v0.35.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..3bca56bd --- /dev/null +++ b/go.sum @@ -0,0 +1,77 @@ +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/gofiber/fiber/v2 v2.52.12 h1:0LdToKclcPOj8PktUdIKo9BUohjjwfnQl42Dhw8/WUw= +github.com/gofiber/fiber/v2 v2.52.12/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.9.1 h1:uwrxJXBnx76nyISkhr33kQLlUqjv7et7b9FjCen/tdc= +github.com/jackc/pgx/v5 v5.9.1/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/redis/go-redis/v9 v9.17.2 h1:P2EGsA4qVIM3Pp+aPocCJ7DguDHhqrXNhVcEp4ViluI= +github.com/redis/go-redis/v9 v9.17.2/go.mod h1:u410H11HMLoB+TP67dz8rL9s6QW2j76l0//kSOd3370= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA= +github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g= +github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= +github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +go.lab260.ru/fielderr v0.0.0-20260609150058-2f9540b99e41 h1:kHFUC/1OnQ05ShJW1wjCAbrSa/XxylAgEnZ75BholE4= +go.lab260.ru/fielderr v0.0.0-20260609150058-2f9540b99e41/go.mod h1:OQKs2tIkkTxUjzewIMsqChKuHPWDjIgUz+SYqdhR9rM= +go.uber.org/dig v1.19.0 h1:BACLhebsYdpQ7IROQ1AGPjrXcP5dF80U3gKoFzbaq/4= +go.uber.org/dig v1.19.0/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= +go.uber.org/fx v1.24.0 h1:wE8mruvpg2kiiL1Vqd0CC+tr0/24XIB10Iwp2lLWzkg= +go.uber.org/fx v1.24.0/go.mod h1:AmDeGyS+ZARGKM4tlH4FY2Jr63VjbEDJHtqXTGP5hbo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= +go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= +golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= +golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/admission/distributed.go b/internal/admission/distributed.go new file mode 100644 index 00000000..c268f976 --- /dev/null +++ b/internal/admission/distributed.go @@ -0,0 +1,18 @@ +package admission + +import ( + "context" + "errors" +) + +// ErrRate means the request exhausted a shared rate budget. +var ErrRate = errors.New("shared request rate exceeded") + +// ErrSlots means the request exhausted a shared concurrency budget. +var ErrSlots = errors.New("shared execution slots exhausted") + +// Distributed defines request admission independently of the backing database. +type Distributed interface { + // Enter reserves global/group or user/group budgets and returns a release operation. + Enter(ctx context.Context, group, user string) (func(), error) +} diff --git a/internal/admission/limiter.go b/internal/admission/limiter.go new file mode 100644 index 00000000..97e7f2ac --- /dev/null +++ b/internal/admission/limiter.go @@ -0,0 +1,73 @@ +// Package admission bounds request rate and concurrent execution independently of transport. +package admission + +import ( + "fmt" + "sync" + "time" +) + +// Options defines the rate and execution bounds for one limiter. +type Options struct { + // MaxInFlight limits concurrent executions without an admission queue. + MaxInFlight int + // RequestsPerSecond is the token refill rate. + RequestsPerSecond int + // Burst is the maximum number of immediately available tokens. + Burst int +} + +// Limiter owns synchronization for the token bucket and execution slots. +// It knows neither HTTP response codes nor application shutdown state. +type Limiter struct { + mu sync.Mutex + rate float64 + burst float64 + tokens float64 + lastRefill time.Time + slots chan struct{} +} + +// New validates limits and creates a full token bucket with bounded execution slots. +func New(cfg Options) (*Limiter, error) { + if cfg.MaxInFlight <= 0 || cfg.RequestsPerSecond <= 0 || cfg.Burst <= 0 { + return nil, fmt.Errorf("admission limits must be positive") + } + return &Limiter{ + rate: float64(cfg.RequestsPerSecond), + burst: float64(cfg.Burst), + tokens: float64(cfg.Burst), + lastRefill: time.Now(), + slots: make(chan struct{}, cfg.MaxInFlight), + }, nil +} + +// Allow refills the token bucket and consumes a token when one is available. +func (limiter *Limiter) Allow(now time.Time) bool { + limiter.mu.Lock() + defer limiter.mu.Unlock() + elapsed := max(0, now.Sub(limiter.lastRefill).Seconds()) + limiter.tokens = min(limiter.burst, limiter.tokens+elapsed*limiter.rate) + limiter.lastRefill = now + if limiter.tokens < 1 { + return false + } + limiter.tokens-- + return true +} + +// Acquire reserves an execution slot without waiting. +func (limiter *Limiter) Acquire() bool { + select { + case limiter.slots <- struct{}{}: + return true + default: + return false + } +} + +// Release returns an execution slot previously reserved by Acquire. +// Each successful Acquire must be paired with exactly one Release. +func (limiter *Limiter) Release() { + <-limiter.slots +} diff --git a/internal/admission/limiter_test.go b/internal/admission/limiter_test.go new file mode 100644 index 00000000..9fcb7e47 --- /dev/null +++ b/internal/admission/limiter_test.go @@ -0,0 +1,148 @@ +package admission + +import ( + "testing" + "testing/synctest" + "time" +) + +// TestLimiter_Allow checks token exhaustion and refill with deterministic time. +func TestLimiter_Allow(t *testing.T) { + cases := []struct { + name string + elapsed time.Duration + want bool + }{ + {"Negative: exhausted bucket", 0, false}, + {"Negative: partial token", time.Millisecond * 500, false}, + {"Positive: refilled token", time.Second, true}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + // Arrange. + limiter := newTestLimiter(t, Options{MaxInFlight: 1, RequestsPerSecond: 1, Burst: 1}) + if !limiter.Allow(time.Now()) { + t.Fatal("fixture token missing") + } + time.Sleep(tc.elapsed) + + // Act. + got := limiter.Allow(time.Now()) + + // Assert. + if got != tc.want { + t.Fatalf("Allow after %s=%v, want=%v", tc.elapsed, got, tc.want) + } + }) + }) + } +} + +// TestLimiter_Acquire checks available, occupied and released execution slots independently. +func TestLimiter_Acquire(t *testing.T) { + t.Run("Positive: free slot", func(t *testing.T) { + // Arrange. + limiter := newTestLimiter(t, Options{MaxInFlight: 1, RequestsPerSecond: 1, Burst: 1}) + + want := true + + // Act. + got := limiter.Acquire() + if got { + t.Cleanup(limiter.Release) + } + + // Assert. + if got != want { + t.Fatalf("Acquire=%v, want=%v", got, want) + } + }) + + t.Run("Negative: occupied slot", func(t *testing.T) { + // Arrange. + limiter := newTestLimiter(t, Options{MaxInFlight: 1, RequestsPerSecond: 1, Burst: 1}) + + if !limiter.Acquire() { + t.Fatal("fixture slot unavailable") + } + + t.Cleanup(limiter.Release) + + want := false + + // Act. + got := limiter.Acquire() + if got { + t.Cleanup(limiter.Release) + } + + // Assert. + if got != want { + t.Fatalf("Acquire=%v, want=%v", got, want) + } + }) + + t.Run("Positive: released slot", func(t *testing.T) { + // Arrange. + limiter := newTestLimiter(t, Options{MaxInFlight: 1, RequestsPerSecond: 1, Burst: 1}) + + if !limiter.Acquire() { + t.Fatal("fixture slot unavailable") + } + + limiter.Release() + + want := true + + // Act. + got := limiter.Acquire() + if got { + t.Cleanup(limiter.Release) + } + + // Assert. + if got != want { + t.Fatalf("Acquire=%v, want=%v", got, want) + } + }) +} + +// newTestLimiter creates a limiter or fails the test on invalid settings. +func newTestLimiter(t *testing.T, options Options) *Limiter { + t.Helper() + limiter, err := New(options) + if err != nil { + t.Fatal(err) + } + return limiter +} + +// TestLimiter_New rejects each nonpositive limit independently. +func TestLimiter_New(t *testing.T) { + cases := []struct { + name string + options Options + }{ + {"Negative: zero concurrency", Options{MaxInFlight: 0, RequestsPerSecond: 1, Burst: 1}}, + {"Negative: negative concurrency", Options{MaxInFlight: -1, RequestsPerSecond: 1, Burst: 1}}, + {"Negative: zero refill rate", Options{MaxInFlight: 1, RequestsPerSecond: 0, Burst: 1}}, + {"Negative: negative refill rate", Options{MaxInFlight: 1, RequestsPerSecond: -1, Burst: 1}}, + {"Negative: zero burst", Options{MaxInFlight: 1, RequestsPerSecond: 1, Burst: 0}}, + {"Negative: negative burst", Options{MaxInFlight: 1, RequestsPerSecond: 1, Burst: -1}}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + options := tc.options + + // Act. + limiter, err := New(options) + + // Assert. + if err == nil || limiter != nil { + t.Fatalf("invalid options accepted: %v, %v", limiter, err) + } + }) + } +} diff --git a/internal/config/config.go b/internal/config/config.go new file mode 100644 index 00000000..339faacc --- /dev/null +++ b/internal/config/config.go @@ -0,0 +1,53 @@ +// Package config loads and validates the environment configuration of the application. +package config + +import "fmt" + +// Config groups settings by the component that consumes them. +type Config struct { + // HTTP configures the listener, request limits and shutdown deadline. + HTTP *Controller + // Memory configures the capacity of the process-local store. + Memory *Memory + // Logger configures structured process logging. + Logger *Logger +} + +// Default returns independent configuration sections with the documented defaults. +func Default() *Config { + return &Config{ + HTTP: defaultController(), + Memory: defaultMemory(), + Logger: &Logger{Level: "info"}, + } +} + +// New loads environment overrides and rejects invalid settings before startup. +func New() (*Config, error) { + cfg := Default() + if err := cfg.HTTP.loadEnvironment(); err != nil { + return nil, err + } + if err := cfg.Memory.loadEnvironment(); err != nil { + return nil, err + } + cfg.Logger.loadEnvironment() + if err := cfg.Validate(); err != nil { + return nil, err + } + return cfg, nil +} + +// Validate verifies the presence and invariants of each configuration section. +func (cfg *Config) Validate() error { + if cfg == nil || cfg.HTTP == nil || cfg.Memory == nil || cfg.Logger == nil { + return fmt.Errorf("HTTP, Memory and Logger configuration sections are required") + } + if err := cfg.HTTP.Validate(); err != nil { + return err + } + if err := cfg.Memory.Validate(); err != nil { + return err + } + return cfg.Logger.Validate() +} diff --git a/internal/config/config_test.go b/internal/config/config_test.go new file mode 100644 index 00000000..83969917 --- /dev/null +++ b/internal/config/config_test.go @@ -0,0 +1,241 @@ +package config + +import "testing" + +// TestConfig_New checks individual environment overrides and invalid settings. +func TestConfig_New(t *testing.T) { + t.Run("Positive: APP_PORT override", func(t *testing.T) { + // Arrange. + t.Setenv("APP_PORT", "18080") + + // Act. + cfg, err := New() + + // Assert. + if err != nil { + t.Fatal(err) + } + if cfg.HTTP.Port != 18080 { + t.Fatalf("APP_PORT=%v, want=%v", cfg.HTTP.Port, 18080) + } + }) + t.Run("Positive: REQUEST_TIMEOUT_SECONDS override", func(t *testing.T) { + // Arrange. + t.Setenv("REQUEST_TIMEOUT_SECONDS", "4") + + // Act. + cfg, err := New() + + // Assert. + if err != nil { + t.Fatal(err) + } + if cfg.HTTP.TimeoutSeconds != 4 { + t.Fatalf("REQUEST_TIMEOUT_SECONDS=%v, want=%v", cfg.HTTP.TimeoutSeconds, 4) + } + }) + t.Run("Positive: MAX_MESSAGES override", func(t *testing.T) { + // Arrange. + t.Setenv("MAX_MESSAGES", "25") + + // Act. + cfg, err := New() + + // Assert. + if err != nil { + t.Fatal(err) + } + if cfg.Memory.MaxMessages != 25 { + t.Fatalf("MAX_MESSAGES=%v, want=%v", cfg.Memory.MaxMessages, 25) + } + }) + t.Run("Positive: REQUESTS_PER_SECOND override", func(t *testing.T) { + // Arrange. + t.Setenv("REQUESTS_PER_SECOND", "12") + + // Act. + cfg, err := New() + + // Assert. + if err != nil { + t.Fatal(err) + } + if cfg.HTTP.Admission.RequestsPerSecond != 12 { + t.Fatalf("REQUESTS_PER_SECOND=%v, want=%v", cfg.HTTP.Admission.RequestsPerSecond, 12) + } + }) + t.Run("Positive: LOG_LEVEL override", func(t *testing.T) { + // Arrange. + t.Setenv("LOG_LEVEL", "debug") + + // Act. + cfg, err := New() + + // Assert. + if err != nil { + t.Fatal(err) + } + if cfg.Logger.Level != "debug" { + t.Fatalf("LOG_LEVEL=%v, want=%v", cfg.Logger.Level, "debug") + } + }) + cases := []struct { + name string + key string + value string + }{ + {"port exceeds TCP range", "APP_PORT", "65536"}, + {"zero message capacity", "MAX_MESSAGES", "0"}, + {"nonnumeric body limit", "MAX_BODY_BYTES", "bad"}, + {"shutdown deadline exceeds bound", "SHUTDOWN_TIMEOUT_SECONDS", "10"}, + {"hostname instead of bind IP", "APP_HOST", "hostname"}, + } + for _, tc := range cases { + t.Run("Negative: "+tc.name, func(t *testing.T) { + // Arrange. + t.Setenv(tc.key, tc.value) + + // Act. + cfg, err := New() + + // Assert. + if err == nil || cfg != nil { + t.Fatalf("invalid %s=%q returned config=%+v, error=%v", tc.key, tc.value, cfg, err) + } + }) + } +} + +// TestConfig_Validate rejects one missing section or invalid component per scenario. +func TestConfig_Validate(t *testing.T) { + t.Run("Negative: nil config", func(t *testing.T) { + // Arrange. + var cfg *Config + + // Act. + err := cfg.Validate() + + // Assert. + if err == nil { + t.Fatalf("accepted %s", "nil config") + } + }) + + t.Run("Negative: missing HTTP", func(t *testing.T) { + // Arrange. + cfg := Default() + + cfg.HTTP = nil + + // Act. + err := cfg.Validate() + + // Assert. + if err == nil { + t.Fatalf("accepted %s", "missing HTTP") + } + }) + + t.Run("Negative: missing Memory", func(t *testing.T) { + // Arrange. + cfg := Default() + + cfg.Memory = nil + + // Act. + err := cfg.Validate() + + // Assert. + if err == nil { + t.Fatalf("accepted %s", "missing Memory") + } + }) + + t.Run("Negative: missing Logger", func(t *testing.T) { + // Arrange. + cfg := Default() + + cfg.Logger = nil + + // Act. + err := cfg.Validate() + + // Assert. + if err == nil { + t.Fatalf("accepted %s", "missing Logger") + } + }) + + t.Run("Negative: unknown log level", func(t *testing.T) { + // Arrange. + cfg := Default() + + cfg.Logger.Level = "unknown" + + // Act. + err := cfg.Validate() + + // Assert. + if err == nil { + t.Fatalf("accepted %s", "unknown log level") + } + }) + + t.Run("Negative: zero storage capacity", func(t *testing.T) { + // Arrange. + cfg := Default() + + cfg.Memory.MaxUsers = 0 + + // Act. + err := cfg.Validate() + + // Assert. + if err == nil { + t.Fatalf("accepted %s", "zero storage capacity") + } + }) + + t.Run("Negative: zero concurrency", func(t *testing.T) { + // Arrange. + cfg := Default() + + cfg.HTTP.Admission.MaxInFlight = 0 + + // Act. + err := cfg.Validate() + + // Assert. + if err == nil { + t.Fatalf("accepted %s", "zero concurrency") + } + }) +} + +// TestLogger_Validate rejects an absent logging section without panicking. +func TestLogger_Validate(t *testing.T) { + // Arrange. + var cfg *Logger + + // Act. + err := cfg.Validate() + + // Assert. + if err == nil { + t.Fatal("nil logger accepted") + } +} + +// TestMemory_Validate rejects absent storage settings without panicking. +func TestMemory_Validate(t *testing.T) { + // Arrange. + var cfg *Memory + + // Act. + err := cfg.Validate() + + // Assert. + if err == nil { + t.Fatal("nil memory configuration accepted") + } +} diff --git a/internal/config/controller.go b/internal/config/controller.go new file mode 100644 index 00000000..5fe1f9ca --- /dev/null +++ b/internal/config/controller.go @@ -0,0 +1,157 @@ +package config + +import ( + "fmt" + "net" + "os" + "strconv" + "time" +) + +const ( + maxTCPPort = 65535 + maxShutdownTimeoutSeconds = 9 + maxRequestTimeoutSeconds = 15 +) + +// Controller contains settings owned exclusively by the HTTP transport. +type Controller struct { + // Host is the IP address on which the listener binds. + Host string + // Port is the TCP port, in the range 1..65535. + Port int + // TimeoutSeconds limits request reads, response writes and idle connections. + TimeoutSeconds int + // ShutdownTimeoutSeconds bounds draining of active requests; it must not exceed nine seconds. + ShutdownTimeoutSeconds int + // MaxBodyBytes is the maximum accepted request body size before decoding. + MaxBodyBytes int + // MaxConnections bounds simultaneous connections handled by fasthttp. + MaxConnections int + // Admission controls business request throughput and execution concurrency. + Admission Admission +} + +// Admission defines shared request policies; health endpoints bypass them. +type Admission struct { + // MaxInFlight is the maximum number of executing requests, with no waiting queue. + MaxInFlight int + // RequestsPerSecond is the token refill rate for the global admission bucket. + RequestsPerSecond int + // Burst is the bucket capacity and maximum immediate request burst. + Burst int + // AuthRate limits public registration/login attempts per second. + AuthRate int + // AuthSlots bounds concurrent password KDF work globally. + AuthSlots int + // UserRate limits each authenticated account across all groups. + UserRate int + // UserSlots bounds concurrency across one account's groups. + UserSlots int + // UserWriteRate limits one account's write attempts per second. + UserWriteRate int + // UserWriteSlots bounds one account's concurrent writes. + UserWriteSlots int + // UserAuthRate limits session-management operations per account. + UserAuthRate int + // UserAuthSlots bounds one account's session-management concurrency. + UserAuthSlots int +} + +// defaultController returns the default listener, timeout and admission settings. +func defaultController() *Controller { + return &Controller{ + Host: "0.0.0.0", + Port: 8080, + TimeoutSeconds: 3, + ShutdownTimeoutSeconds: 5, + MaxBodyBytes: 64 << 10, + MaxConnections: 256, + Admission: Admission{ + MaxInFlight: 32, + RequestsPerSecond: 1000, + Burst: 100, + AuthRate: 100, + AuthSlots: 4, + UserRate: 100, + UserSlots: 8, + UserWriteRate: 50, + UserWriteSlots: 4, + UserAuthRate: 20, + UserAuthSlots: 2, + }, + } +} + +// loadEnvironment applies environment overrides to this configuration section. +func (cfg *Controller) loadEnvironment() error { + if host, exists := os.LookupEnv("APP_HOST"); exists { + cfg.Host = host + } + return loadIntegers( + integerSetting{"APP_PORT", &cfg.Port}, + integerSetting{"REQUEST_TIMEOUT_SECONDS", &cfg.TimeoutSeconds}, + integerSetting{"SHUTDOWN_TIMEOUT_SECONDS", &cfg.ShutdownTimeoutSeconds}, + integerSetting{"MAX_BODY_BYTES", &cfg.MaxBodyBytes}, + integerSetting{"MAX_CONNECTIONS", &cfg.MaxConnections}, + integerSetting{"MAX_IN_FLIGHT", &cfg.Admission.MaxInFlight}, + integerSetting{"REQUESTS_PER_SECOND", &cfg.Admission.RequestsPerSecond}, + integerSetting{"REQUEST_BURST", &cfg.Admission.Burst}, + integerSetting{"AUTH_RATE", &cfg.Admission.AuthRate}, + integerSetting{"AUTH_SLOTS", &cfg.Admission.AuthSlots}, + integerSetting{"USER_RATE", &cfg.Admission.UserRate}, + integerSetting{"USER_SLOTS", &cfg.Admission.UserSlots}, + integerSetting{"USER_WRITE_RATE", &cfg.Admission.UserWriteRate}, + integerSetting{"USER_WRITE_SLOTS", &cfg.Admission.UserWriteSlots}, + integerSetting{"USER_AUTH_RATE", &cfg.Admission.UserAuthRate}, + integerSetting{"USER_AUTH_SLOTS", &cfg.Admission.UserAuthSlots}, + ) +} + +// Validate checks listener addresses, timeouts and admission bounds. +func (cfg *Controller) Validate() error { + if cfg == nil { + return fmt.Errorf("HTTP configuration is required") + } + if cfg.TimeoutSeconds > maxRequestTimeoutSeconds { + return fmt.Errorf("REQUEST_TIMEOUT_SECONDS must not exceed %d", maxRequestTimeoutSeconds) + } + if net.ParseIP(cfg.Host) == nil { + return fmt.Errorf("APP_HOST must be an IP address") + } + if cfg.Port < 1 || cfg.Port > maxTCPPort { + return fmt.Errorf("APP_PORT must be 1..%d", maxTCPPort) + } + if cfg.ShutdownTimeoutSeconds < 1 || cfg.ShutdownTimeoutSeconds > maxShutdownTimeoutSeconds { + return fmt.Errorf("SHUTDOWN_TIMEOUT_SECONDS must be 1..%d", maxShutdownTimeoutSeconds) + } + settings := []integerSetting{ + {"REQUEST_TIMEOUT_SECONDS", &cfg.TimeoutSeconds}, + {"MAX_BODY_BYTES", &cfg.MaxBodyBytes}, + {"MAX_CONNECTIONS", &cfg.MaxConnections}, + {"MAX_IN_FLIGHT", &cfg.Admission.MaxInFlight}, + {"REQUESTS_PER_SECOND", &cfg.Admission.RequestsPerSecond}, + {"REQUEST_BURST", &cfg.Admission.Burst}, + } + for _, setting := range settings { + if err := validatePositive(setting.name, *setting.target); err != nil { + return err + } + } + return nil +} + +// Bind returns the listener address, including brackets for IPv6 hosts. +func (cfg *Controller) Bind() string { + return net.JoinHostPort(cfg.Host, strconv.Itoa(cfg.Port)) +} + +// Timeout returns the configured read, write and idle timeout. +func (cfg *Controller) Timeout() time.Duration { + return time.Duration(cfg.TimeoutSeconds) * time.Second +} + +// ShutdownTimeout returns the maximum time allowed to drain active requests. +func (cfg *Controller) ShutdownTimeout() time.Duration { + return time.Duration(cfg.ShutdownTimeoutSeconds) * time.Second +} diff --git a/internal/config/environment.go b/internal/config/environment.go new file mode 100644 index 00000000..db5dfd83 --- /dev/null +++ b/internal/config/environment.go @@ -0,0 +1,41 @@ +package config + +import ( + "fmt" + "os" + "strconv" +) + +const maxConfiguredInteger = 1 << 30 + +type integerSetting struct { + name string + target *int +} + +// loadIntegers parses configured integer overrides and reports invalid values. +func loadIntegers(settings ...integerSetting) error { + for _, setting := range settings { + raw, exists := os.LookupEnv(setting.name) + if !exists { + continue + } + value, err := strconv.Atoi(raw) + if err != nil { + return fmt.Errorf("%s must be an integer", setting.name) + } + if err := validatePositive(setting.name, value); err != nil { + return err + } + *setting.target = value + } + return nil +} + +// validatePositive checks that a setting is positive and within the supported range. +func validatePositive(name string, value int) error { + if value < 1 || value > maxConfiguredInteger { + return fmt.Errorf("%s must be between 1 and %d", name, maxConfiguredInteger) + } + return nil +} diff --git a/internal/config/logger.go b/internal/config/logger.go new file mode 100644 index 00000000..58f2450b --- /dev/null +++ b/internal/config/logger.go @@ -0,0 +1,32 @@ +package config + +import ( + "fmt" + "os" +) + +// Logger configures the minimum severity written as structured JSON to stderr. +type Logger struct { + // Level is one of debug, info, warn or error; the default is info. + Level string +} + +// loadEnvironment applies environment overrides to this configuration section. +func (cfg *Logger) loadEnvironment() { + if level, exists := os.LookupEnv("LOG_LEVEL"); exists { + cfg.Level = level + } +} + +// Validate rejects unsupported levels rather than silently changing verbosity. +func (cfg *Logger) Validate() error { + if cfg == nil { + return fmt.Errorf("Logger configuration is required") + } + switch cfg.Level { + case "debug", "info", "warn", "error": + return nil + default: + return fmt.Errorf("LOG_LEVEL must be debug, info, warn or error") + } +} diff --git a/internal/config/memory.go b/internal/config/memory.go new file mode 100644 index 00000000..401e67d1 --- /dev/null +++ b/internal/config/memory.go @@ -0,0 +1,54 @@ +package config + +import "fmt" + +// Memory defines logical capacity limits; MaxStateBytes is not a measurement of RSS. +type Memory struct { + // MaxUsers limits the number of registered users. + MaxUsers int + // MaxChats limits the number of immutable chats. + MaxChats int + // MaxMessages limits the total number of messages across all chats. + MaxMessages int + // MaxStateBytes limits the logical storage budget, including estimated record overhead. + MaxStateBytes int +} + +// defaultMemory returns the default storage capacity limits. +func defaultMemory() *Memory { + return &Memory{ + MaxUsers: 10000, + MaxChats: 10000, + MaxMessages: 100000, + MaxStateBytes: 32 << 20, + } +} + +// loadEnvironment applies environment overrides to this configuration section. +func (cfg *Memory) loadEnvironment() error { + return loadIntegers( + integerSetting{"MAX_USERS", &cfg.MaxUsers}, + integerSetting{"MAX_CHATS", &cfg.MaxChats}, + integerSetting{"MAX_MESSAGES", &cfg.MaxMessages}, + integerSetting{"MAX_STATE_BYTES", &cfg.MaxStateBytes}, + ) +} + +// Validate rejects disabled, negative and excessively large storage limits. +func (cfg *Memory) Validate() error { + if cfg == nil { + return fmt.Errorf("Memory configuration is required") + } + settings := []integerSetting{ + {"MAX_USERS", &cfg.MaxUsers}, + {"MAX_CHATS", &cfg.MaxChats}, + {"MAX_MESSAGES", &cfg.MaxMessages}, + {"MAX_STATE_BYTES", &cfg.MaxStateBytes}, + } + for _, setting := range settings { + if err := validatePositive(setting.name, *setting.target); err != nil { + return err + } + } + return nil +} diff --git a/internal/config/persistence.go b/internal/config/persistence.go new file mode 100644 index 00000000..97142002 --- /dev/null +++ b/internal/config/persistence.go @@ -0,0 +1,52 @@ +package config + +import ( + "fmt" + "os" + "strings" +) + +// Persistence contains database, cache and session settings. +type Persistence struct { + // DatabaseURL identifies the PostgreSQL database. + DatabaseURL string + // Shards maps stable identities to Valkey addresses. + Shards map[string]string + // Coordinator names the stable global admission shard. + Coordinator string + // PoolSize bounds connections per dependency. + PoolSize int + // TimeoutMilliseconds bounds each dependency operation. + TimeoutMilliseconds int + // SessionTTLSeconds sets the absolute session lifetime. + SessionTTLSeconds int +} + +// NewPersistence loads dependency settings separately from HTTP configuration. +func NewPersistence() (*Persistence, error) { + cfg := &Persistence{ + DatabaseURL: os.Getenv("DATABASE_URL"), + Coordinator: os.Getenv("VALKEY_COORDINATOR"), + Shards: make(map[string]string), + PoolSize: 8, + TimeoutMilliseconds: 1000, + SessionTTLSeconds: 3600, + } + if cfg.Coordinator == "" { + cfg.Coordinator = "shard0" + } + for _, entry := range strings.Split(os.Getenv("VALKEY_SHARDS"), ",") { + id, address, ok := strings.Cut(entry, "=") + if !ok || id == "" || address == "" || cfg.Shards[id] != "" { + return nil, fmt.Errorf("VALKEY_SHARDS requires unique id=address entries") + } + cfg.Shards[id] = address + } + if cfg.DatabaseURL == "" || cfg.Shards[cfg.Coordinator] == "" { + return nil, fmt.Errorf("DATABASE_URL and a configured VALKEY_COORDINATOR are required") + } + if err := loadIntegers(integerSetting{"DEPENDENCY_POOL_SIZE", &cfg.PoolSize}, integerSetting{"DEPENDENCY_TIMEOUT_MS", &cfg.TimeoutMilliseconds}, integerSetting{"SESSION_TTL_SECONDS", &cfg.SessionTTLSeconds}); err != nil { + return nil, err + } + return cfg, nil +} diff --git a/internal/config/persistence_test.go b/internal/config/persistence_test.go new file mode 100644 index 00000000..6f9b63f4 --- /dev/null +++ b/internal/config/persistence_test.go @@ -0,0 +1,34 @@ +package config + +import "testing" + +// TestPersistenceConfiguration validates independent environment configurations. +func TestPersistenceConfiguration(t *testing.T) { + cases := []struct { + name string + database string + shards string + coordinator string + ttl string + valid bool + }{ + {"defaults", "postgres://localhost/test", "shard0=localhost:6379", "", "3600", true}, + {"missing database", "", "shard0=localhost:6379", "", "3600", false}, + {"missing coordinator", "postgres://localhost/test", "shard1=localhost:6379", "shard0", "3600", false}, + {"duplicate shard", "postgres://localhost/test", "shard0=a,shard0=b", "", "3600", false}, + {"invalid topology", "postgres://localhost/test", "wrong", "", "3600", false}, + {"invalid ttl", "postgres://localhost/test", "shard0=a", "", "no", false}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + t.Setenv("DATABASE_URL", tc.database) + t.Setenv("VALKEY_SHARDS", tc.shards) + t.Setenv("VALKEY_COORDINATOR", tc.coordinator) + t.Setenv("SESSION_TTL_SECONDS", tc.ttl) + _, err := NewPersistence() + if (err == nil) != tc.valid { + t.Fatalf("unexpected validation result: %v", err) + } + }) + } +} diff --git a/internal/controller/fx.go b/internal/controller/fx.go new file mode 100644 index 00000000..e99b2264 --- /dev/null +++ b/internal/controller/fx.go @@ -0,0 +1,8 @@ +package controller + +import "go.uber.org/fx" + +// RunControllerFx lets Fx own startup, signal handling and graceful shutdown. +func RunControllerFx(lc fx.Lifecycle, ctrl Controller) { + lc.Append(fx.Hook{OnStart: ctrl.Start, OnStop: ctrl.Stop}) +} diff --git a/internal/controller/http/fiber/auth.go b/internal/controller/http/fiber/auth.go new file mode 100644 index 00000000..88e4d383 --- /dev/null +++ b/internal/controller/http/fiber/auth.go @@ -0,0 +1,76 @@ +package fiber + +import ( + "encoding/base64" + "net/http" + "strings" + + "github.com/gofiber/fiber/v2" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +const identityKey = "authenticated-user" + +// HandleLogin structurally decodes Basic credentials and delegates authentication. +func (ctrl *Controller) HandleLogin(ctx *fiber.Ctx) error { + scheme, encoded, ok := strings.Cut(ctx.Get(fiber.HeaderAuthorization), " ") + if !ok || !strings.EqualFold(scheme, "Basic") { + return service.ErrUnauthorized + } + decoded, err := base64.StdEncoding.DecodeString(encoded) + if err != nil { + return service.ErrUnauthorized + } + username, password, ok := strings.Cut(string(decoded), ":") + if !ok { + return service.ErrUnauthorized + } + if len(ctx.Body()) != 0 { + return service.ErrInvalid + } + session, err := ctrl.auth.Login(ctx.UserContext(), username, password) + if err != nil { + return err + } + return ctx.Status(http.StatusCreated).JSON(fiber.Map{ + "token": session.Token, + "token_type": "Bearer", + "expires_at": session.ExpiresAt, + "user": userResponse(session.User), + }) +} + +// HandleLogout revokes the current authenticated token before returning no content. +func (ctrl *Controller) HandleLogout(ctx *fiber.Ctx) error { + if err := ctrl.auth.Logout(ctx.UserContext(), bearer(ctx)); err != nil { + return err + } + return ctx.SendStatus(http.StatusNoContent) +} + +// bearer extracts a Bearer token without interpreting its identity or validity. +func bearer(ctx *fiber.Ctx) string { + scheme, token, ok := strings.Cut(ctx.Get(fiber.HeaderAuthorization), " ") + if !ok || !strings.EqualFold(scheme, "Bearer") { + return "" + } + return token +} + +// identity reads only the identity produced by successful session authentication. +func identity(ctx *fiber.Ctx) string { + value, _ := ctx.Locals(identityKey).(string) + return value +} + +// requestGroup selects a bounded policy group from the HTTP operation. +func requestGroup(ctx *fiber.Ctx) string { + if ctx.Path() == "/api/v1/users" || strings.HasPrefix(ctx.Path(), "/api/v1/auth/") { + return "auth" + } + if ctx.Method() == http.MethodGet { + return "read" + } + return "write" +} diff --git a/internal/controller/http/fiber/auth_test.go b/internal/controller/http/fiber/auth_test.go new file mode 100644 index 00000000..52795d4d --- /dev/null +++ b/internal/controller/http/fiber/auth_test.go @@ -0,0 +1,161 @@ +package fiber + +import ( + "context" + "encoding/base64" + "io" + "net/http" + "net/http/httptest" + "strings" + "testing" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +type sessionFixture struct { + fixtureAuthentication + login func(string, string) (dto.SessionDTO, error) + logoutError error +} + +// Login delegates the credentials decoded by the controller to the arranged scenario. +func (f sessionFixture) Login(_ context.Context, username, password string) (dto.SessionDTO, error) { + return f.login(username, password) +} + +// Logout returns the prescribed revocation outcome. +func (f sessionFixture) Logout(context.Context, string) error { + return f.logoutError +} + +// TestLoginHTTPChecksBasicEncoding verifies independent wire-level login scenarios. +func TestLoginHTTPChecksBasicEncoding(t *testing.T) { + cases := []struct { + name string + header string + body string + status int + }{ + {"missing header", "", "", http.StatusUnauthorized}, + {"wrong scheme", "Bearer abc", "", http.StatusUnauthorized}, + {"bad base64", "Basic %%%", "", http.StatusUnauthorized}, + {"no delimiter", "Basic " + base64.StdEncoding.EncodeToString([]byte("alice")), "", http.StatusUnauthorized}, + {"unexpected body", "Basic " + base64.StdEncoding.EncodeToString([]byte("alice:long-password:ok")), "{}", http.StatusBadRequest}, + {"valid colon in password", "Basic " + base64.StdEncoding.EncodeToString([]byte("alice:long-password:ok")), "", http.StatusCreated}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + ctrl := testController(t, nil) + ctrl.auth = sessionFixture{login: func(username, password string) (dto.SessionDTO, error) { + if username != "alice" || password != "long-password:ok" { + t.Fatal("credentials altered") + } + return dto.SessionDTO{Token: "opaque", ExpiresAt: time.Now().UTC().Add(time.Hour), User: dto.UserDTO{ID: uuid.New(), Username: "alice"}}, nil + }} + req := httptest.NewRequest(http.MethodPost, "/api/v1/auth/sessions", strings.NewReader(tc.body)) + req.Header.Set("Authorization", tc.header) + response, err := ctrl.server.Test(req) + if err != nil { + t.Fatal(err) + } + defer func() { + _ = response.Body.Close() + }() + if response.StatusCode != tc.status { + t.Fatalf("got %d want %d", response.StatusCode, tc.status) + } + if tc.status == http.StatusUnauthorized && response.Header.Get("WWW-Authenticate") != `Basic realm="messenger", charset="UTF-8"` { + t.Fatal("missing Basic challenge") + } + }) + } +} + +// TestLoginInvalidCredentialsUsesBasicChallenge checks the service rejection mapping. +func TestLoginInvalidCredentialsUsesBasicChallenge(t *testing.T) { + ctrl := testController(t, nil) + ctrl.auth = sessionFixture{login: func(string, string) (dto.SessionDTO, error) { + return dto.SessionDTO{}, service.ErrUnauthorized + }} + req := httptest.NewRequest(http.MethodPost, "/api/v1/auth/sessions", nil) + req.SetBasicAuth("alice", "invalid-password") + response, err := ctrl.server.Test(req) + if err != nil { + t.Fatal(err) + } + defer func() { + _ = response.Body.Close() + }() + if response.StatusCode != http.StatusUnauthorized || response.Header.Get("WWW-Authenticate") != `Basic realm="messenger", charset="UTF-8"` { + t.Fatal("incorrect login rejection") + } +} + +// TestLogoutHTTPReturnsNoContent checks the authenticated revocation response. +func TestLogoutHTTPReturnsNoContent(t *testing.T) { + ctrl := testController(t, nil) + actor := user(t, ctrl) + req := httptest.NewRequest(http.MethodDelete, "/api/v1/auth/sessions/current", nil) + req.Header.Set("Authorization", "Bearer "+actor) + response, err := ctrl.server.Test(req) + if err != nil { + t.Fatal(err) + } + defer func() { + _ = response.Body.Close() + }() + body, err := io.ReadAll(response.Body) + if err != nil || response.StatusCode != http.StatusNoContent || len(body) != 0 { + t.Fatalf("invalid logout response: %v", err) + } +} + +// TestLogoutHTTPPreservesFailure ensures an unsuccessful revoke does not claim success. +func TestLogoutHTTPPreservesFailure(t *testing.T) { + ctrl := testController(t, nil) + actor := user(t, ctrl) + ctrl.auth = sessionFixture{fixtureAuthentication: fixtureAuthentication{ctrl.service}, logoutError: context.DeadlineExceeded} + status, _, err := request(ctrl, http.MethodDelete, "/api/v1/auth/sessions/current", actor, nil) + if err != nil || status != http.StatusInternalServerError { + t.Fatalf("revocation failure hidden: %d %v", status, err) + } +} + +// TestLegacyIdentityDoesNotAuthenticate verifies the lab1 header cannot grant access. +func TestLegacyIdentityDoesNotAuthenticate(t *testing.T) { + ctrl := testController(t, nil) + actor := user(t, ctrl) + req := httptest.NewRequest(http.MethodGet, "/api/v1/users/me", nil) + req.Header.Set("X-User-Id", actor) + response, err := ctrl.server.Test(req) + if err != nil { + t.Fatal(err) + } + defer func() { + _ = response.Body.Close() + }() + if response.StatusCode != http.StatusUnauthorized || response.Header.Get("WWW-Authenticate") != `Bearer realm="messenger"` { + t.Fatal("legacy identity granted access or missing challenge") + } +} + +type unavailableReadiness struct{} + +// Ping simulates an unavailable mandatory dependency for readiness mapping. +func (unavailableReadiness) Ping(context.Context) error { + return context.DeadlineExceeded +} + +// TestReadinessRejectsDependencyFailure verifies readiness reflects mandatory infrastructure. +func TestReadinessRejectsDependencyFailure(t *testing.T) { + ctrl := testController(t, nil) + ctrl.readiness = unavailableReadiness{} + status, _, err := request(ctrl, http.MethodGet, "/health/ready", "", nil) + if err != nil || status != http.StatusServiceUnavailable { + t.Fatalf("incorrect readiness: %d %v", status, err) + } +} diff --git a/internal/controller/http/fiber/chats_test.go b/internal/controller/http/fiber/chats_test.go new file mode 100644 index 00000000..d1660ba1 --- /dev/null +++ b/internal/controller/http/fiber/chats_test.go @@ -0,0 +1,312 @@ +package fiber + +import ( + "net/http" + "net/url" + "reflect" + "testing" + + "github.com/google/uuid" +) + +// TestController_ChatsCreate checks membership and request validation in isolated chats. +func TestController_ChatsCreate(t *testing.T) { + t.Run("Positive: caller included", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + payload := mustJSON(t, map[string]any{"title": "Team", "member_ids": []string{actor}}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusCreated, body) + if body["title"] != "Team" || !reflect.DeepEqual(body["member_ids"], []any{actor}) { + t.Fatalf("chat fields changed: %v", body) + } + }) + + t.Run("Negative: empty members", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + payload := mustJSON(t, map[string]any{"title": "Team", "member_ids": []string{}}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: duplicate members", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + payload := mustJSON(t, map[string]any{"title": "Team", "member_ids": []string{actor, actor}}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: caller omitted", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + outsider := user(t, ctrl) + payload := mustJSON(t, map[string]any{"title": "Team", "member_ids": []string{outsider}}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: unknown member", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + payload := mustJSON(t, map[string]any{"title": "Team", "member_ids": []string{actor, uuid.NewString()}}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: malformed member ID", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + payload := mustJSON(t, map[string]any{"title": "Team", "member_ids": []string{actor, "invalid"}}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: blank title", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + payload := mustJSON(t, map[string]any{"title": " ", "member_ids": []string{actor}}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: malformed JSON", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + payload := []byte(`{`) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) +} + +// TestController_ChatsGetByID checks access and the returned chat identity. +func TestController_ChatsGetByID(t *testing.T) { + t.Run("Positive: member reads chat", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + id := chat(t, ctrl, owner) + actor, target := owner, id + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/chats/"+target, actor, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusOK, body) + if body["id"] != id || body["title"] != "Чат" { + t.Fatalf("wrong chat: %v", body) + } + }) + + t.Run("Negative: outsider", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + id := chat(t, ctrl, owner) + actor, target := user(t, ctrl), id + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/chats/"+target, actor, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusNotFound, body) + assertErrorCode(t, body, "not_found") + }) + + t.Run("Negative: unknown chat", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + actor, target := owner, uuid.NewString() + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/chats/"+target, actor, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusNotFound, body) + assertErrorCode(t, body, "not_found") + }) + + t.Run("Negative: malformed chat ID", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + actor, target := owner, "invalid" + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/chats/"+target, actor, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: authentication precedes ID parsing", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor, target := "", "invalid" + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/chats/"+target, actor, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusUnauthorized, body) + assertErrorCode(t, body, "unauthorized") + }) +} + +// TestController_ChatsGetPage checks that foreign memberships remain absent from lists. +func TestController_ChatsGetPage(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + chat(t, ctrl, owner) + outsider := user(t, ctrl) + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/chats", outsider, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusOK, body) + if len(body["items"].([]any)) != 0 || body["next_cursor"] != nil { + t.Fatalf("foreign chat leaked: %v", body) + } +} + +// TestController_ChatPagination recovers every chat exactly once across page boundaries. +func TestController_ChatPagination(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + expected := make(map[string]bool) + for range 15 { + expected[chat(t, ctrl, actor)] = true + } + + // Act. + items := history(t, ctrl, actor, "/api/v1/chats") + + // Assert. + if len(items) != len(expected) { + t.Fatalf("got %d chats, want %d", len(items), len(expected)) + } + for _, item := range items { + id := item.(map[string]any)["id"].(string) + if !expected[id] { + t.Fatalf("duplicate or unexpected chat %s", id) + } + delete(expected, id) + } +} + +// TestController_ChatCursorScope rejects a continuation issued for another user's list. +func TestController_ChatCursorScope(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + outsider := user(t, ctrl) + chat(t, ctrl, owner) + chat(t, ctrl, owner) + page := call(t, ctrl, http.MethodGet, "/api/v1/chats?limit=1", owner, nil, http.StatusOK) + token := page["next_cursor"].(string) + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/chats?cursor="+url.QueryEscape(token), outsider, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") +} diff --git a/internal/controller/http/fiber/configure.go b/internal/controller/http/fiber/configure.go new file mode 100644 index 00000000..1f3da39a --- /dev/null +++ b/internal/controller/http/fiber/configure.go @@ -0,0 +1,37 @@ +package fiber + +import ( + "github.com/gofiber/fiber/v2" + "github.com/gofiber/fiber/v2/middleware/recover" +) + +// configure initializes the HTTP server, middleware and routes. +func (ctrl *Controller) configure() { + ctrl.createServer() + ctrl.initMiddlewares() + ctrl.initRoutes() +} + +// createServer creates Fiber with the configured transport limits and error handler. +func (ctrl *Controller) createServer() { + timeout := ctrl.cfg.Timeout() + ctrl.server = fiber.New(fiber.Config{ + AppName: "messenger-lab1", + DisableStartupMessage: true, + Immutable: true, + CaseSensitive: true, + StrictRouting: true, + BodyLimit: ctrl.cfg.MaxBodyBytes, + Concurrency: ctrl.cfg.MaxConnections, + ReadTimeout: timeout, + WriteTimeout: timeout, + IdleTimeout: timeout, + ErrorHandler: ctrl.handleErr, + }) +} + +// initMiddlewares registers request logging and panic recovery middleware. +func (ctrl *Controller) initMiddlewares() { + ctrl.server.Use(ctrl.request) + ctrl.server.Use(recover.New()) +} diff --git a/internal/controller/http/fiber/controller.go b/internal/controller/http/fiber/controller.go new file mode 100644 index 00000000..a541ae39 --- /dev/null +++ b/internal/controller/http/fiber/controller.go @@ -0,0 +1,57 @@ +// Package fiber implements the messenger HTTP transport using Fiber. +package fiber + +import ( + "fmt" + "sync/atomic" + + "github.com/gofiber/fiber/v2" + "go.lab260.ru/fielderr" + "go.uber.org/zap" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/admission" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/controller" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// Controller owns the HTTP server and delegates business operations to Service. +// Its configuration is copied at construction and must not change during serving. +// Fx manages its listener through Start and Stop. +type Controller struct { + log *zap.Logger + cfg config.Controller + service service.Service + server *fiber.App + errorRegistry *fielderr.Registry + admission admission.Distributed + auth service.Authentication + readiness Readiness + stopping atomic.Bool + serveDone chan error +} + +var _ controller.Controller = (*Controller)(nil) + +// New validates dependencies and prepares the server without opening a listener. +// Routing, middleware and Fiber configuration are installed by configure. +func New(log *zap.Logger, cfg *config.Controller, svc service.Service, registry *fielderr.Registry, limiter admission.Distributed, auth service.Authentication, readiness Readiness) (*Controller, error) { + if err := cfg.Validate(); err != nil { + return nil, err + } + if log == nil || svc == nil || registry == nil || limiter == nil || auth == nil || readiness == nil { + return nil, fmt.Errorf("HTTP logger, service, error registry and admission limiter are required") + } + ctrl := &Controller{ + log: log.Named("controller.http.fiber"), + cfg: *cfg, + service: svc, + errorRegistry: registry, + admission: limiter, + auth: auth, + readiness: readiness, + serveDone: make(chan error, 1), + } + ctrl.configure() + return ctrl, nil +} diff --git a/internal/controller/http/fiber/controller_test.go b/internal/controller/http/fiber/controller_test.go new file mode 100644 index 00000000..09a1ea4e --- /dev/null +++ b/internal/controller/http/fiber/controller_test.go @@ -0,0 +1,319 @@ +package fiber + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "net/http" + "net/http/httptest" + "net/url" + "reflect" + "strings" + "sync" + "testing" + + "github.com/google/uuid" + "go.uber.org/zap" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/admission" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service/production" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/memory" +) + +// testController creates an integration fixture with the real controller, service and store. +func testController(t *testing.T, change func(*config.Config)) *Controller { + t.Helper() + cfg := config.Default() + cfg.HTTP.Admission.RequestsPerSecond = 100000 + cfg.HTTP.Admission.Burst = 100000 + if change != nil { + change(cfg) + } + repo, err := memory.New(cfg.Memory) + if err != nil { + t.Fatal(err) + } + codec, err := cursor.New() + if err != nil { + t.Fatal(err) + } + svc, err := production.New(repo, codec) + if err != nil { + t.Fatal(err) + } + registry, err := NewErrorRegistry() + if err != nil { + t.Fatal(err) + } + limiter, err := admission.New(admission.Options{ + MaxInFlight: cfg.HTTP.Admission.MaxInFlight, + RequestsPerSecond: cfg.HTTP.Admission.RequestsPerSecond, + Burst: cfg.HTTP.Admission.Burst, + }) + if err != nil { + t.Fatal(err) + } + ctrl, err := New(zap.NewNop(), cfg.HTTP, svc, registry, &fixtureAdmission{limiter}, fixtureAuthentication{svc}, fixtureReadiness{}) + if err != nil { + t.Fatal(err) + } + return ctrl +} + +// request sends a raw test request and decodes its response. +func request(ctrl *Controller, method, path, actor string, body []byte) (int, map[string]any, error) { + req := httptest.NewRequest(method, path, bytes.NewReader(body)) + if body != nil { + req.Header.Set("Content-Type", "application/json") + } + if actor != "" { + req.Header.Set("Authorization", "Bearer "+actor) + } + resp, err := ctrl.server.Test(req, 10000) + if err != nil { + return 0, nil, err + } + defer func() { + _ = resp.Body.Close() + }() + b, err := io.ReadAll(resp.Body) + if err != nil { + return 0, nil, err + } + var data map[string]any + if err = json.Unmarshal(b, &data); err != nil { + return resp.StatusCode, nil, fmt.Errorf("invalid JSON response: %w", err) + } + if resp.Header.Get("X-Request-Id") == "" { + return resp.StatusCode, data, fmt.Errorf("missing request ID") + } + if resp.StatusCode >= http.StatusBadRequest { + envelope, ok := data["error"].(map[string]any) + if !ok || envelope["request_id"] != resp.Header.Get("X-Request-Id") { + return resp.StatusCode, data, fmt.Errorf("invalid error envelope") + } + } + return resp.StatusCode, data, nil +} + +// call sends a JSON test request and checks its expected HTTP status. +func call(t *testing.T, ctrl *Controller, method, path, actor string, body any, want int) map[string]any { + t.Helper() + var b []byte + var err error + if raw, ok := body.([]byte); ok { + b = raw + } else if body != nil { + b, err = json.Marshal(body) + if err != nil { + t.Fatal(err) + } + } + status, data, err := request(ctrl, method, path, actor, b) + if err != nil { + t.Fatal(err) + } + if status != want { + t.Fatalf("%s %s: got %d want %d: %v", method, path, status, want, data) + } + return data +} + +// user creates a test user and returns its identifier. +func user(t *testing.T, c *Controller) string { + t.Helper() + r := call(t, c, http.MethodPost, "/api/v1/users", "", map[string]any{"username": "u_" + uuid.New().String()[:8], "display_name": "Алиса 👋", "password": "fixture-password-123"}, http.StatusCreated) + return r["id"].(string) +} + +// chat creates a test chat containing the supplied user. +func chat(t *testing.T, c *Controller, u string) string { + t.Helper() + r := call(t, c, http.MethodPost, "/api/v1/chats", u, map[string]any{"title": "Чат", "member_ids": []string{u}}, http.StatusCreated) + return r["id"].(string) +} + +// TestDuplicateUsernameRace checks username uniqueness under concurrent requests. +func TestDuplicateUsernameRace(t *testing.T) { + // Arrange. + c := testController(t, nil) + results := make(chan int, 10) + failures := make(chan error, 10) + var wg sync.WaitGroup + // Act. + for range 10 { + wg.Go(func() { + status, _, err := request(c, http.MethodPost, "/api/v1/users", "", []byte(`{"username":"same","display_name":"User","password":"fixture-password-123"}`)) + if err != nil { + failures <- err + } + results <- status + }) + } + wg.Wait() + close(results) + close(failures) + // Assert. + for err := range failures { + t.Error(err) + } + created, conflicts := 0, 0 + for s := range results { + switch s { + case http.StatusCreated: + created++ + case http.StatusConflict: + conflicts++ + default: + t.Errorf("unexpected %d", s) + } + } + if created != 1 || conflicts != 9 { + t.Fatalf("created=%d conflicts=%d", created, conflicts) + } +} + +// history collects all test messages by following pagination cursors. +func history(t *testing.T, c *Controller, u, path string) []any { + t.Helper() + var items []any + next := path + "?limit=7" + for range 100 { + r := call(t, c, http.MethodGet, next, u, nil, http.StatusOK) + items = append(items, r["items"].([]any)...) + if r["next_cursor"] == nil { + return items + } + next = path + "?limit=7&cursor=" + url.QueryEscape(r["next_cursor"].(string)) + } + t.Fatal("pagination never finished") + return nil +} + +// TestConcurrent100Messages10Clients recovers the exact acknowledged records after concurrent writes. +func TestConcurrent100Messages10Clients(t *testing.T) { + // Arrange. + const clients = 10 + const messagesPerClient = 10 + const total = clients * messagesPerClient + ctrl := testController(t, nil) + actor := user(t, ctrl) + chatID := chat(t, ctrl, actor) + path := "/api/v1/chats/" + chatID + "/messages" + acknowledgements := make(chan map[string]any, total) + failures := make(chan error, total) + var writers sync.WaitGroup + + // Act. + for client := range clients { + writers.Go(func() { + for index := range messagesPerClient { + text := fmt.Sprintf("client %d message %d", client, index) + payload, err := json.Marshal(map[string]string{"text": text}) + if err != nil { + failures <- err + continue + } + status, body, err := request(ctrl, http.MethodPost, path, actor, payload) + if err != nil { + failures <- err + continue + } + if status != http.StatusCreated || body["text"] != text || body["sender_id"] != actor || body["chat_id"] != chatID { + failures <- fmt.Errorf("incorrect acknowledgement: status=%d, body=%v", status, body) + continue + } + acknowledgements <- body + } + }) + } + writers.Wait() + close(failures) + close(acknowledgements) + + // Assert. + for err := range failures { + t.Error(err) + } + if t.Failed() { + t.FailNow() + } + expected := make(map[string]map[string]any, total) + for message := range acknowledgements { + id, ok := message["id"].(string) + if !ok || id == "" { + t.Fatalf("invalid message ID: %v", message) + } + if _, duplicate := expected[id]; duplicate { + t.Fatalf("duplicate acknowledgement ID %s", id) + } + expected[id] = message + } + if len(expected) != total { + t.Fatalf("acknowledged=%d, want=%d", len(expected), total) + } + items := history(t, ctrl, actor, path) + if len(items) != total { + t.Fatalf("recovered=%d, want=%d", len(items), total) + } + for _, item := range items { + message := item.(map[string]any) + id := message["id"].(string) + if !reflect.DeepEqual(message, expected[id]) { + t.Fatalf("stored record differs from acknowledgement: got=%v, want=%v", message, expected[id]) + } + delete(expected, id) + } +} + +// TestUnsupportedMediaType checks rejection of unsupported request content types. +func TestUnsupportedMediaType(t *testing.T) { + // Arrange. + c := testController(t, nil) + req := httptest.NewRequest(http.MethodPost, "/api/v1/users", strings.NewReader(`{}`)) + req.Header.Set("Content-Type", "text/plain") + // Act. + r, e := c.server.Test(req) + + // Assert. + if e != nil { + t.Fatal(e) + } + defer func() { + _ = r.Body.Close() + }() + if r.StatusCode != http.StatusUnsupportedMediaType { + t.Fatalf("status %d", r.StatusCode) + } +} + +// TestConfigIndependentState prevents one application instance from accepting another's identity. +func TestConfigIndependentState(t *testing.T) { + // Arrange. + first := testController(t, nil) + actor := user(t, first) + second := testController(t, nil) + + // Act. + status, body, err := request(second, http.MethodGet, "/api/v1/users/me", actor, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusUnauthorized, body) + assertErrorCode(t, body, "unauthorized") +} + +// mustJSON encodes fixture payloads and reports preparation failures at the caller. +func mustJSON(t *testing.T, value any) []byte { + t.Helper() + payload, err := json.Marshal(value) + if err != nil { + t.Fatal(err) + } + return payload +} diff --git a/internal/controller/http/fiber/decode.go b/internal/controller/http/fiber/decode.go new file mode 100644 index 00000000..5ab57a37 --- /dev/null +++ b/internal/controller/http/fiber/decode.go @@ -0,0 +1,22 @@ +package fiber + +import ( + "mime" + + "github.com/gofiber/fiber/v2" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/strictjson" +) + +// decode checks HTTP media type and maps strict JSON decoding errors to API input errors. +func decode(ctx *fiber.Ctx, target any, requiredFields ...string) error { + mediaType, _, err := mime.ParseMediaType(ctx.Get(fiber.HeaderContentType)) + if err != nil || mediaType != fiber.MIMEApplicationJSON { + return errMedia + } + if err := strictjson.DecodeObject(ctx.Body(), target, requiredFields...); err != nil { + return service.ErrInvalid + } + return nil +} diff --git a/internal/controller/http/fiber/dependencies.go b/internal/controller/http/fiber/dependencies.go new file mode 100644 index 00000000..58a3a74d --- /dev/null +++ b/internal/controller/http/fiber/dependencies.go @@ -0,0 +1,9 @@ +package fiber + +import "context" + +// Readiness checks the dependencies required by the synchronous request path. +type Readiness interface { + // Ping reports whether requests can be safely served. + Ping(context.Context) error +} diff --git a/internal/controller/http/fiber/error_codes.go b/internal/controller/http/fiber/error_codes.go new file mode 100644 index 00000000..64decfa0 --- /dev/null +++ b/internal/controller/http/fiber/error_codes.go @@ -0,0 +1,22 @@ +package fiber + +const ( + // codeInvalid identifies malformed or invalid request input. + codeInvalid = "invalid_request" + // codeUnauthorized identifies an unresolved user identity. + codeUnauthorized = "unauthorized" + // codeNotFound deliberately covers both absent and inaccessible resources. + codeNotFound = "not_found" + // codeConflict identifies a violated uniqueness constraint. + codeConflict = "conflict" + // codeUnavailable identifies temporary admission or persistent capacity exhaustion. + codeUnavailable = "unavailable" + // codeRateLimited identifies exhaustion of the request token bucket. + codeRateLimited = "rate_limited" + // codeTooLarge identifies a request exceeding the transport byte budget. + codeTooLarge = "payload_too_large" + // codeMedia identifies an unsupported request media type. + codeMedia = "unsupported_media_type" + // codeInternal identifies a hidden unexpected failure. + codeInternal = "internal_error" +) diff --git a/internal/controller/http/fiber/error_registry.go b/internal/controller/http/fiber/error_registry.go new file mode 100644 index 00000000..d5e10075 --- /dev/null +++ b/internal/controller/http/fiber/error_registry.go @@ -0,0 +1,33 @@ +package fiber + +import ( + "net/http" + + "go.lab260.ru/fielderr" +) + +// NewErrorRegistry returns an immutable mapping of application statuses to HTTP codes. +// The registry is injected rather than installed in process-global state, allowing +// independent application instances in integration tests. +func NewErrorRegistry() (*fielderr.Registry, error) { + return fielderr.NewRegistry( + statusDefinition(codeInvalid, http.StatusBadRequest), + statusDefinition(codeUnauthorized, http.StatusUnauthorized), + statusDefinition(codeNotFound, http.StatusNotFound), + statusDefinition(codeConflict, http.StatusConflict), + statusDefinition(codeTooLarge, http.StatusRequestEntityTooLarge), + statusDefinition(codeMedia, http.StatusUnsupportedMediaType), + statusDefinition(codeRateLimited, http.StatusTooManyRequests), + statusDefinition(codeUnavailable, http.StatusServiceUnavailable), + statusDefinition(codeInternal, http.StatusInternalServerError), + ) +} + +// statusDefinition associates an application error code with its HTTP status. +func statusDefinition(name string, httpStatus int) fielderr.StatusDefinition { + return fielderr.StatusDefinition{ + Code: fielderr.NewStatusCode(name), + Name: name, + HTTPStatus: httpStatus, + } +} diff --git a/internal/controller/http/fiber/errors.go b/internal/controller/http/fiber/errors.go new file mode 100644 index 00000000..e183f8b3 --- /dev/null +++ b/internal/controller/http/fiber/errors.go @@ -0,0 +1,71 @@ +package fiber + +import ( + "errors" + "net/http" + + "github.com/gofiber/fiber/v2" + "github.com/google/uuid" + "go.lab260.ru/fielderr" + "go.uber.org/zap" + + httpmodel "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/http" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// handleErr normalizes a failure and writes the public error envelope. +func (ctrl *Controller) handleErr(ctx *fiber.Ctx, err error) error { + requestID := ctx.GetRespHeader(headerRequestID) + if requestID == "" { + requestID = uuid.NewString() + ctx.Set(headerRequestID, requestID) + } + err = publicError(normalizeTransportError(err)) + status, ok := fielderr.HTTPStatusFrom(ctrl.errorRegistry, err) + if !ok { + err = errInternal + status = http.StatusInternalServerError + } + if status == http.StatusUnauthorized { + challenge := `Bearer realm="messenger"` + if ctx.Path() == "/api/v1/auth/sessions" && ctx.Method() == http.MethodPost { + challenge = `Basic realm="messenger", charset="UTF-8"` + } + ctx.Set(fiber.HeaderWWWAuthenticate, challenge) + } + if status == http.StatusInternalServerError { + ctrl.log.Error("unexpected request failure", zap.String("request_id", requestID)) + } + return ctx.Status(status).JSON(errorResponse(err, requestID)) +} + +// normalizeTransportError maps Fiber failures to transport-independent application errors. +func normalizeTransportError(err error) error { + transportError, ok := errors.AsType[*fiber.Error](err) + if !ok { + return err + } + switch transportError.Code { + case http.StatusRequestEntityTooLarge: + return errTooLarge + case http.StatusNotFound, http.StatusMethodNotAllowed: + return service.ErrNotFound + case http.StatusBadRequest, http.StatusRequestTimeout, http.StatusRequestHeaderFieldsTooLarge: + return service.ErrInvalid + default: + return errInternal + } +} + +// errorResponse builds the public error envelope with its request identifier. +func errorResponse(err error, requestID string) httpmodel.ErrorResponse { + status, _ := fielderr.Status(err) + message, _ := fielderr.PublicMessage(err) + return httpmodel.ErrorResponse{ + Error: httpmodel.ErrorDetail{ + Code: status.String(), + Message: message, + RequestID: requestID, + }, + } +} diff --git a/internal/controller/http/fiber/errors_test.go b/internal/controller/http/fiber/errors_test.go new file mode 100644 index 00000000..1cde1271 --- /dev/null +++ b/internal/controller/http/fiber/errors_test.go @@ -0,0 +1,107 @@ +package fiber + +import ( + "encoding/json" + "errors" + "net/http" + "testing" + + "github.com/gofiber/fiber/v2" + "github.com/valyala/fasthttp" + "go.lab260.ru/fielderr" + + httpmodel "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/http" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// TestTransportErrorMapping checks safe API errors for framework-generated failures. +func TestTransportErrorMapping(t *testing.T) { + t.Run("large body", func(t *testing.T) { + if normalizeTransportError(fiber.ErrRequestEntityTooLarge) != errTooLarge { + t.Fatal("incorrect body-limit error") + } + }) + t.Run("method not allowed", func(t *testing.T) { + if normalizeTransportError(fiber.ErrMethodNotAllowed) != service.ErrNotFound { + t.Fatal("unexpected method error") + } + }) + t.Run("invalid request", func(t *testing.T) { + if normalizeTransportError(fiber.ErrBadRequest) != service.ErrInvalid { + t.Fatal("unexpected input error") + } + }) + t.Run("unexpected framework failure", func(t *testing.T) { + if normalizeTransportError(fiber.ErrInternalServerError) != errInternal { + t.Fatal("unexpected failure escaped normalization") + } + }) +} + +// TestController_handleErr writes a safe, correlated fallback response. +func TestController_handleErr(t *testing.T) { + t.Run("Negative: unknown internal error", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + raw := &fasthttp.RequestCtx{} + ctx := ctrl.server.AcquireCtx(raw) + defer ctrl.server.ReleaseCtx(ctx) + + // Act. + err := ctrl.handleErr(ctx, errors.New("private storage secret")) + + // Assert. + if err != nil { + t.Fatal(err) + } + if raw.Response.StatusCode() != http.StatusInternalServerError { + t.Fatalf("status=%d", raw.Response.StatusCode()) + } + var body httpmodel.ErrorResponse + if err := json.Unmarshal(raw.Response.Body(), &body); err != nil { + t.Fatal(err) + } + requestID := string(raw.Response.Header.Peek(headerRequestID)) + if requestID == "" || body.Error.RequestID != requestID { + t.Fatalf("uncorrelated error: %+v, header=%q", body, requestID) + } + if body.Error.Code != "internal_error" || body.Error.Message != "internal server error" { + t.Fatalf("unsafe fallback: %+v", body) + } + }) + + t.Run("Negative: missing status mapping", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + registry, err := fielderr.NewRegistry() + if err != nil { + t.Fatal(err) + } + ctrl.errorRegistry = registry + raw := &fasthttp.RequestCtx{} + ctx := ctrl.server.AcquireCtx(raw) + defer ctrl.server.ReleaseCtx(ctx) + + // Act. + err = ctrl.handleErr(ctx, service.ErrInvalid) + + // Assert. + if err != nil { + t.Fatal(err) + } + if raw.Response.StatusCode() != http.StatusInternalServerError { + t.Fatalf("status=%d", raw.Response.StatusCode()) + } + var body httpmodel.ErrorResponse + if err := json.Unmarshal(raw.Response.Body(), &body); err != nil { + t.Fatal(err) + } + requestID := string(raw.Response.Header.Peek(headerRequestID)) + if requestID == "" || body.Error.RequestID != requestID { + t.Fatalf("uncorrelated error: %+v, header=%q", body, requestID) + } + if body.Error.Code != "internal_error" || body.Error.Message != "internal server error" { + t.Fatalf("unsafe fallback: %+v", body) + } + }) +} diff --git a/internal/controller/http/fiber/fixtures_auth_test.go b/internal/controller/http/fiber/fixtures_auth_test.go new file mode 100644 index 00000000..7212eb67 --- /dev/null +++ b/internal/controller/http/fiber/fixtures_auth_test.go @@ -0,0 +1,61 @@ +package fiber + +import ( + "context" + "time" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/admission" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// fixtureAuthentication isolates HTTP decoding and business authorization from session persistence. +type fixtureAuthentication struct { + service service.Service +} + +// Register delegates profile validation to the real business service. +func (f fixtureAuthentication) Register(ctx context.Context, request dto.UsersCreateRequestDTO, _ string) (dto.UserDTO, error) { + return f.service.UsersCreate(ctx, request) +} + +// Authenticate uses fixture tokens equal to user IDs exclusively in controller tests. +func (f fixtureAuthentication) Authenticate(ctx context.Context, token string) (string, error) { + return token, f.service.UsersCheckIdentity(ctx, token) +} + +// Login is deliberately unsupported by this fixture; real login has separate integration coverage. +func (f fixtureAuthentication) Login(context.Context, string, string) (dto.SessionDTO, error) { + return dto.SessionDTO{}, service.ErrUnauthorized +} + +// Logout accepts the fixture session without persistent side effects. +func (f fixtureAuthentication) Logout(context.Context, string) error { + return nil +} + +type fixtureReadiness struct{} + +// Ping marks isolated controller fixtures ready without external resources. +func (fixtureReadiness) Ping(context.Context) error { + return nil +} + +type fixtureAdmission struct { + *admission.Limiter +} + +// Enter adapts the deterministic local policy fixture to the distributed boundary. +func (f *fixtureAdmission) Enter(_ context.Context, _, user string) (func(), error) { + if user != "" { + return func() { + }, nil + } + if !f.Allow(time.Now()) { + return nil, admission.ErrRate + } + if !f.Acquire() { + return nil, admission.ErrSlots + } + return f.Release, nil +} diff --git a/internal/controller/http/fiber/handlers.go b/internal/controller/http/fiber/handlers.go new file mode 100644 index 00000000..e5b5c4e6 --- /dev/null +++ b/internal/controller/http/fiber/handlers.go @@ -0,0 +1,96 @@ +package fiber + +import ( + "net/http" + + "github.com/gofiber/fiber/v2" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + httpmodel "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/http" +) + +// HandleUsersCreate decodes registration input and returns the created user. +func (ctrl *Controller) HandleUsersCreate(ctx *fiber.Ctx) error { + var request httpmodel.UsersCreateRequest + if err := decode(ctx, &request, "username", "display_name", "password"); err != nil { + return err + } + user, err := ctrl.auth.Register(ctx.UserContext(), dto.UsersCreateRequestDTO{ + Username: request.Username, + DisplayName: request.DisplayName, + }, request.Password) + if err != nil { + return err + } + return ctx.Status(http.StatusCreated).JSON(userResponse(user)) +} + +// HandleUsersGetMe returns the account selected by the validated session. +func (ctrl *Controller) HandleUsersGetMe(ctx *fiber.Ctx) error { + user, err := ctrl.service.UsersGetMe(ctx.UserContext(), identity(ctx)) + if err != nil { + return err + } + return ctx.Status(http.StatusOK).JSON(userResponse(user)) +} + +// HandleChatsCreate decodes the chat payload and returns the new chat. +func (ctrl *Controller) HandleChatsCreate(ctx *fiber.Ctx) error { + var request httpmodel.ChatsCreateRequest + if err := decode(ctx, &request, "title", "member_ids"); err != nil { + return err + } + chat, err := ctrl.service.ChatsCreate(ctx.UserContext(), dto.ChatsCreateRequestDTO{ + UserID: identity(ctx), + Title: request.Title, + MemberIDs: request.MemberIDs, + }) + if err != nil { + return err + } + return ctx.Status(http.StatusCreated).JSON(chatResponse(chat)) +} + +// HandleChatsGetByID delegates chat authorization and maps the accessible chat. +func (ctrl *Controller) HandleChatsGetByID(ctx *fiber.Ctx) error { + chat, err := ctrl.service.ChatsGetByID(ctx.UserContext(), identity(ctx), ctx.Params("chat_id")) + if err != nil { + return err + } + return ctx.Status(http.StatusOK).JSON(chatResponse(chat)) +} + +// HandleChatsGetPage returns the service's page of visible chats. +func (ctrl *Controller) HandleChatsGetPage(ctx *fiber.Ctx) error { + page, err := ctrl.service.ChatsGetPage(ctx.UserContext(), pageRequest(ctx)) + if err != nil { + return err + } + return ctx.Status(http.StatusOK).JSON(chatPageResponse(page)) +} + +// HandleMessagesCreate decodes text; the service derives and authorizes the sender. +func (ctrl *Controller) HandleMessagesCreate(ctx *fiber.Ctx) error { + var request httpmodel.MessagesCreateRequest + if err := decode(ctx, &request, "text"); err != nil { + return err + } + message, err := ctrl.service.MessagesCreate(ctx.UserContext(), dto.MessagesCreateRequestDTO{ + UserID: identity(ctx), + ChatID: ctx.Params("chat_id"), + Text: request.Text, + }) + if err != nil { + return err + } + return ctx.Status(http.StatusCreated).JSON(messageResponse(message)) +} + +// HandleMessagesGetPage returns the service's ordered history page. +func (ctrl *Controller) HandleMessagesGetPage(ctx *fiber.Ctx) error { + page, err := ctrl.service.MessagesGetPage(ctx.UserContext(), pageRequest(ctx)) + if err != nil { + return err + } + return ctx.Status(http.StatusOK).JSON(messagePageResponse(page)) +} diff --git a/internal/controller/http/fiber/headers.go b/internal/controller/http/fiber/headers.go new file mode 100644 index 00000000..d6991683 --- /dev/null +++ b/internal/controller/http/fiber/headers.go @@ -0,0 +1,7 @@ +package fiber + +const ( + headerUserID = "X-User-Id" + headerRequestID = "X-Request-Id" + retryAfterSeconds = 1 +) diff --git a/internal/controller/http/fiber/health.go b/internal/controller/http/fiber/health.go new file mode 100644 index 00000000..c800b21a --- /dev/null +++ b/internal/controller/http/fiber/health.go @@ -0,0 +1,28 @@ +package fiber + +import ( + "github.com/gofiber/fiber/v2" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// handleLive reports that the server process is running. +func (ctrl *Controller) handleLive(ctx *fiber.Ctx) error { + return ctx.JSON(fiber.Map{"status": "ok"}) +} + +// handleReady reports readiness unless shutdown has started. +func (ctrl *Controller) handleReady(ctx *fiber.Ctx) error { + if ctrl.stopping.Load() { + return errBusy + } + if err := ctrl.readiness.Ping(ctx.UserContext()); err != nil { + return errBusy + } + return ctrl.handleLive(ctx) +} + +// handleNotFound returns the application error for an unmatched route. +func (ctrl *Controller) handleNotFound(_ *fiber.Ctx) error { + return service.ErrNotFound +} diff --git a/internal/controller/http/fiber/lifecycle.go b/internal/controller/http/fiber/lifecycle.go new file mode 100644 index 00000000..455e213f --- /dev/null +++ b/internal/controller/http/fiber/lifecycle.go @@ -0,0 +1,70 @@ +package fiber + +import ( + "context" + "net" + "sync" + + "go.uber.org/zap" +) + +// Start opens the listener synchronously so Fx observes bind errors immediately. +// It must be called once per Controller; Stop terminates the serving goroutine. +func (ctrl *Controller) Start(ctx context.Context) error { + listener, err := net.Listen("tcp", ctrl.cfg.Bind()) + if err != nil { + return err + } + ready := make(chan struct{}) + go ctrl.serve(&acceptingListener{Listener: listener, ready: ready}) + select { + case <-ready: + ctrl.log.Info("http listener started", zap.String("address", listener.Addr().String())) + return nil + case err := <-ctrl.serveDone: + return err + case <-ctx.Done(): + _ = listener.Close() + return ctx.Err() + } +} + +// acceptingListener signals after fasthttp registers the listener and enters its +// accept loop. An OnListen hook runs earlier and cannot guarantee safe immediate Stop. +type acceptingListener struct { + // Listener is the bound socket owned by the HTTP lifecycle. + net.Listener + ready chan struct{} + once sync.Once +} + +// Accept marks the server as started before waiting for the next connection. +func (listener *acceptingListener) Accept() (net.Conn, error) { + listener.once.Do(func() { + close(listener.ready) + }) + return listener.Listener.Accept() +} + +// serve serves the listener and publishes its terminal result to the lifecycle. +func (ctrl *Controller) serve(listener net.Listener) { + ctrl.serveDone <- ctrl.server.Listener(listener) +} + +// Stop disables admission, closes the listener and drains active requests. +// The configured timeout is bounded by the caller's Fx shutdown context. +func (ctrl *Controller) Stop(ctx context.Context) error { + ctrl.stopping.Store(true) + ctx, cancel := context.WithTimeout(ctx, ctrl.cfg.ShutdownTimeout()) + defer cancel() + if err := ctrl.server.ShutdownWithContext(ctx); err != nil { + return err + } + select { + case err := <-ctrl.serveDone: + ctrl.log.Info("http listener stopped") + return err + case <-ctx.Done(): + return ctx.Err() + } +} diff --git a/internal/controller/http/fiber/lifecycle_test.go b/internal/controller/http/fiber/lifecycle_test.go new file mode 100644 index 00000000..ed9e1b47 --- /dev/null +++ b/internal/controller/http/fiber/lifecycle_test.go @@ -0,0 +1,132 @@ +package fiber + +import ( + "context" + "errors" + "net" + "net/http" + "testing" + "time" + + "github.com/gofiber/fiber/v2" +) + +// TestImmediateShutdown checks the startup/stop race without waiting for a first request. +func TestImmediateShutdown(t *testing.T) { + const repetitions = 10 + const stopDeadline = time.Second + for range repetitions { + // Arrange. + ctrl := testController(t, nil) + // Select an ephemeral test port after validating the normal application config. + ctrl.cfg.Host = "127.0.0.1" + ctrl.cfg.Port = 0 + if err := ctrl.Start(t.Context()); err != nil { + t.Fatal(err) + } + ctx, cancel := context.WithTimeout(t.Context(), stopDeadline) + // Act. + err := ctrl.Stop(ctx) + cancel() + // Assert. + if err != nil { + t.Fatalf("immediate shutdown leaked the listener or serve goroutine: %v", err) + } + } +} + +// TestController_Stop_ActiveRequestDeadline bounds draining while a real handler is still running. +func TestController_Stop_ActiveRequestDeadline(t *testing.T) { + // Arrange. + const deadline = 3 * time.Second + ctrl := testController(t, nil) + ctrl.cfg.Host = "127.0.0.1" + ctrl.cfg.Port = 0 + // Install one controlled handler to test lifecycle independently of business routes. + ctrl.createServer() + entered := make(chan struct{}) + release := make(chan struct{}) + address := make(chan string, 1) + ctrl.server.Hooks().OnListen(func(data fiber.ListenData) error { + address <- net.JoinHostPort(data.Host, data.Port) + return nil + }) + ctrl.server.Get("/blocked", func(ctx *fiber.Ctx) error { + close(entered) + <-release + return ctx.SendStatus(http.StatusOK) + }) + if err := ctrl.Start(t.Context()); err != nil { + t.Fatal(err) + } + client := &http.Client{Timeout: deadline} + completed := make(chan error, 1) + go func() { + response, err := client.Get("http://" + <-address + "/blocked") + if err == nil { + err = response.Body.Close() + } + completed <- err + }() + t.Cleanup(func() { + close(release) + select { + case err := <-completed: + if err != nil { + t.Error(err) + } + case <-time.After(deadline): + t.Error("blocked request did not terminate after release") + } + stopCtx, cancel := context.WithTimeout(context.Background(), deadline) + defer cancel() + if err := ctrl.Stop(stopCtx); err != nil { + t.Error(err) + } + }) + select { + case <-entered: + case <-time.After(deadline): + t.Fatal("request did not reach handler") + } + ctx, cancel := context.WithCancel(t.Context()) + cancel() + + // Act. + err := ctrl.Stop(ctx) + + // Assert. + if !errors.Is(err, context.Canceled) { + t.Fatalf("expected canceled drain, got %v", err) + } + if !ctrl.stopping.Load() { + t.Fatal("shutdown did not disable admission") + } +} + +// TestCanceledStartup closes its socket while server initialization is still blocked. +func TestCanceledStartup(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + ctrl.cfg.Host = "127.0.0.1" + ctrl.cfg.Port = 0 + release := make(chan struct{}) + ctrl.server.Hooks().OnListen(func(_ fiber.ListenData) error { + <-release + return nil + }) + ctx, cancel := context.WithCancel(t.Context()) + cancel() + // Act. + err := ctrl.Start(ctx) + close(release) + // Assert. + if !errors.Is(err, context.Canceled) { + t.Fatalf("expected canceled startup, got %v", err) + } + select { + case <-ctrl.serveDone: + case <-time.After(time.Second): + t.Fatal("serving goroutine leaked after canceled startup") + } +} diff --git a/internal/controller/http/fiber/mapping.go b/internal/controller/http/fiber/mapping.go new file mode 100644 index 00000000..3ceae8c8 --- /dev/null +++ b/internal/controller/http/fiber/mapping.go @@ -0,0 +1,77 @@ +package fiber + +import ( + "github.com/gofiber/fiber/v2" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + httpmodel "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/http" +) + +// userResponse converts a user DTO into its HTTP representation. +func userResponse(user dto.UserDTO) httpmodel.UserResponse { + return httpmodel.UserResponse{ + ID: user.ID.String(), + Username: user.Username, + DisplayName: user.DisplayName, + CreatedAt: user.CreatedAt, + } +} + +// chatResponse converts a chat DTO and its member identifiers into an HTTP response. +func chatResponse(chat dto.ChatDTO) httpmodel.ChatResponse { + members := make([]string, len(chat.MemberIDs)) + for index, id := range chat.MemberIDs { + members[index] = id.String() + } + return httpmodel.ChatResponse{ + ID: chat.ID.String(), + Title: chat.Title, + MemberIDs: members, + CreatedAt: chat.CreatedAt, + } +} + +// messageResponse converts a message DTO into its HTTP representation. +func messageResponse(message dto.MessageDTO) httpmodel.MessageResponse { + return httpmodel.MessageResponse{ + ID: message.ID.String(), + ChatID: message.ChatID.String(), + SenderID: message.SenderID.String(), + Text: message.Text, + CreatedAt: message.CreatedAt, + } +} + +// pageRequest extracts identity, resource and pagination parameters from the request. +func pageRequest(ctx *fiber.Ctx) dto.PageRequestDTO { + return dto.PageRequestDTO{ + UserID: identity(ctx), + ChatID: ctx.Params("chat_id"), + Limit: ctx.Query("limit"), + Cursor: ctx.Query("cursor"), + } +} + +// chatPageResponse converts a page of chat DTOs into an HTTP response. +func chatPageResponse(page dto.ChatPageDTO) httpmodel.ChatPageResponse { + response := httpmodel.ChatPageResponse{ + Items: make([]httpmodel.ChatResponse, len(page.Items)), + NextCursor: page.NextCursor, + } + for index, chat := range page.Items { + response.Items[index] = chatResponse(chat) + } + return response +} + +// messagePageResponse converts a page of message DTOs into an HTTP response. +func messagePageResponse(page dto.MessagePageDTO) httpmodel.MessagePageResponse { + response := httpmodel.MessagePageResponse{ + Items: make([]httpmodel.MessageResponse, len(page.Items)), + NextCursor: page.NextCursor, + } + for index, message := range page.Items { + response.Items[index] = messageResponse(message) + } + return response +} diff --git a/internal/controller/http/fiber/messages_test.go b/internal/controller/http/fiber/messages_test.go new file mode 100644 index 00000000..9efe0664 --- /dev/null +++ b/internal/controller/http/fiber/messages_test.go @@ -0,0 +1,270 @@ +package fiber + +import ( + "net/http" + "net/url" + "strings" + "testing" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" +) + +// TestController_MessagesCreate checks message validation and identity-derived sender fields. +func TestController_MessagesCreate(t *testing.T) { + t.Run("Positive: Unicode at rune limit", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + id := chat(t, ctrl, owner) + actor := owner + text := strings.Repeat("界", 4000) + payload := mustJSON(t, map[string]string{"text": text}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats/"+id+"/messages", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusCreated, body) + if body["sender_id"] != owner || body["chat_id"] != id || body["text"] != text { + t.Fatalf("message fields changed: %v", body) + } + }) + + t.Run("Negative: empty text", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + id := chat(t, ctrl, owner) + actor := owner + payload := mustJSON(t, map[string]string{"text": ""}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats/"+id+"/messages", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: whitespace text", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + id := chat(t, ctrl, owner) + actor := owner + payload := mustJSON(t, map[string]string{"text": " \n\t"}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats/"+id+"/messages", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: text exceeds rune limit", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + id := chat(t, ctrl, owner) + actor := owner + payload := mustJSON(t, map[string]string{"text": strings.Repeat("界", 4001)}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats/"+id+"/messages", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: sender spoof", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + id := chat(t, ctrl, owner) + actor := owner + outsider := user(t, ctrl) + payload := mustJSON(t, map[string]string{"text": "hello", "sender_id": outsider}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats/"+id+"/messages", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") + }) + + t.Run("Negative: outsider", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + id := chat(t, ctrl, owner) + actor := user(t, ctrl) + payload := mustJSON(t, map[string]string{"text": "hello"}) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats/"+id+"/messages", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusNotFound, body) + assertErrorCode(t, body, "not_found") + }) + + t.Run("Negative: authentication precedes JSON decoding", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + owner := user(t, ctrl) + id := chat(t, ctrl, owner) + actor := "" + payload := []byte(`{`) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/chats/"+id+"/messages", actor, payload) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusUnauthorized, body) + assertErrorCode(t, body, "unauthorized") + }) +} + +// TestController_MessagesGetPage rejects invalid pagination separately from access failures. +func TestController_MessagesGetPage(t *testing.T) { + cases := []struct { + name string + query string + outsider bool + status int + code string + }{ + {"Negative: zero limit", "limit=0", false, http.StatusBadRequest, "invalid_request"}, + {"Negative: limit above maximum", "limit=101", false, http.StatusBadRequest, "invalid_request"}, + {"Negative: negative limit", "limit=-1", false, http.StatusBadRequest, "invalid_request"}, + {"Negative: nonnumeric limit", "limit=x", false, http.StatusBadRequest, "invalid_request"}, + {"Negative: fractional limit", "limit=1.0", false, http.StatusBadRequest, "invalid_request"}, + {"Negative: malformed cursor", "cursor=invalid", false, http.StatusBadRequest, "invalid_request"}, + {"Negative: outsider", "", true, http.StatusNotFound, "not_found"}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + id := chat(t, ctrl, actor) + if tc.outsider { + actor = user(t, ctrl) + } + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/chats/"+id+"/messages?"+tc.query, actor, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, tc.status, body) + assertErrorCode(t, body, tc.code) + }) + } +} + +// TestController_MessageCursorScope rejects a continuation from another chat's history. +func TestController_MessageCursorScope(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + first := chat(t, ctrl, actor) + second := chat(t, ctrl, actor) + path := "/api/v1/chats/" + first + "/messages" + for _, text := range []string{"first", "second"} { + call(t, ctrl, http.MethodPost, path, actor, map[string]string{"text": text}, http.StatusCreated) + } + page := call(t, ctrl, http.MethodGet, path+"?limit=1", actor, nil, http.StatusOK) + token := page["next_cursor"].(string) + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/chats/"+second+"/messages?cursor="+url.QueryEscape(token), actor, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusBadRequest, body) + assertErrorCode(t, body, "invalid_request") +} + +// TestController_MessagePageLimitChange preserves continuation when the client changes page size. +func TestController_MessagePageLimitChange(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + path := "/api/v1/chats/" + chat(t, ctrl, actor) + "/messages" + for _, text := range []string{"first", "second", "third"} { + call(t, ctrl, http.MethodPost, path, actor, map[string]string{"text": text}, http.StatusCreated) + } + first := call(t, ctrl, http.MethodGet, path+"?limit=1", actor, nil, http.StatusOK) + token := first["next_cursor"].(string) + + // Act. + status, body, err := request(ctrl, http.MethodGet, path+"?limit=100&cursor="+url.QueryEscape(token), actor, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusOK, body) + items := body["items"].([]any) + if len(items) != 2 || body["next_cursor"] != nil { + t.Fatalf("unexpected final page: %v", body) + } + if items[0].(map[string]any)["text"] != "second" || items[1].(map[string]any)["text"] != "third" { + t.Fatalf("lost order or skipped messages: %v", items) + } +} + +// TestController_MessageCapacity preserves acknowledged data after rejecting an overflow write. +func TestController_MessageCapacity(t *testing.T) { + // Arrange. + ctrl := testController(t, func(cfg *config.Config) { + cfg.Memory.MaxMessages = 2 + }) + actor := user(t, ctrl) + path := "/api/v1/chats/" + chat(t, ctrl, actor) + "/messages" + first := call(t, ctrl, http.MethodPost, path, actor, map[string]string{"text": "first"}, http.StatusCreated) + second := call(t, ctrl, http.MethodPost, path, actor, map[string]string{"text": "second"}, http.StatusCreated) + + // Act. + status, body, err := request(ctrl, http.MethodPost, path, actor, []byte(`{"text":"rejected"}`)) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusServiceUnavailable, body) + assertErrorCode(t, body, "unavailable") + items := history(t, ctrl, actor, path) + if len(items) != 2 || items[0].(map[string]any)["id"] != first["id"] || items[1].(map[string]any)["id"] != second["id"] { + t.Fatalf("overflow changed acknowledged messages: %v", items) + } +} diff --git a/internal/controller/http/fiber/middleware.go b/internal/controller/http/fiber/middleware.go new file mode 100644 index 00000000..4bd2f817 --- /dev/null +++ b/internal/controller/http/fiber/middleware.go @@ -0,0 +1,81 @@ +package fiber + +import ( + "context" + "errors" + "strconv" + "time" + + "github.com/gofiber/fiber/v2" + "github.com/google/uuid" + "go.uber.org/zap" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/admission" +) + +// request assigns a request identifier, handles errors and logs the completed request. +func (ctrl *Controller) request(ctx *fiber.Ctx) error { + ctx.Set(headerRequestID, uuid.NewString()) + started := time.Now() + err := ctx.Next() + if err != nil { + err = ctrl.handleErr(ctx, err) + } + ctrl.logRequest(ctx, time.Since(started)) + return err +} + +// logRequest logs request metadata without including message contents. +func (ctrl *Controller) logRequest(ctx *fiber.Ctx, elapsed time.Duration) { + route := "unmatched" + if ctx.Route() != nil { + route = ctx.Route().Path + } + ctrl.log.Info("http request", + zap.String("method", ctx.Method()), + zap.String("route", route), + zap.Int("status", ctx.Response().StatusCode()), + zap.String("request_id", ctx.GetRespHeader(headerRequestID)), + zap.Duration("duration", elapsed), + ) +} + +// admit reserves global budgets and bounds downstream request work. +func (ctrl *Controller) admit(ctx *fiber.Ctx) error { + if ctrl.stopping.Load() { + return errBusy + } + requestCtx, cancel := context.WithTimeout(ctx.UserContext(), ctrl.cfg.Timeout()) + defer cancel() + ctx.SetUserContext(requestCtx) + release, err := ctrl.admission.Enter(requestCtx, requestGroup(ctx), "") + if err != nil { + return admissionError(ctx, err) + } + defer release() + return ctx.Next() +} + +// requireIdentity resolves the session before reserving per-user budgets. +func (ctrl *Controller) requireIdentity(ctx *fiber.Ctx) error { + user, err := ctrl.auth.Authenticate(ctx.UserContext(), bearer(ctx)) + if err != nil { + return err + } + ctx.Locals(identityKey, user) + release, err := ctrl.admission.Enter(ctx.UserContext(), requestGroup(ctx), user) + if err != nil { + return admissionError(ctx, err) + } + defer release() + return ctx.Next() +} + +// admissionError maps policy rejection and backend failure into HTTP-owned errors. +func admissionError(ctx *fiber.Ctx, err error) error { + ctx.Set(fiber.HeaderRetryAfter, strconv.Itoa(retryAfterSeconds)) + if errors.Is(err, admission.ErrRate) { + return errRateLimited + } + return errBusy +} diff --git a/internal/controller/http/fiber/middleware_test.go b/internal/controller/http/fiber/middleware_test.go new file mode 100644 index 00000000..653205db --- /dev/null +++ b/internal/controller/http/fiber/middleware_test.go @@ -0,0 +1,211 @@ +package fiber + +import ( + "net/http" + "testing" + "testing/synctest" + "time" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" +) + +// TestController_InFlightAdmission checks rejection, recovery and health exemption independently. +func TestController_InFlightAdmission(t *testing.T) { + cases := []struct { + name string + release bool + path string + status int + }{ + {"Negative: occupied execution slot", false, "/api/v1/users/me", http.StatusServiceUnavailable}, + {"Positive: released execution slot", true, "/api/v1/users/me", http.StatusUnauthorized}, + {"Positive: health bypasses occupied slot", false, "/health/live", http.StatusOK}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + ctrl := testController(t, func(cfg *config.Config) { + cfg.HTTP.Admission.MaxInFlight = 1 + }) + if !ctrl.admission.(*fixtureAdmission).Acquire() { + t.Fatal("fixture could not reserve slot") + } + if tc.release { + ctrl.admission.(*fixtureAdmission).Release() + } else { + t.Cleanup(ctrl.admission.(*fixtureAdmission).Release) + } + + // Act. + status, body, err := request(ctrl, http.MethodGet, tc.path, "", nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, tc.status, body) + }) + } +} + +// TestController_RateAdmission checks exhausted tokens without timing-dependent HTTP setup. +func TestController_RateAdmission(t *testing.T) { + t.Run("/api/v1/users/me", func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + // Arrange. + ctrl := testController(t, func(cfg *config.Config) { + cfg.HTTP.Admission.RequestsPerSecond = 1 + cfg.HTTP.Admission.Burst = 1 + }) + if !ctrl.admission.(*fixtureAdmission).Allow(time.Now()) { + t.Fatal("fixture token missing") + } + expected := http.StatusTooManyRequests + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/users/me", "", nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, expected, body) + }) + }) + + t.Run("/health/ready", func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + // Arrange. + ctrl := testController(t, func(cfg *config.Config) { + cfg.HTTP.Admission.RequestsPerSecond = 1 + cfg.HTTP.Admission.Burst = 1 + }) + if !ctrl.admission.(*fixtureAdmission).Allow(time.Now()) { + t.Fatal("fixture token missing") + } + expected := http.StatusOK + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/health/ready", "", nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, expected, body) + }) + }) +} + +// TestController_Draining checks each endpoint's admission policy during shutdown. +func TestController_Draining(t *testing.T) { + cases := []struct { + name string + path string + status int + }{ + {"Negative: readiness disabled", "/health/ready", http.StatusServiceUnavailable}, + {"Positive: liveness remains available", "/health/live", http.StatusOK}, + {"Negative: business requests rejected", "/api/v1/users/me", http.StatusServiceUnavailable}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + ctrl.stopping.Store(true) + + // Act. + status, body, err := request(ctrl, http.MethodGet, tc.path, "", nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, tc.status, body) + }) + } +} + +// TestController_UnknownRoute checks the public fallback for an unmatched path. +func TestController_UnknownRoute(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/missing", "", nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusNotFound, body) + assertErrorCode(t, body, "not_found") +} + +// TestController_New rejects each missing dependency independently. +func TestController_New(t *testing.T) { + t.Run("Negative: missing configuration", func(t *testing.T) { + // Arrange. + fixture := testController(t, nil) + + // Act. + ctrl, err := New(fixture.log, nil, fixture.service, fixture.errorRegistry, fixture.admission, fixture.auth, fixture.readiness) + + // Assert. + if err == nil || ctrl != nil { + t.Fatalf("incomplete controller accepted: %v, %v", ctrl, err) + } + }) + + t.Run("Negative: missing logger", func(t *testing.T) { + // Arrange. + fixture := testController(t, nil) + + // Act. + ctrl, err := New(nil, &fixture.cfg, fixture.service, fixture.errorRegistry, fixture.admission, fixture.auth, fixture.readiness) + + // Assert. + if err == nil || ctrl != nil { + t.Fatalf("incomplete controller accepted: %v, %v", ctrl, err) + } + }) + + t.Run("Negative: missing service", func(t *testing.T) { + // Arrange. + fixture := testController(t, nil) + + // Act. + ctrl, err := New(fixture.log, &fixture.cfg, nil, fixture.errorRegistry, fixture.admission, fixture.auth, fixture.readiness) + + // Assert. + if err == nil || ctrl != nil { + t.Fatalf("incomplete controller accepted: %v, %v", ctrl, err) + } + }) + + t.Run("Negative: missing registry", func(t *testing.T) { + // Arrange. + fixture := testController(t, nil) + + // Act. + ctrl, err := New(fixture.log, &fixture.cfg, fixture.service, nil, fixture.admission, fixture.auth, fixture.readiness) + + // Assert. + if err == nil || ctrl != nil { + t.Fatalf("incomplete controller accepted: %v, %v", ctrl, err) + } + }) + + t.Run("Negative: missing limiter", func(t *testing.T) { + // Arrange. + fixture := testController(t, nil) + + // Act. + ctrl, err := New(fixture.log, &fixture.cfg, fixture.service, fixture.errorRegistry, nil, fixture.auth, fixture.readiness) + + // Assert. + if err == nil || ctrl != nil { + t.Fatalf("incomplete controller accepted: %v, %v", ctrl, err) + } + }) +} diff --git a/internal/controller/http/fiber/public_errors.go b/internal/controller/http/fiber/public_errors.go new file mode 100644 index 00000000..416974c3 --- /dev/null +++ b/internal/controller/http/fiber/public_errors.go @@ -0,0 +1,51 @@ +package fiber + +import ( + "errors" + + "go.lab260.ru/fielderr" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +var ( + errBusy = publicFailure(codeUnavailable, "server is busy") + errRateLimited = publicFailure(codeRateLimited, "request rate exceeded") + errTooLarge = publicFailure(codeTooLarge, "request body is too large") + errMedia = publicFailure(codeMedia, "expected application/json") + errInternal = publicFailure(codeInternal, "internal server error") +) + +// publicFailure creates a transport-owned error with a safe API message. +func publicFailure(code, message string) error { + return fielderr.WithStatus(errors.New(message), fielderr.NewStatusCode(code), message) +} + +// publicError maps application failures into the public API envelope. +// Unknown errors receive a fixed response without exposing their details. +func publicError(err error) error { + switch { + case errors.Is(err, service.ErrUnavailable): + return publicFailure(codeUnavailable, "dependency unavailable") + case errors.Is(err, service.ErrInvalid): + return fielderr.WithStatus(err, fielderr.NewStatusCode(codeInvalid), "invalid request") + case errors.Is(err, service.ErrUnauthorized): + return fielderr.WithStatus(err, fielderr.NewStatusCode(codeUnauthorized), "unknown user identity") + case errors.Is(err, service.ErrNotFound): + return fielderr.WithStatus(err, fielderr.NewStatusCode(codeNotFound), "resource not found") + case errors.Is(err, service.ErrConflict): + return fielderr.WithStatus(err, fielderr.NewStatusCode(codeConflict), "username already exists") + case errors.Is(err, service.ErrCapacity): + return fielderr.WithStatus(err, fielderr.NewStatusCode(codeUnavailable), "in-memory storage capacity reached") + case errors.Is(err, errBusy): + return errBusy + case errors.Is(err, errRateLimited): + return errRateLimited + case errors.Is(err, errTooLarge): + return errTooLarge + case errors.Is(err, errMedia): + return errMedia + default: + return errInternal + } +} diff --git a/internal/controller/http/fiber/public_errors_test.go b/internal/controller/http/fiber/public_errors_test.go new file mode 100644 index 00000000..d26ff3f6 --- /dev/null +++ b/internal/controller/http/fiber/public_errors_test.go @@ -0,0 +1,43 @@ +package fiber + +import ( + "errors" + "fmt" + "testing" + + "go.lab260.ru/fielderr" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// TestPublicErrorSafety maps wrapped application failures without exposing internal details. +func TestPublicErrorSafety(t *testing.T) { + t.Run("wrapped application error", func(t *testing.T) { + err := publicError(fmt.Errorf("private database detail: %w", service.ErrConflict)) + response := errorResponse(err, "request") + if response.Error.Code != codeConflict || response.Error.Message != "username already exists" { + t.Fatalf("unexpected response: %+v", response) + } + }) + t.Run("unknown error", func(t *testing.T) { + err := publicError(errors.New("private database detail")) + if err != errInternal { + t.Fatalf("unexpected public error: %v", err) + } + }) + t.Run("foreign public status", func(t *testing.T) { + err := fielderr.WithStatus(errors.New("private detail"), fielderr.NewStatusCode(codeInvalid), "private detail") + if publicError(err) != errInternal { + t.Fatal("untrusted error metadata reached the public response") + } + }) +} + +// TestPublicErrorUnavailable keeps dependency details out of the public envelope. +func TestPublicErrorUnavailable(t *testing.T) { + err := publicError(fmt.Errorf("private database detail: %w", service.ErrUnavailable)) + response := errorResponse(err, "request") + if response.Error.Code != codeUnavailable || response.Error.Message != "dependency unavailable" { + t.Fatalf("unexpected response: %+v", response) + } +} diff --git a/internal/controller/http/fiber/routes.go b/internal/controller/http/fiber/routes.go new file mode 100644 index 00000000..1438d60c --- /dev/null +++ b/internal/controller/http/fiber/routes.go @@ -0,0 +1,22 @@ +package fiber + +// initRoutes registers health endpoints and authenticated application routes. +func (ctrl *Controller) initRoutes() { + ctrl.server.Get("/health/live", ctrl.handleLive) + ctrl.server.Get("/health/ready", ctrl.handleReady) + ctrl.server.Use(ctrl.admit) + ctrl.server.Post("/api/v1/users", ctrl.HandleUsersCreate) + + ctrl.server.Post("/api/v1/auth/sessions", ctrl.HandleLogin) + + api := ctrl.server.Group("/api/v1", ctrl.requireIdentity) + api.Delete("/auth/sessions/current", ctrl.HandleLogout) + api.Get("/users/me", ctrl.HandleUsersGetMe) + api.Post("/chats", ctrl.HandleChatsCreate) + api.Get("/chats", ctrl.HandleChatsGetPage) + api.Get("/chats/:chat_id", ctrl.HandleChatsGetByID) + api.Post("/chats/:chat_id/messages", ctrl.HandleMessagesCreate) + api.Get("/chats/:chat_id/messages", ctrl.HandleMessagesGetPage) + + ctrl.server.Use(ctrl.handleNotFound) +} diff --git a/internal/controller/http/fiber/users_test.go b/internal/controller/http/fiber/users_test.go new file mode 100644 index 00000000..61d7e35d --- /dev/null +++ b/internal/controller/http/fiber/users_test.go @@ -0,0 +1,130 @@ +package fiber + +import ( + "net/http" + "strings" + "testing" + + "github.com/google/uuid" +) + +// TestController_UsersCreate checks one registration contract scenario per subtest. +func TestController_UsersCreate(t *testing.T) { + cases := []struct { + name string + body string + status int + }{ + {"Positive: valid Unicode display name", `{"password":"fixture-password-123","username":"alice","display_name":"Алиса 👋"}`, http.StatusCreated}, + {"Positive: display name at rune limit", `{"password":"fixture-password-123","username":"alice","display_name":"` + strings.Repeat("👋", 100) + `"}`, http.StatusCreated}, + {"Negative: display name exceeds rune limit", `{"password":"fixture-password-123","username":"alice","display_name":"` + strings.Repeat("👋", 101) + `"}`, http.StatusBadRequest}, + {"Negative: uppercase username", `{"password":"fixture-password-123","username":"Alice","display_name":"Alice"}`, http.StatusBadRequest}, + {"Negative: malformed JSON", `{`, http.StatusBadRequest}, + {"Negative: null root", `null`, http.StatusBadRequest}, + {"Negative: array root", `[]`, http.StatusBadRequest}, + {"Negative: missing fields", `{}`, http.StatusBadRequest}, + {"Negative: null field", `{"password":"fixture-password-123","username":"alice","display_name":null}`, http.StatusBadRequest}, + {"Negative: wrong field type", `{"password":"fixture-password-123","username":5,"display_name":"Alice"}`, http.StatusBadRequest}, + {"Negative: unknown field", `{"password":"fixture-password-123","username":"alice","display_name":"Alice","unknown":"secret"}`, http.StatusBadRequest}, + {"Negative: field name case", `{"password":"fixture-password-123","Username":"alice","display_name":"Alice"}`, http.StatusBadRequest}, + {"Negative: duplicate field", `{"password":"fixture-password-123","username":"alice","username":"bob","display_name":"Alice"}`, http.StatusBadRequest}, + {"Negative: trailing object", `{"password":"fixture-password-123","username":"alice","display_name":"Alice"} {}`, http.StatusBadRequest}, + {"Negative: invalid UTF-8", "{\"username\":\"alice\",\"display_name\":\"\xff\"}", http.StatusBadRequest}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + + // Act. + status, body, err := request(ctrl, http.MethodPost, "/api/v1/users", "", []byte(tc.body)) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, tc.status, body) + if tc.status == http.StatusBadRequest { + assertErrorCode(t, body, "invalid_request") + return + } + if body["username"] != "alice" || body["display_name"] == "" { + t.Fatalf("registration fields changed: %v", body) + } + if _, err := uuid.Parse(body["id"].(string)); err != nil { + t.Fatalf("invalid assigned ID: %v", err) + } + }) + } +} + +// TestController_UsersGetMe verifies profile selection and authentication failures. +func TestController_UsersGetMe(t *testing.T) { + t.Run("Positive: own profile", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + actor := user(t, ctrl) + identity := actor + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/users/me", identity, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusOK, body) + if body["id"] != actor || body["display_name"] != "Алиса 👋" { + t.Fatalf("wrong profile: %v", body) + } + }) + + t.Run("Negative: missing identity", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + identity := "" + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/users/me", identity, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusUnauthorized, body) + assertErrorCode(t, body, "unauthorized") + }) + + t.Run("Negative: unknown identity", func(t *testing.T) { + // Arrange. + ctrl := testController(t, nil) + identity := uuid.NewString() + + // Act. + status, body, err := request(ctrl, http.MethodGet, "/api/v1/users/me", identity, nil) + + // Assert. + if err != nil { + t.Fatal(err) + } + assertHTTPStatus(t, status, http.StatusUnauthorized, body) + assertErrorCode(t, body, "unauthorized") + }) +} + +// assertHTTPStatus reports the response body alongside a mismatched status. +func assertHTTPStatus(t *testing.T, got, want int, body map[string]any) { + t.Helper() + if got != want { + t.Fatalf("status=%d, want=%d, body=%v", got, want, body) + } +} + +// assertErrorCode checks the documented error classification independently of status. +func assertErrorCode(t *testing.T, body map[string]any, want string) { + t.Helper() + envelope, ok := body["error"].(map[string]any) + if !ok || envelope["code"] != want { + t.Fatalf("error=%v, want code %q", body, want) + } +} diff --git a/internal/controller/interface.go b/internal/controller/interface.go new file mode 100644 index 00000000..46e9af5f --- /dev/null +++ b/internal/controller/interface.go @@ -0,0 +1,12 @@ +// Package controller connects transport lifecycles to Fx. +package controller + +import "context" + +// Controller is a process-owned transport server. +type Controller interface { + // Start acquires the listener and reports startup errors to the lifecycle owner. + Start(context.Context) error + // Stop stops accepting work and drains active requests within the supplied deadline. + Stop(context.Context) error +} diff --git a/internal/cursor/codec.go b/internal/cursor/codec.go new file mode 100644 index 00000000..92789f50 --- /dev/null +++ b/internal/cursor/codec.go @@ -0,0 +1,108 @@ +// Package cursor signs and verifies resource-bound keyset positions. +package cursor + +import ( + "crypto/hmac" + "crypto/rand" + "crypto/sha256" + "encoding/base64" + "encoding/json" + "errors" + "fmt" + "time" + + "github.com/google/uuid" +) + +const ( + cursorSigningKeyBytes = 32 + maxEncodedCursorBytes = 1024 +) + +// ErrInvalid means a cursor is malformed, tampered with or bound to another resource. +var ErrInvalid = errors.New("invalid cursor") + +// Position identifies the last record already returned by keyset pagination. +type Position struct { + // CreatedAt is the creation timestamp of the last returned record. + CreatedAt time.Time + // ID breaks ties between records sharing a timestamp. + ID uuid.UUID +} + +// Codec authenticates pagination positions with an immutable process-local key. +type Codec struct { + key [cursorSigningKeyBytes]byte +} + +type cursorPayload struct { + // Resource binds the position to a chat history or one user's chat list. + Resource string `json:"r"` + // Time is the creation timestamp of the last record in the previous page. + Time time.Time `json:"t"` + // ID breaks ties between records with the same creation timestamp. + ID uuid.UUID `json:"i"` +} + +// New creates a cursor codec with a random process-local signing key. +func New() (*Codec, error) { + codec := &Codec{} + if _, err := rand.Read(codec.key[:]); err != nil { + return nil, err + } + return codec, nil +} + +// Encode serializes and signs a pagination position bound to a resource. +func (codec *Codec) Encode(resource string, position Position) (string, error) { + payload, err := json.Marshal(cursorPayload{ + Resource: resource, + Time: position.CreatedAt, + ID: position.ID, + }) + if err != nil { + return "", fmt.Errorf("encode cursor: %w", err) + } + payload = append(payload, codec.signature(payload)...) + return base64.RawURLEncoding.EncodeToString(payload), nil +} + +// Decode verifies the cursor signature and extracts its resource-bound position. +func (codec *Codec) Decode(encoded, resource string) (Position, error) { + if encoded == "" { + return Position{}, nil + } + if len(encoded) > maxEncodedCursorBytes { + return Position{}, ErrInvalid + } + signed, err := base64.RawURLEncoding.DecodeString(encoded) + if err != nil || len(signed) <= sha256.Size { + return Position{}, ErrInvalid + } + boundary := len(signed) - sha256.Size + payload, signature := signed[:boundary], signed[boundary:] + if !hmac.Equal(signature, codec.signature(payload)) { + return Position{}, ErrInvalid + } + return decodeCursorPosition(payload, resource) +} + +// signature computes the HMAC-SHA256 authentication tag for a cursor payload. +func (codec *Codec) signature(payload []byte) []byte { + mac := hmac.New(sha256.New, codec.key[:]) + // hash.Hash.Write is documented to always return a nil error. + _, _ = mac.Write(payload) + return mac.Sum(nil) +} + +// decodeCursorPosition validates the decoded cursor resource and timestamp. +func decodeCursorPosition(payload []byte, resource string) (Position, error) { + var cursor cursorPayload + if err := json.Unmarshal(payload, &cursor); err != nil { + return Position{}, ErrInvalid + } + if cursor.Resource != resource || cursor.Time.IsZero() { + return Position{}, ErrInvalid + } + return Position{CreatedAt: cursor.Time, ID: cursor.ID}, nil +} diff --git a/internal/cursor/codec_test.go b/internal/cursor/codec_test.go new file mode 100644 index 00000000..56832367 --- /dev/null +++ b/internal/cursor/codec_test.go @@ -0,0 +1,179 @@ +package cursor + +import ( + "encoding/base64" + "errors" + "strings" + "testing" + "time" + + "github.com/google/uuid" +) + +// TestCodec_EncodeDecode preserves the complete position through an authenticated round trip. +func TestCodec_EncodeDecode(t *testing.T) { + // Arrange. + codec := newTestCodec(t) + position := Position{CreatedAt: time.Unix(1700000000, 123456789).UTC(), ID: uuid.New()} + + // Act. + encoded, err := codec.Encode("chats:alice", position) + + // Assert. + if err != nil { + t.Fatal(err) + } + if encoded == "" { + t.Fatal("encoded position is empty") + } + decoded, err := codec.Decode(encoded, "chats:alice") + if err != nil || decoded != position { + t.Fatalf("decoded=%v, want=%v, error=%v", decoded, position, err) + } +} + +// TestCodec_Decode checks first-page behavior and independent rejection conditions. +func TestCodec_Decode(t *testing.T) { + t.Run("Positive: empty token starts first page", func(t *testing.T) { + // Arrange. + codec := newTestCodec(t) + + // Act. + got, err := codec.Decode("", "chats:alice") + + // Assert. + if err != nil || got != (Position{}) { + t.Fatalf("first-page position=%v, error=%v", got, err) + } + }) + + t.Run("Negative: another resource", func(t *testing.T) { + // Arrange. + codec := newTestCodec(t) + encoded := encodeFixture(t, codec, "chats:alice") + + // Act. + got, err := codec.Decode(encoded, "chats:bob") + + // Assert. + if !errors.Is(err, ErrInvalid) || got != (Position{}) { + t.Fatalf("position=%v, error=%v", got, err) + } + }) + + t.Run("Negative: another process key", func(t *testing.T) { + // Arrange. + codec := newTestCodec(t) + encoded := encodeFixture(t, codec, "chats:alice") + codec = newTestCodec(t) + + // Act. + got, err := codec.Decode(encoded, "chats:alice") + + // Assert. + if !errors.Is(err, ErrInvalid) || got != (Position{}) { + t.Fatalf("position=%v, error=%v", got, err) + } + }) + + t.Run("Negative: tampered payload", func(t *testing.T) { + // Arrange. + codec := newTestCodec(t) + encoded := encodeFixture(t, codec, "chats:alice") + signed, err := base64.RawURLEncoding.DecodeString(encoded) + if err != nil { + t.Fatal(err) + } + signed[0] ^= 1 + encoded = base64.RawURLEncoding.EncodeToString(signed) + + // Act. + got, err := codec.Decode(encoded, "chats:alice") + + // Assert. + if !errors.Is(err, ErrInvalid) || got != (Position{}) { + t.Fatalf("position=%v, error=%v", got, err) + } + }) + + t.Run("Negative: oversized token", func(t *testing.T) { + // Arrange. + codec := newTestCodec(t) + encoded := strings.Repeat("a", 1025) + + // Act. + got, err := codec.Decode(encoded, "chats:alice") + + // Assert. + if !errors.Is(err, ErrInvalid) || got != (Position{}) { + t.Fatalf("position=%v, error=%v", got, err) + } + }) + + t.Run("Negative: malformed base64", func(t *testing.T) { + // Arrange. + codec := newTestCodec(t) + encoded := "!invalid!" + + // Act. + got, err := codec.Decode(encoded, "chats:alice") + + // Assert. + if !errors.Is(err, ErrInvalid) || got != (Position{}) { + t.Fatalf("position=%v, error=%v", got, err) + } + }) + + t.Run("Negative: signed malformed JSON", func(t *testing.T) { + // Arrange. + codec := newTestCodec(t) + encoded := signedPayload(codec, []byte("not JSON")) + + // Act. + got, err := codec.Decode(encoded, "chats:alice") + + // Assert. + if !errors.Is(err, ErrInvalid) || got != (Position{}) { + t.Fatalf("position=%v, error=%v", got, err) + } + }) + + t.Run("Negative: signed zero timestamp", func(t *testing.T) { + // Arrange. + codec := newTestCodec(t) + encoded := signedPayload(codec, []byte(`{"r":"chats:alice","t":"0001-01-01T00:00:00Z","i":"11111111-1111-1111-1111-111111111111"}`)) + + // Act. + got, err := codec.Decode(encoded, "chats:alice") + + // Assert. + if !errors.Is(err, ErrInvalid) || got != (Position{}) { + t.Fatalf("position=%v, error=%v", got, err) + } + }) +} + +// signedPayload creates authenticated malformed fixtures to isolate payload validation. +func signedPayload(codec *Codec, payload []byte) string { + return base64.RawURLEncoding.EncodeToString(append(payload, codec.signature(payload)...)) +} + +// newTestCodec creates an independent signing key for one scenario. +func newTestCodec(t *testing.T) *Codec { + t.Helper() + codec, err := New() + if err != nil { + t.Fatal(err) + } + return codec +} + +// encodeFixture prepares a valid token before testing a separate decoding condition. +func encodeFixture(t *testing.T, codec *Codec, resource string) string { + t.Helper() + token, err := codec.Encode(resource, Position{ID: uuid.New(), CreatedAt: time.Unix(1700000000, 0).UTC()}) + if err != nil { + t.Fatal(err) + } + return token +} diff --git a/internal/hashring/ring.go b/internal/hashring/ring.go new file mode 100644 index 00000000..f8c03623 --- /dev/null +++ b/internal/hashring/ring.go @@ -0,0 +1,62 @@ +// Package hashring implements immutable consistent hashing with virtual nodes. +package hashring + +import ( + "cmp" + "crypto/sha256" + "encoding/binary" + "fmt" + "slices" + "sort" + "strconv" +) + +type point struct { + hash uint64 + node string +} + +// Ring maps arbitrary keys to stable node identifiers. +type Ring struct { + points []point +} + +// New creates an order-independent ring and rejects ambiguous node identities. +func New(nodes []string, replicas int) (*Ring, error) { + if len(nodes) == 0 || replicas < 1 { + return nil, fmt.Errorf("nodes and positive virtual node count are required") + } + ring := &Ring{} + seen := make(map[string]bool) + for _, node := range nodes { + if node == "" || seen[node] { + return nil, fmt.Errorf("node identifiers must be unique and nonempty") + } + seen[node] = true + for index := range replicas { + ring.points = append(ring.points, point{hash: hash(node + ":" + strconv.Itoa(index)), node: node}) + } + } + slices.SortFunc(ring.points, func(a, b point) int { + if order := cmp.Compare(a.hash, b.hash); order != 0 { + return order + } + return cmp.Compare(a.node, b.node) + }) + return ring, nil +} + +// Owner selects the first virtual node clockwise from the key hash. +func (r *Ring) Owner(key string) string { + value := hash(key) + index := sort.Search(len(r.points), func(index int) bool { + return r.points[index].hash >= value + }) + return r.points[index%len(r.points)].node +} + +// hash maps a stable string into the ring's 64-bit coordinate space. +func hash(value string) uint64 { + sum := sha256.Sum256([]byte(value)) + return binary.BigEndian.Uint64(sum[:8]) +} diff --git a/internal/hashring/ring_test.go b/internal/hashring/ring_test.go new file mode 100644 index 00000000..56bd7625 --- /dev/null +++ b/internal/hashring/ring_test.go @@ -0,0 +1,73 @@ +package hashring + +import ( + "fmt" + "testing" +) + +// TestExpansionMovesOnlyKeysOwnedByNewNode verifies the consistent hashing invariant. +func TestExpansionMovesOnlyKeysOwnedByNewNode(t *testing.T) { + before, err := New([]string{"a", "b"}, 256) + if err != nil { + t.Fatal(err) + } + after, err := New([]string{"c", "b", "a"}, 256) + if err != nil { + t.Fatal(err) + } + moved := 0 + for index := range 100000 { + key := fmt.Sprint(index) + oldOwner, newOwner := before.Owner(key), after.Owner(key) + if oldOwner != newOwner { + moved++ + if newOwner != "c" { + t.Fatalf("existing nodes exchanged key %s", key) + } + } + } + fraction := float64(moved) / 100000 + if fraction < 0.2 || fraction > 0.45 { + t.Fatalf("unexpected moved fraction: %f", fraction) + } + t.Logf("100000 keys: moved=%d fraction=%.5f", moved, fraction) +} + +// TestRingRejectsAmbiguousConfiguration checks independent malformed rings. +func TestRingRejectsAmbiguousConfiguration(t *testing.T) { + cases := []struct { + name string + nodes []string + replicas int + }{ + {"empty", nil, 1}, + {"zero replicas", []string{"a"}, 0}, + {"empty node", []string{""}, 1}, + {"duplicate", []string{"a", "a"}, 1}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + if _, err := New(tc.nodes, tc.replicas); err == nil { + t.Fatal("invalid ring accepted") + } + }) + } +} + +// TestRingIgnoresInputOrder verifies that replicas agree despite configuration ordering. +func TestRingIgnoresInputOrder(t *testing.T) { + a, err := New([]string{"a", "b"}, 64) + if err != nil { + t.Fatal(err) + } + b, err := New([]string{"b", "a"}, 64) + if err != nil { + t.Fatal(err) + } + for index := range 1000 { + key := fmt.Sprint(index) + if a.Owner(key) != b.Owner(key) { + t.Fatal("node order changes ownership") + } + } +} diff --git a/internal/model/dto/models.go b/internal/model/dto/models.go new file mode 100644 index 00000000..78aea0b1 --- /dev/null +++ b/internal/model/dto/models.go @@ -0,0 +1,110 @@ +// Package dto defines the transport-independent data shared by service and store. +package dto + +import ( + "time" + + "github.com/google/uuid" +) + +// UserDTO is the public account profile without credentials. +type UserDTO struct { + // ID is the server-generated user identifier. + ID uuid.UUID + // Username is the unique lowercase ASCII account name. + Username string + // DisplayName is the display label, limited to 100 Unicode code points. + DisplayName string + // CreatedAt is the server-assigned UTC creation time. + CreatedAt time.Time +} + +// ChatDTO is a chat with immutable membership. +type ChatDTO struct { + // ID is the server-generated chat identifier. + ID uuid.UUID + // Title is the nonblank title, limited to 100 Unicode code points. + Title string + // MemberIDs contains the fixed set of users allowed to read and write the chat. + MemberIDs []uuid.UUID + // CreatedAt is the server-assigned UTC creation time. + CreatedAt time.Time +} + +// MessageDTO is an immutable message stored in a chat. +type MessageDTO struct { + // ID is the server-generated message identifier. + ID uuid.UUID + // ChatID identifies the owning chat. + ChatID uuid.UUID + // SenderID identifies the user resolved from the request identity. + SenderID uuid.UUID + // Text contains the original text, limited to 4000 Unicode code points. + Text string + // CreatedAt is the server-assigned UTC ordering timestamp. + CreatedAt time.Time +} + +// UsersCreateRequestDTO carries untrusted registration values into the service. +type UsersCreateRequestDTO struct { + // Username is the raw requested account name. + Username string + // DisplayName is the raw requested display label. + DisplayName string +} + +// ChatsCreateRequestDTO carries untrusted chat creation input. +type ChatsCreateRequestDTO struct { + // UserID is the caller identifier resolved from a validated session. + UserID string + // Title is the raw requested chat title. + Title string + // MemberIDs contains raw user UUIDs; the service checks uniqueness and membership. + MemberIDs []string +} + +// MessagesCreateRequestDTO carries untrusted message creation input. +type MessagesCreateRequestDTO struct { + // UserID is the authenticated caller identifier, never a supplied sender field. + UserID string + // ChatID is the raw chat UUID from the route. + ChatID string + // Text is the unmodified message text to validate. + Text string +} + +// PageRequestDTO carries raw pagination values for service-level validation. +type PageRequestDTO struct { + // UserID is the caller identifier resolved from a validated session. + UserID string + // ChatID is the requested chat UUID; it is unused when listing chats. + ChatID string + // Limit is the raw page size; empty selects the contract default. + Limit string + // Cursor is the opaque continuation token; empty starts at the beginning. + Cursor string +} + +// PositionDTO is a validated keyset boundary; its zero value starts a history. +type PositionDTO struct { + // CreatedAt is the timestamp of the last record already returned. + CreatedAt time.Time + // ID is the tie-breaking identifier of the last record already returned. + ID uuid.UUID +} + +// ChatPageDTO contains an ordered page of accessible chats. +type ChatPageDTO struct { + // Items contains at most the requested number of chats. + Items []ChatDTO + // NextCursor continues the same user-specific list; nil marks its current end. + NextCursor *string +} + +// MessagePageDTO contains an ordered page of chat history. +type MessagePageDTO struct { + // Items contains at most the requested number of messages. + Items []MessageDTO + // NextCursor continues the same chat history; nil marks its current end. + NextCursor *string +} diff --git a/internal/model/dto/session.go b/internal/model/dto/session.go new file mode 100644 index 00000000..9d1193cd --- /dev/null +++ b/internal/model/dto/session.go @@ -0,0 +1,13 @@ +package dto + +import "time" + +// SessionDTO is an issued session, exposing the raw token only at creation. +type SessionDTO struct { + // Token contains 256 random bits encoded for a Bearer header. + Token string + // ExpiresAt is an absolute UTC deadline which is not extended by reads. + ExpiresAt time.Time + // User is the authenticated account without credentials. + User UserDTO +} diff --git a/internal/model/http/models.go b/internal/model/http/models.go new file mode 100644 index 00000000..4ad10c8a --- /dev/null +++ b/internal/model/http/models.go @@ -0,0 +1,98 @@ +// Package http defines the public JSON boundary, separate from DTOs. +package http + +import "time" + +// UsersCreateRequest is the registration payload. +type UsersCreateRequest struct { + // Password is the unmodified Unicode registration secret. + Password string `json:"password"` + // Username is the unique lowercase ASCII username. + Username string `json:"username"` + // DisplayName is the user-visible name, limited to 100 Unicode code points. + DisplayName string `json:"display_name"` +} + +// ChatsCreateRequest is the chat payload. +type ChatsCreateRequest struct { + // Title is the nonblank chat title, limited to 100 Unicode code points. + Title string `json:"title"` + // MemberIDs contains unique user UUIDs, including the caller when creating a chat. + MemberIDs []string `json:"member_ids"` +} + +// MessagesCreateRequest is the message payload. +type MessagesCreateRequest struct { + // Text contains nonblank text, limited to 4000 Unicode code points. + Text string `json:"text"` +} + +// UserResponse is the public user model. +type UserResponse struct { + // ID is the canonical server-generated UUID. + ID string `json:"id"` + // Username is the unique lowercase ASCII username. + Username string `json:"username"` + // DisplayName is the user-visible name, limited to 100 Unicode code points. + DisplayName string `json:"display_name"` + // CreatedAt is the UTC creation time serialized as RFC 3339. + CreatedAt time.Time `json:"created_at"` +} + +// ChatResponse is the public chat model. +type ChatResponse struct { + // ID is the canonical server-generated UUID. + ID string `json:"id"` + // Title is the nonblank chat title, limited to 100 Unicode code points. + Title string `json:"title"` + // MemberIDs contains unique user UUIDs, including the caller when creating a chat. + MemberIDs []string `json:"member_ids"` + // CreatedAt is the UTC creation time serialized as RFC 3339. + CreatedAt time.Time `json:"created_at"` +} + +// MessageResponse is the public message model. +type MessageResponse struct { + // ID is the canonical server-generated UUID. + ID string `json:"id"` + // ChatID is the canonical UUID of the chat containing the message. + ChatID string `json:"chat_id"` + // SenderID is derived from the request identity, never from a client-supplied sender. + SenderID string `json:"sender_id"` + // Text contains nonblank text, limited to 4000 Unicode code points. + Text string `json:"text"` + // CreatedAt is the UTC creation time serialized as RFC 3339. + CreatedAt time.Time `json:"created_at"` +} + +// ChatPageResponse contains visible chats. +type ChatPageResponse struct { + // Items contains the ordered page records; an empty page is serialized as an empty array. + Items []ChatResponse `json:"items"` + // NextCursor is the opaque continuation token or null when the current page is last. + NextCursor *string `json:"next_cursor"` +} + +// MessagePageResponse contains the requested history page. +type MessagePageResponse struct { + // Items contains the ordered page records; an empty page is serialized as an empty array. + Items []MessageResponse `json:"items"` + // NextCursor is the opaque continuation token or null when the current page is last. + NextCursor *string `json:"next_cursor"` +} + +// ErrorResponse is the mandatory error envelope. +type ErrorResponse struct { + // Error contains the safe public error details. + Error ErrorDetail `json:"error"` +} + +// ErrorDetail never exposes internal errors or input contents. +type ErrorDetail struct { + // Code is one of the machine-readable error codes declared by the API contract. + Code string `json:"code"` + // Message is a safe public explanation without internal errors or input contents. + Message string `json:"message"` + // RequestID matches the X-Request-Id response header for log correlation. + RequestID string `json:"request_id"` +} diff --git a/internal/password/password.go b/internal/password/password.go new file mode 100644 index 00000000..630e1608 --- /dev/null +++ b/internal/password/password.go @@ -0,0 +1,54 @@ +// Package password implements a bounded Argon2id password KDF. +package password + +import ( + "crypto/rand" + "crypto/subtle" + "encoding/base64" + "strings" + + "golang.org/x/crypto/argon2" +) + +const ( + memoryKiB = 19 * 1024 + iterations = 2 + parallelism = 1 + saltBytes = 16 + hashBytes = 32 + prefix = "$argon2id$v=19$m=19456,t=2,p=1$" +) + +// Hasher implements password hashing without transport or storage dependencies. +type Hasher struct{} + +// Hash generates a salted Argon2id encoding using fixed resource bounds. +func (Hasher) Hash(password string) (string, error) { + salt := make([]byte, saltBytes) + if _, err := rand.Read(salt); err != nil { + return "", err + } + hash := argon2.IDKey([]byte(password), salt, iterations, memoryKiB, parallelism, hashBytes) + return prefix + base64.RawStdEncoding.EncodeToString(salt) + "$" + base64.RawStdEncoding.EncodeToString(hash), nil +} + +// Verify accepts only this application's bounded KDF encoding and compares in constant time. +func (Hasher) Verify(encoded, password string) bool { + if !strings.HasPrefix(encoded, prefix) { + return false + } + parts := strings.Split(strings.TrimPrefix(encoded, prefix), "$") + if len(parts) != 2 { + return false + } + salt, err := base64.RawStdEncoding.DecodeString(parts[0]) + if err != nil || len(salt) != saltBytes { + return false + } + expected, err := base64.RawStdEncoding.DecodeString(parts[1]) + if err != nil || len(expected) != hashBytes { + return false + } + actual := argon2.IDKey([]byte(password), salt, iterations, memoryKiB, parallelism, hashBytes) + return subtle.ConstantTimeCompare(actual, expected) == 1 +} diff --git a/internal/password/password_test.go b/internal/password/password_test.go new file mode 100644 index 00000000..565df62b --- /dev/null +++ b/internal/password/password_test.go @@ -0,0 +1,37 @@ +package password + +import ( + "strings" + "testing" +) + +// TestPasswordRoundTrip verifies long Unicode input without bcrypt-style truncation. +func TestPasswordRoundTrip(t *testing.T) { + password := strings.Repeat("🔐", 128) + hasher := Hasher{} + encoded, err := hasher.Hash(password) + if err != nil { + t.Fatal(err) + } + if !hasher.Verify(encoded, password) || hasher.Verify(encoded, password+"x") { + t.Fatal("password verification mismatch") + } + second, err := hasher.Hash(password) + if err != nil { + t.Fatal(err) + } + if encoded == second { + t.Fatal("salt reused") + } +} + +// TestPasswordRejectsInvalidEncoding checks corrupt or unbounded KDF descriptions. +func TestPasswordRejectsInvalidEncoding(t *testing.T) { + for _, encoded := range []string{"", "$argon2id$v=19$m=999999999,t=2,p=1$a$b", prefix + "x", prefix + "%%%$abc", prefix + "YWJj$abc", prefix + "AAAAAAAAAAAAAAAAAAAAAA$%%%", prefix + "AAAAAAAAAAAAAAAAAAAAAA$YWJj"} { + t.Run(encoded, func(t *testing.T) { + if (Hasher{}).Verify(encoded, "password") { + t.Fatal("invalid encoding accepted") + } + }) + } +} diff --git a/internal/service/auth.go b/internal/service/auth.go new file mode 100644 index 00000000..57a96c93 --- /dev/null +++ b/internal/service/auth.go @@ -0,0 +1,44 @@ +package service + +import ( + "context" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// Passwords is the password KDF boundary used by authentication. +type Passwords interface { + // Hash creates a salted password encoding. + Hash(password string) (string, error) + // Verify checks the supplied password against its encoding. + Verify(encoded, password string) bool +} + +// Accounts persists credentials and session validity independently of HTTP. +type Accounts interface { + // Register atomically stores a profile with credentials. + Register(context.Context, dto.UserDTO, string) (dto.UserDTO, error) + // Credentials looks up the password encoding and account profile. + Credentials(context.Context, string) (dto.UserDTO, string, error) + // SaveSession persists an opaque token digest and absolute expiry. + SaveSession(context.Context, string, uuid.UUID, time.Time) error + // SessionUser resolves an unexpired token digest. + SessionUser(context.Context, string) (uuid.UUID, error) + // RevokeSession invalidates a token digest. + RevokeSession(context.Context, string) error +} + +// Authentication defines registration and opaque session operations. +type Authentication interface { + // Register validates registration and persists a password-protected account. + Register(context.Context, dto.UsersCreateRequestDTO, string) (dto.UserDTO, error) + // Login verifies credentials and issues an opaque session. + Login(context.Context, string, string) (dto.SessionDTO, error) + // Authenticate resolves a valid token to its immutable owner. + Authenticate(context.Context, string) (string, error) + // Logout revokes the current token. + Logout(context.Context, string) error +} diff --git a/internal/service/authentication/service.go b/internal/service/authentication/service.go new file mode 100644 index 00000000..a1a76b99 --- /dev/null +++ b/internal/service/authentication/service.go @@ -0,0 +1,123 @@ +// Package authentication validates credentials and owns the session lifecycle. +package authentication + +import ( + "context" + "crypto/rand" + "crypto/sha256" + "encoding/base64" + "encoding/hex" + "errors" + "fmt" + "time" + "unicode/utf8" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service/production" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +const ( + minimumPasswordRunes = 12 + maximumPasswordRunes = 128 + tokenBytes = 32 +) + +// Service performs password and session operations through explicit boundaries. +type Service struct { + accounts service.Accounts + passwords service.Passwords + ttl time.Duration + dummyHash string +} + +// New validates dependencies and prepares the unknown-account verification hash. +func New(accounts service.Accounts, passwords service.Passwords, ttl time.Duration) (*Service, error) { + if accounts == nil || passwords == nil || ttl <= 0 { + return nil, fmt.Errorf("accounts, passwords and positive session TTL are required") + } + dummyHash, err := passwords.Hash("unknown-account-dummy-password") + if err != nil { + return nil, err + } + return &Service{accounts: accounts, passwords: passwords, ttl: ttl, dummyHash: dummyHash}, nil +} + +// Register checks profile and Unicode password bounds before hashing and persistence. +func (s *Service) Register(ctx context.Context, request dto.UsersCreateRequestDTO, password string) (dto.UserDTO, error) { + user, err := production.PrepareUser(request) + if err != nil || !validPassword(password) { + return dto.UserDTO{}, service.ErrInvalid + } + hash, err := s.passwords.Hash(password) + if err != nil { + return dto.UserDTO{}, err + } + user, err = s.accounts.Register(ctx, user, hash) + if errors.Is(err, store.ErrConflict) { + return dto.UserDTO{}, service.ErrConflict + } + return user, err +} + +// Login verifies credentials uniformly and persists a new session before returning its token. +func (s *Service) Login(ctx context.Context, username, password string) (dto.SessionDTO, error) { + if !validPassword(password) { + return dto.SessionDTO{}, service.ErrUnauthorized + } + user, hash, err := s.accounts.Credentials(ctx, username) + if err != nil && !errors.Is(err, store.ErrNotFound) { + return dto.SessionDTO{}, err + } + missing := errors.Is(err, store.ErrNotFound) + if missing { + hash = s.dummyHash + } + if !s.passwords.Verify(hash, password) || missing { + return dto.SessionDTO{}, service.ErrUnauthorized + } + random := make([]byte, tokenBytes) + if _, err := rand.Read(random); err != nil { + return dto.SessionDTO{}, err + } + token := base64.RawURLEncoding.EncodeToString(random) + expiry := time.Now().UTC().Add(s.ttl) + if err := s.accounts.SaveSession(ctx, digest(token), user.ID, expiry); err != nil { + return dto.SessionDTO{}, err + } + return dto.SessionDTO{Token: token, ExpiresAt: expiry, User: user}, nil +} + +// Authenticate checks absolute expiry in the source of truth on every request. +func (s *Service) Authenticate(ctx context.Context, token string) (string, error) { + decoded, err := base64.RawURLEncoding.DecodeString(token) + if err != nil || len(decoded) != tokenBytes { + return "", service.ErrUnauthorized + } + id, err := s.accounts.SessionUser(ctx, digest(token)) + if errors.Is(err, store.ErrNotFound) { + return "", service.ErrUnauthorized + } + if err != nil { + return "", err + } + return id.String(), nil +} + +// Logout removes the current session from the authoritative store. +func (s *Service) Logout(ctx context.Context, token string) error { + return s.accounts.RevokeSession(ctx, digest(token)) +} + +// digest produces the storage key without persisting the bearer secret. +func digest(token string) string { + hash := sha256.Sum256([]byte(token)) + return hex.EncodeToString(hash[:]) +} + +// validPassword enforces the contract in Unicode code points without truncation. +func validPassword(password string) bool { + count := utf8.RuneCountInString(password) + return utf8.ValidString(password) && count >= minimumPasswordRunes && count <= maximumPasswordRunes +} diff --git a/internal/service/authentication/service_test.go b/internal/service/authentication/service_test.go new file mode 100644 index 00000000..3a8d8ca7 --- /dev/null +++ b/internal/service/authentication/service_test.go @@ -0,0 +1,232 @@ +package authentication + +import ( + "context" + "errors" + "strings" + "testing" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +type accountFixture struct { + user dto.UserDTO + hash string + tokenHash string + expiry time.Time + failure error + registerFailure error + saveFailure error +} + +// Register captures one synthetic account or a prescribed persistence failure. +func (f *accountFixture) Register(_ context.Context, user dto.UserDTO, hash string) (dto.UserDTO, error) { + f.user = user + f.hash = hash + return user, f.registerFailure +} + +// Credentials returns the fixture account and its password encoding. +func (f *accountFixture) Credentials(context.Context, string) (dto.UserDTO, string, error) { + return f.user, f.hash, f.failure +} + +// SaveSession captures the digest and absolute expiry without storing the raw token. +func (f *accountFixture) SaveSession(_ context.Context, hash string, _ uuid.UUID, expiry time.Time) error { + f.tokenHash = hash + f.expiry = expiry + return f.saveFailure +} + +// SessionUser implements expiry and revocation for the service unit fixture. +func (f *accountFixture) SessionUser(_ context.Context, hash string) (uuid.UUID, error) { + if f.failure != nil { + return uuid.Nil, f.failure + } + if hash != f.tokenHash || !f.expiry.After(time.Now()) { + return uuid.Nil, store.ErrNotFound + } + return f.user.ID, nil +} + +// RevokeSession invalidates the fixture digest. +func (f *accountFixture) RevokeSession(context.Context, string) error { + f.tokenHash = "" + return f.failure +} + +type passwordFixture struct { + failure error +} + +// Hash creates an intentionally noncryptographic encoding for service-only unit tests. +func (f passwordFixture) Hash(password string) (string, error) { + return "fixture:" + password, f.failure +} + +// Verify compares only test fixture encodings; production uses Argon2id. +func (passwordFixture) Verify(encoded, password string) bool { + return encoded == "fixture:"+password +} + +// authFixture assembles deterministic service boundaries. +func authFixture(t *testing.T) (*Service, *accountFixture) { + t.Helper() + accounts := &accountFixture{user: dto.UserDTO{ID: uuid.New(), Username: "alice"}, hash: "fixture:synthetic-password"} + s, err := New(accounts, passwordFixture{}, time.Hour) + if err != nil { + t.Fatal(err) + } + return s, accounts +} + +// TestRegisterValidatesPassword checks contract boundaries without truncation. +func TestRegisterValidatesPassword(t *testing.T) { + cases := []struct { + name string + password string + valid bool + }{ + {"short", "short", false}, + {"minimum", strings.Repeat("a", 12), true}, + {"unicode maximum", strings.Repeat("🔐", 128), true}, + {"too long", strings.Repeat("a", 129), false}, + {"invalid UTF8", strings.Repeat("a", 12) + "\xff", false}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + s, _ := authFixture(t) + _, err := s.Register(t.Context(), dto.UsersCreateRequestDTO{Username: "alice", DisplayName: "Alice"}, tc.password) + if (err == nil) != tc.valid { + t.Fatalf("unexpected registration result: %v", err) + } + }) + } +} + +// TestRegisterConflictMapsToApplicationError verifies uniqueness error translation. +func TestRegisterConflictMapsToApplicationError(t *testing.T) { + s, accounts := authFixture(t) + accounts.registerFailure = store.ErrConflict + _, err := s.Register(t.Context(), dto.UsersCreateRequestDTO{Username: "alice", DisplayName: "Alice"}, "synthetic-password") + if !errors.Is(err, service.ErrConflict) { + t.Fatal(err) + } +} + +// TestRegisterHashFailurePreservesCause checks KDF failures before persistence. +func TestRegisterHashFailurePreservesCause(t *testing.T) { + s, _ := authFixture(t) + failure := errors.New("KDF unavailable") + s.passwords = passwordFixture{failure: failure} + _, err := s.Register(t.Context(), dto.UsersCreateRequestDTO{Username: "alice", DisplayName: "Alice"}, "synthetic-password") + if !errors.Is(err, failure) { + t.Fatal(err) + } +} + +// TestLoginPersistsOnlyTokenDigest checks issued entropy, owner and deadline together. +func TestLoginPersistsOnlyTokenDigest(t *testing.T) { + s, accounts := authFixture(t) + session, err := s.Login(t.Context(), "alice", "synthetic-password") + if err != nil { + t.Fatal(err) + } + if session.Token == accounts.tokenHash || len(accounts.tokenHash) != 64 || session.User.ID != accounts.user.ID || !session.ExpiresAt.Equal(accounts.expiry) { + t.Fatal("invalid issued session") + } + id, err := s.Authenticate(t.Context(), session.Token) + if err != nil || id != accounts.user.ID.String() { + t.Fatalf("session does not authenticate its owner: %v", err) + } +} + +// TestLoginRejectsCredentials checks independent authentication rejection scenarios. +func TestLoginRejectsCredentials(t *testing.T) { + cases := []struct { + name string + password string + failure error + expected error + }{ + {"short password", "short", nil, service.ErrUnauthorized}, + {"wrong password", "incorrect-password", nil, service.ErrUnauthorized}, + {"missing account", "synthetic-password", store.ErrNotFound, service.ErrUnauthorized}, + {"database unavailable", "synthetic-password", context.DeadlineExceeded, context.DeadlineExceeded}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + s, accounts := authFixture(t) + accounts.failure = tc.failure + _, err := s.Login(t.Context(), "alice", tc.password) + if !errors.Is(err, tc.expected) { + t.Fatalf("expected %v, got %v", tc.expected, err) + } + }) + } +} + +// TestLoginDoesNotReturnUnpersistedSession checks failure after successful password verification. +func TestLoginDoesNotReturnUnpersistedSession(t *testing.T) { + s, accounts := authFixture(t) + accounts.saveFailure = context.DeadlineExceeded + session, err := s.Login(t.Context(), "alice", "synthetic-password") + if !errors.Is(err, context.DeadlineExceeded) || session.Token != "" { + t.Fatal("unpersisted session escaped") + } +} + +// TestAuthenticateRejectsUnknownToken checks malformed and correctly encoded unknown tokens. +func TestAuthenticateRejectsUnknownToken(t *testing.T) { + for _, token := range []string{"", "%%%", strings.Repeat("A", 43)} { + t.Run(token, func(t *testing.T) { + s, _ := authFixture(t) + if _, err := s.Authenticate(t.Context(), token); !errors.Is(err, service.ErrUnauthorized) { + t.Fatal(err) + } + }) + } +} + +// TestAuthenticatePropagatesDatabaseFailure prevents trusting a token during an outage. +func TestAuthenticatePropagatesDatabaseFailure(t *testing.T) { + s, accounts := authFixture(t) + accounts.failure = context.DeadlineExceeded + if _, err := s.Authenticate(t.Context(), strings.Repeat("A", 43)); !errors.Is(err, context.DeadlineExceeded) { + t.Fatal(err) + } +} + +// TestLogoutRevokesIssuedToken checks that the same token cannot be reused. +func TestLogoutRevokesIssuedToken(t *testing.T) { + s, _ := authFixture(t) + session, err := s.Login(t.Context(), "alice", "synthetic-password") + if err != nil { + t.Fatal(err) + } + if err := s.Logout(t.Context(), session.Token); err != nil { + t.Fatal(err) + } + if _, err := s.Authenticate(t.Context(), session.Token); !errors.Is(err, service.ErrUnauthorized) { + t.Fatal("revoked token authenticated") + } +} + +// TestNewRejectsIncompleteDependencies checks constructor validation and KDF startup failure. +func TestNewRejectsIncompleteDependencies(t *testing.T) { + t.Run("missing accounts", func(t *testing.T) { + if _, err := New(nil, passwordFixture{}, time.Hour); err == nil { + t.Fatal("missing accounts accepted") + } + }) + t.Run("hash failure", func(t *testing.T) { + if _, err := New(&accountFixture{}, passwordFixture{failure: context.Canceled}, time.Hour); !errors.Is(err, context.Canceled) { + t.Fatal(err) + } + }) +} diff --git a/internal/service/cache.go b/internal/service/cache.go new file mode 100644 index 00000000..2eee452e --- /dev/null +++ b/internal/service/cache.go @@ -0,0 +1,17 @@ +package service + +import ( + "context" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// ProfileCache stores immutable public account profiles; misses fall back to PostgreSQL. +type ProfileCache interface { + // GetProfile returns a cached profile or a miss, including on backend failure. + GetProfile(context.Context, uuid.UUID) (dto.UserDTO, bool) + // PutProfile stores a bounded-lifetime profile on a best-effort basis. + PutProfile(context.Context, dto.UserDTO) +} diff --git a/internal/service/cursor.go b/internal/service/cursor.go new file mode 100644 index 00000000..17850d82 --- /dev/null +++ b/internal/service/cursor.go @@ -0,0 +1,12 @@ +package service + +import "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + +// CursorCodec defines the pagination operations required by application services. +type CursorCodec interface { + // Encode signs a position for the specified resource. + Encode(resource string, position cursor.Position) (string, error) + + // Decode verifies a token and returns its position; empty tokens start a page sequence. + Decode(encoded, resource string) (cursor.Position, error) +} diff --git a/internal/service/errors.go b/internal/service/errors.go new file mode 100644 index 00000000..d15e0af8 --- /dev/null +++ b/internal/service/errors.go @@ -0,0 +1,23 @@ +package service + +import ( + "errors" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +var ( + // ErrUnavailable preserves the dependency failure category across service boundaries. + ErrUnavailable = store.ErrUnavailable + + // ErrInvalid indicates invalid operation input. + ErrInvalid = errors.New("invalid request") + // ErrUnauthorized indicates an unresolved current user. + ErrUnauthorized = errors.New("unknown user identity") + // ErrNotFound hides both absent and inaccessible resources. + ErrNotFound = errors.New("resource not found") + // ErrConflict indicates a duplicate username. + ErrConflict = errors.New("username already exists") + // ErrCapacity indicates exhausted storage capacity without eviction. + ErrCapacity = errors.New("in-memory storage capacity reached") +) diff --git a/internal/service/interface.go b/internal/service/interface.go new file mode 100644 index 00000000..0baac14a --- /dev/null +++ b/internal/service/interface.go @@ -0,0 +1,36 @@ +// Package service defines the application operations consumed by HTTP controllers. +package service + +import ( + "context" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// Service validates raw input and enforces identity and membership requirements. +// Implementations must not expose transport-specific types or storage internals. +type Service interface { + // UsersCreate registers a user or reports invalid input, conflict or capacity exhaustion. + UsersCreate(ctx context.Context, request dto.UsersCreateRequestDTO) (dto.UserDTO, error) + + // UsersCheckIdentity verifies that an identity belongs to an existing user. + UsersCheckIdentity(ctx context.Context, userID string) error + + // UsersGetMe resolves the authenticated caller, rejecting malformed or unknown identifiers. + UsersGetMe(ctx context.Context, userID string) (dto.UserDTO, error) + + // ChatsCreate validates all members and creates one chat atomically. + ChatsCreate(ctx context.Context, request dto.ChatsCreateRequestDTO) (dto.ChatDTO, error) + + // ChatsGetByID hides missing and inaccessible chats behind the same not-found result. + ChatsGetByID(ctx context.Context, userID, chatID string) (dto.ChatDTO, error) + + // ChatsGetPage lists only chats visible to the caller, using resource-bound cursors. + ChatsGetPage(ctx context.Context, request dto.PageRequestDTO) (dto.ChatPageDTO, error) + + // MessagesCreate derives the sender from the identity and appends validated text. + MessagesCreate(ctx context.Context, request dto.MessagesCreateRequestDTO) (dto.MessageDTO, error) + + // MessagesGetPage authorizes the caller and returns history after a verified cursor. + MessagesGetPage(ctx context.Context, request dto.PageRequestDTO) (dto.MessagePageDTO, error) +} diff --git a/internal/service/production/access.go b/internal/service/production/access.go new file mode 100644 index 00000000..6510a335 --- /dev/null +++ b/internal/service/production/access.go @@ -0,0 +1,62 @@ +package production + +import ( + "context" + "slices" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// parseIdentity maps malformed identity values to the authentication error. +func parseIdentity(rawID string) (uuid.UUID, error) { + id, err := parseID(rawID) + if err != nil { + return uuid.Nil, service.ErrUnauthorized + } + return id, nil +} + +// requireUserID resolves an existing identity without loading a user profile. +func (s *Service) requireUserID(ctx context.Context, rawID string) (uuid.UUID, error) { + id, err := parseIdentity(rawID) + if err != nil { + return uuid.Nil, err + } + exists, err := s.repo.UsersExist(ctx, []uuid.UUID{id}) + if err != nil { + return uuid.Nil, normalizeStoreError(err) + } + if !exists { + return uuid.Nil, service.ErrUnauthorized + } + return id, nil +} + +// requireChatMember resolves an existing caller and a chat available to that caller. +func (s *Service) requireChatMember(ctx context.Context, userID, chatID string) (uuid.UUID, dto.ChatDTO, error) { + caller, err := s.requireUserID(ctx, userID) + if err != nil { + return uuid.Nil, dto.ChatDTO{}, err + } + chat, err := s.findChat(ctx, chatID) + if err != nil { + return uuid.Nil, dto.ChatDTO{}, err + } + if !slices.Contains(chat.MemberIDs, caller) { + return uuid.Nil, dto.ChatDTO{}, service.ErrNotFound + } + return caller, chat, nil +} + +// findChat parses a chat identifier and translates storage lookup errors. +func (s *Service) findChat(ctx context.Context, rawID string) (dto.ChatDTO, error) { + id, err := parseID(rawID) + if err != nil { + return dto.ChatDTO{}, err + } + chat, err := s.repo.Chat(ctx, id) + return chat, normalizeStoreError(err) +} diff --git a/internal/service/production/cache_test.go b/internal/service/production/cache_test.go new file mode 100644 index 00000000..fb6e97d5 --- /dev/null +++ b/internal/service/production/cache_test.go @@ -0,0 +1,84 @@ +package production + +import ( + "context" + "testing" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +type cacheFixture struct { + profile dto.UserDTO + hit bool + writes int +} + +// GetProfile returns the arranged optional-cache lookup outcome. +func (f *cacheFixture) GetProfile(context.Context, uuid.UUID) (dto.UserDTO, bool) { + return f.profile, f.hit +} + +// PutProfile records successful cache population from authoritative data. +func (f *cacheFixture) PutProfile(_ context.Context, user dto.UserDTO) { + f.profile = user + f.writes++ +} + +// TestProfileCacheHitAvoidsProfileQuery verifies that the cache has a concrete role. +func TestProfileCacheHitAvoidsProfileQuery(t *testing.T) { + codec, err := cursor.New() + if err != nil { + t.Fatal(err) + } + cache := &cacheFixture{profile: dto.UserDTO{ID: uuid.New()}, hit: true} + svc, err := NewCached(&storeStub{t: t}, codec, cache) + if err != nil { + t.Fatal(err) + } + got, err := svc.UsersGetMe(t.Context(), cache.profile.ID.String()) + if err != nil || got.ID != cache.profile.ID { + t.Fatalf("cache hit ignored: %v", err) + } +} + +// TestProfileCacheMissPopulatesAfterDatabaseRead checks the authoritative fallback. +func TestProfileCacheMissPopulatesAfterDatabaseRead(t *testing.T) { + codec, err := cursor.New() + if err != nil { + t.Fatal(err) + } + id := uuid.New() + repo := &storeStub{t: t, user: func(context.Context, uuid.UUID) (dto.UserDTO, error) { + return dto.UserDTO{ID: id}, nil + }} + cache := &cacheFixture{} + svc, err := NewCached(repo, codec, cache) + if err != nil { + t.Fatal(err) + } + got, err := svc.UsersGetMe(t.Context(), id.String()) + if err != nil || got.ID != id || cache.writes != 1 { + t.Fatalf("fallback failed: %v", err) + } +} + +// TestCachedServiceRejectsMissingDependencies checks explicit service boundaries. +func TestCachedServiceRejectsMissingDependencies(t *testing.T) { + t.Run("store", func(t *testing.T) { + if _, err := NewCached(nil, nil, &cacheFixture{}); err == nil { + t.Fatal("missing store accepted") + } + }) + t.Run("cache", func(t *testing.T) { + codec, err := cursor.New() + if err != nil { + t.Fatal(err) + } + if _, err := NewCached(&storeStub{t: t}, codec, nil); err == nil { + t.Fatal("missing cache accepted") + } + }) +} diff --git a/internal/service/production/chats.go b/internal/service/production/chats.go new file mode 100644 index 00000000..56ef0e52 --- /dev/null +++ b/internal/service/production/chats.go @@ -0,0 +1,47 @@ +package production + +import ( + "context" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// ChatsCreate resolves the caller, validates the proposed chat and persists it atomically. +func (s *Service) ChatsCreate(ctx context.Context, request dto.ChatsCreateRequestDTO) (dto.ChatDTO, error) { + caller, err := s.requireUserID(ctx, request.UserID) + if err != nil { + return dto.ChatDTO{}, err + } + chat, err := prepareChat(request, caller) + if err != nil { + return dto.ChatDTO{}, err + } + if err := s.requireExistingMembers(ctx, chat.MemberIDs); err != nil { + return dto.ChatDTO{}, err + } + created, err := s.repo.CreateChat(ctx, chat) + return created, normalizeStoreError(err) +} + +// ChatsGetByID returns a chat only to a current member, hiding its existence otherwise. +func (s *Service) ChatsGetByID(ctx context.Context, userID, chatID string) (dto.ChatDTO, error) { + _, chat, err := s.requireChatMember(ctx, userID, chatID) + return chat, err +} + +// ChatsGetPage authorizes the caller, loads a page and prepares its continuation. +func (s *Service) ChatsGetPage(ctx context.Context, request dto.PageRequestDTO) (dto.ChatPageDTO, error) { + caller, err := s.requireUserID(ctx, request.UserID) + if err != nil { + return dto.ChatPageDTO{}, err + } + page, err := s.parsePage(request, chatListResource(caller)) + if err != nil { + return dto.ChatPageDTO{}, err + } + items, err := s.repo.Chats(ctx, caller, page.position, page.fetchLimit()) + if err != nil { + return dto.ChatPageDTO{}, normalizeStoreError(err) + } + return s.chatPage(items, page) +} diff --git a/internal/service/production/chats_page_test.go b/internal/service/production/chats_page_test.go new file mode 100644 index 00000000..b325fd42 --- /dev/null +++ b/internal/service/production/chats_page_test.go @@ -0,0 +1,207 @@ +package production + +import ( + "context" + "errors" + "reflect" + "testing" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// TestService_ChatsGetPage validates access and pagination before issuing a typed store query. +func TestService_ChatsGetPage(t *testing.T) { + t.Run("Positive: continuation uses scope, position and lookahead", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + allowIdentity(repo, actor) + + previous := cursor.Position{ID: uuid.New(), CreatedAt: time.Unix(1700000000, 0).UTC()} + records := []dto.ChatDTO{ + {ID: uuid.New(), CreatedAt: time.Unix(1700000001, 0).UTC()}, + {ID: uuid.New(), CreatedAt: time.Unix(1700000002, 0).UTC()}, + {ID: uuid.New(), CreatedAt: time.Unix(1700000003, 0).UTC()}, + } + calls := 0 + repo.chats = func(_ context.Context, id uuid.UUID, position dto.PositionDTO, limit int) ([]dto.ChatDTO, error) { + calls++ + expected := dto.PositionDTO{ID: previous.ID, CreatedAt: previous.CreatedAt} + if id != actor || position != expected || limit != 3 { + t.Fatalf("wrong page query: id=%s, position=%v, limit=%d", id, position, limit) + } + return records, nil + } + svc := newStubService(t, repo) + resource := "chats:" + actor.String() + token, err := svc.cursors.Encode(resource, previous) + if err != nil { + t.Fatal(err) + } + input := dto.PageRequestDTO{UserID: actor.String(), Limit: "2", Cursor: token} + + // Act. + got, err := svc.ChatsGetPage(t.Context(), input) + + // Assert. + + if err != nil { + t.Fatal(err) + } + if calls != 1 || !reflect.DeepEqual(got.Items, records[:2]) || got.NextCursor == nil { + t.Fatalf("calls=%d, page=%+v", calls, got) + } + position, err := svc.cursors.Decode(*got.NextCursor, resource) + expected := cursor.Position{ID: records[1].ID, CreatedAt: records[1].CreatedAt} + if err != nil || position != expected { + t.Fatalf("next position=%v, want=%v, error=%v", position, expected, err) + } + + }) + + t.Run("Positive: empty history uses default limit and no continuation", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + allowIdentity(repo, actor) + + calls := 0 + repo.chats = func(_ context.Context, id uuid.UUID, position dto.PositionDTO, limit int) ([]dto.ChatDTO, error) { + calls++ + if id != actor || position != (dto.PositionDTO{}) || limit != 51 { + t.Fatalf("wrong initial page query: id=%s, position=%v, limit=%d", id, position, limit) + } + return []dto.ChatDTO{}, nil + } + svc := newStubService(t, repo) + input := dto.PageRequestDTO{UserID: actor.String()} + + // Act. + got, err := svc.ChatsGetPage(t.Context(), input) + + // Assert. + if err != nil { + t.Fatal(err) + } + if calls != 1 || got.Items == nil || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("calls=%d, page=%+v", calls, got) + } + }) + + t.Run("Negative: cursor for another resource skips page lookup", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + allowIdentity(repo, actor) + + svc := newStubService(t, repo) + token, err := svc.cursors.Encode("another-resource", cursor.Position{ID: uuid.New(), CreatedAt: time.Unix(1700000000, 0).UTC()}) + if err != nil { + t.Fatal(err) + } + input := dto.PageRequestDTO{UserID: actor.String(), Cursor: token} + + // Act. + got, err := svc.ChatsGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrInvalid) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: codec failure skips page lookup", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + allowIdentity(repo, actor) + + failure := errors.New("cursor unavailable") + svc := newStubService(t, repo) + svc.cursors = failingCursor{failure: failure} + input := dto.PageRequestDTO{UserID: actor.String(), Cursor: "token"} + + // Act. + got, err := svc.ChatsGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, failure) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: page storage fails", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + allowIdentity(repo, actor) + + failure := errors.New("page unavailable") + repo.chats = func(_ context.Context, _ uuid.UUID, _ dto.PositionDTO, _ int) ([]dto.ChatDTO, error) { + return nil, failure + } + svc := newStubService(t, repo) + input := dto.PageRequestDTO{UserID: actor.String()} + + // Act. + got, err := svc.ChatsGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, failure) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: malformed identity skips all storage", func(t *testing.T) { + // Arrange. + svc := newStubService(t, newStoreStub(t)) + input := dto.PageRequestDTO{UserID: "invalid", ChatID: uuid.NewString()} + + // Act. + got, err := svc.ChatsGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrUnauthorized) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) +} + +// TestService_ChatsGetPage_InvalidLimit rejects invalid limits before reading stored pages. +func TestService_ChatsGetPage_InvalidLimit(t *testing.T) { + cases := []struct { + name string + limit string + }{ + {"Negative: zero limit", "0"}, + {"Negative: negative limit", "-1"}, + {"Negative: limit above maximum", "101"}, + {"Negative: nonnumeric limit", "text"}, + {"Negative: fractional limit", "1.5"}, + {"Negative: integer overflow", "99999999999999999999999999"}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + allowIdentity(repo, actor) + + svc := newStubService(t, repo) + input := dto.PageRequestDTO{UserID: actor.String(), Limit: tc.limit} + + // Act. + got, err := svc.ChatsGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrInvalid) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) + } +} diff --git a/internal/service/production/chats_test.go b/internal/service/production/chats_test.go new file mode 100644 index 00000000..f2085395 --- /dev/null +++ b/internal/service/production/chats_test.go @@ -0,0 +1,261 @@ +package production + +import ( + "context" + "errors" + "reflect" + "slices" + "testing" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// TestService_ChatsCreate checks membership in one batch and persists only validated chats. +func TestService_ChatsCreate(t *testing.T) { + t.Run("Positive: one membership query and original chat fields", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor, other := uuid.New(), uuid.New() + var queries [][]uuid.UUID + repo.usersExist = func(_ context.Context, ids []uuid.UUID) (bool, error) { + queries = append(queries, slices.Clone(ids)) + return true, nil + } + var persisted dto.ChatDTO + repo.createChat = func(_ context.Context, input dto.ChatDTO) (dto.ChatDTO, error) { + persisted = input + input.CreatedAt = time.Unix(1700000000, 0).UTC() + return input, nil + } + svc := newStubService(t, repo) + input := dto.ChatsCreateRequestDTO{UserID: actor.String(), Title: " Team 👋 ", MemberIDs: []string{actor.String(), other.String()}} + + // Act. + got, err := svc.ChatsCreate(t.Context(), input) + + // Assert. + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(queries, [][]uuid.UUID{{actor}, {actor, other}}) { + t.Fatalf("existence queries=%v", queries) + } + if persisted.ID == uuid.Nil || persisted.Title != input.Title || !slices.Equal(persisted.MemberIDs, []uuid.UUID{actor, other}) { + t.Fatalf("wrong persistence input: %+v", persisted) + } + if got.ID != persisted.ID || got.CreatedAt.IsZero() || got.Title != input.Title || !slices.Equal(got.MemberIDs, persisted.MemberIDs) { + t.Fatalf("wrong returned chat: %+v", got) + } + }) + + t.Run("Negative: unknown member prevents persistence", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor, missing := uuid.New(), uuid.New() + repo.usersExist = func(_ context.Context, ids []uuid.UUID) (bool, error) { + return !slices.Contains(ids, missing), nil + } + svc := newStubService(t, repo) + input := dto.ChatsCreateRequestDTO{UserID: actor.String(), Title: "Team", MemberIDs: []string{actor.String(), missing.String()}} + + // Act. + got, err := svc.ChatsCreate(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrInvalid) || !reflect.DeepEqual(got, dto.ChatDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: membership lookup failure prevents persistence", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor, other := uuid.New(), uuid.New() + failure := errors.New("membership unavailable") + repo.usersExist = func(_ context.Context, ids []uuid.UUID) (bool, error) { + if len(ids) == 1 { + return true, nil + } + return false, failure + } + svc := newStubService(t, repo) + input := dto.ChatsCreateRequestDTO{UserID: actor.String(), Title: "Team", MemberIDs: []string{actor.String(), other.String()}} + + // Act. + got, err := svc.ChatsCreate(t.Context(), input) + + // Assert. + if !errors.Is(err, failure) || !reflect.DeepEqual(got, dto.ChatDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: unknown creator prevents membership and persistence calls", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + repo.usersExist = func(_ context.Context, _ []uuid.UUID) (bool, error) { + return false, nil + } + svc := newStubService(t, repo) + actor := uuid.New() + input := dto.ChatsCreateRequestDTO{UserID: actor.String(), Title: "Team", MemberIDs: []string{actor.String()}} + + // Act. + got, err := svc.ChatsCreate(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrUnauthorized) || !reflect.DeepEqual(got, dto.ChatDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + }) +} + +// TestService_ChatsCreate_InvalidInput rejects malformed chat fields before checking member existence. +func TestService_ChatsCreate_InvalidInput(t *testing.T) { + actor := uuid.New() + cases := []struct { + name string + title string + members []string + }{ + {"Negative: empty member set", "Team", nil}, + {"Negative: duplicate member", "Team", []string{actor.String(), actor.String()}}, + {"Negative: caller omitted", "Team", []string{uuid.NewString()}}, + {"Negative: malformed member ID", "Team", []string{actor.String(), "invalid"}}, + {"Negative: blank title", " ", []string{actor.String()}}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + calls := 0 + repo.usersExist = func(_ context.Context, ids []uuid.UUID) (bool, error) { + calls++ + if calls != 1 || !slices.Equal(ids, []uuid.UUID{actor}) { + t.Fatalf("unexpected membership check: %v", ids) + } + return true, nil + } + svc := newStubService(t, repo) + input := dto.ChatsCreateRequestDTO{UserID: actor.String(), Title: tc.title, MemberIDs: tc.members} + + // Act. + got, err := svc.ChatsCreate(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrInvalid) || !reflect.DeepEqual(got, dto.ChatDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + if calls != 1 { + t.Fatalf("identity checks=%d, want=1", calls) + } + }) + } +} + +// TestService_ChatsGetByID authorizes the requested chat and conceals inaccessible records. +func TestService_ChatsGetByID(t *testing.T) { + t.Run("Positive: member receives the complete chat", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + expected := dto.ChatDTO{ID: uuid.New(), Title: "Team", MemberIDs: []uuid.UUID{actor}, CreatedAt: time.Unix(1700000000, 0).UTC()} + allowChatAccess(repo, actor, expected) + svc := newStubService(t, repo) + + // Act. + got, err := svc.ChatsGetByID(t.Context(), actor.String(), expected.ID.String()) + + // Assert. + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(got, expected) { + t.Fatalf("chat=%+v, want=%+v", got, expected) + } + }) + + t.Run("Negative: outsider receives no chat details", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), Title: "Private", MemberIDs: []uuid.UUID{uuid.New()}} + allowChatAccess(repo, actor, chat) + svc := newStubService(t, repo) + + // Act. + got, err := svc.ChatsGetByID(t.Context(), actor.String(), chat.ID.String()) + + // Assert. + if !errors.Is(err, service.ErrNotFound) || !reflect.DeepEqual(got, dto.ChatDTO{}) { + t.Fatalf("private chat exposed: %+v, error=%v", got, err) + } + }) + + t.Run("Negative: malformed chat ID skips chat lookup", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + allowIdentity(repo, actor) + svc := newStubService(t, repo) + + // Act. + got, err := svc.ChatsGetByID(t.Context(), actor.String(), "invalid") + + // Assert. + if !errors.Is(err, service.ErrInvalid) || !reflect.DeepEqual(got, dto.ChatDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: malformed identity skips storage", func(t *testing.T) { + // Arrange. + svc := newStubService(t, newStoreStub(t)) + + // Act. + got, err := svc.ChatsGetByID(t.Context(), "invalid", uuid.NewString()) + + // Assert. + if !errors.Is(err, service.ErrUnauthorized) || !reflect.DeepEqual(got, dto.ChatDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + }) +} + +// TestService_ChatsGetByID_StoreErrors translates missing records and retains unexpected failures. +func TestService_ChatsGetByID_StoreErrors(t *testing.T) { + failure := errors.New("chat lookup unavailable") + cases := []struct { + name string + cause error + want error + }{ + {"Negative: absent chat", store.ErrNotFound, service.ErrNotFound}, + {"Negative: storage unavailable", failure, failure}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + allowIdentity(repo, actor) + repo.chat = func(_ context.Context, _ uuid.UUID) (dto.ChatDTO, error) { + return dto.ChatDTO{}, tc.cause + } + svc := newStubService(t, repo) + + // Act. + got, err := svc.ChatsGetByID(t.Context(), actor.String(), uuid.NewString()) + + // Assert. + if !errors.Is(err, tc.want) || !reflect.DeepEqual(got, dto.ChatDTO{}) { + t.Fatalf("result=%+v, error=%v, want=%v", got, err, tc.want) + } + }) + } +} diff --git a/internal/service/production/creation.go b/internal/service/production/creation.go new file mode 100644 index 00000000..772e7226 --- /dev/null +++ b/internal/service/production/creation.go @@ -0,0 +1,49 @@ +package production + +import ( + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// PrepareUser validates registration fields and assigns the new user identifier. +func PrepareUser(request dto.UsersCreateRequestDTO) (dto.UserDTO, error) { + if !validUsername(request.Username) || !validText(request.DisplayName, maxDisplayNameRunes) { + return dto.UserDTO{}, service.ErrInvalid + } + return dto.UserDTO{ + ID: uuid.New(), + Username: request.Username, + DisplayName: request.DisplayName, + }, nil +} + +// prepareChat validates the title and member identifiers before storage access. +func prepareChat(request dto.ChatsCreateRequestDTO, caller uuid.UUID) (dto.ChatDTO, error) { + if !validText(request.Title, maxChatTitleRunes) { + return dto.ChatDTO{}, service.ErrInvalid + } + members, err := parseMembers(request.MemberIDs, caller) + if err != nil { + return dto.ChatDTO{}, err + } + return dto.ChatDTO{ + ID: uuid.New(), + Title: request.Title, + MemberIDs: members, + }, nil +} + +// prepareMessage validates text and creates a record for the authorized sender and chat. +func prepareMessage(request dto.MessagesCreateRequestDTO, sender, chatID uuid.UUID) (dto.MessageDTO, error) { + if !validText(request.Text, maxMessageRunes) { + return dto.MessageDTO{}, service.ErrInvalid + } + return dto.MessageDTO{ + ID: uuid.New(), + ChatID: chatID, + SenderID: sender, + Text: request.Text, + }, nil +} diff --git a/internal/service/production/errors.go b/internal/service/production/errors.go new file mode 100644 index 00000000..15dc4035 --- /dev/null +++ b/internal/service/production/errors.go @@ -0,0 +1,23 @@ +package production + +import ( + "errors" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// normalizeStoreError maps expected storage failures to application errors. +// Unexpected failures retain their cause for the transport's safe fallback. +func normalizeStoreError(err error) error { + switch { + case errors.Is(err, store.ErrNotFound): + return service.ErrNotFound + case errors.Is(err, store.ErrConflict): + return service.ErrConflict + case errors.Is(err, store.ErrCapacity): + return service.ErrCapacity + default: + return err + } +} diff --git a/internal/service/production/fixture_test.go b/internal/service/production/fixture_test.go new file mode 100644 index 00000000..e067de6e --- /dev/null +++ b/internal/service/production/fixture_test.go @@ -0,0 +1,147 @@ +package production + +import ( + "context" + "testing" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// storeStub permits only the interactions explicitly arranged by each service scenario. +type storeStub struct { + t *testing.T + createUser func(ctx context.Context, user dto.UserDTO) (dto.UserDTO, error) + user func(ctx context.Context, id uuid.UUID) (dto.UserDTO, error) + usersExist func(ctx context.Context, ids []uuid.UUID) (bool, error) + createChat func(ctx context.Context, chat dto.ChatDTO) (dto.ChatDTO, error) + chat func(ctx context.Context, id uuid.UUID) (dto.ChatDTO, error) + chats func(ctx context.Context, id uuid.UUID, position dto.PositionDTO, limit int) ([]dto.ChatDTO, error) + createMessage func(ctx context.Context, message dto.MessageDTO) (dto.MessageDTO, error) + messages func(ctx context.Context, id uuid.UUID, position dto.PositionDTO, limit int) ([]dto.MessageDTO, error) +} + +// CreateUser delegates to the arranged behavior and rejects unexpected storage access. +func (repo *storeStub) CreateUser(ctx context.Context, user dto.UserDTO) (dto.UserDTO, error) { + repo.t.Helper() + if repo.createUser == nil { + repo.t.Fatalf("unexpected store.CreateUser call") + return dto.UserDTO{}, nil + } + return repo.createUser(ctx, user) +} + +// User delegates to the arranged behavior and rejects unexpected storage access. +func (repo *storeStub) User(ctx context.Context, id uuid.UUID) (dto.UserDTO, error) { + repo.t.Helper() + if repo.user == nil { + repo.t.Fatalf("unexpected store.User call") + return dto.UserDTO{}, nil + } + return repo.user(ctx, id) +} + +// UsersExist delegates to the arranged behavior and rejects unexpected storage access. +func (repo *storeStub) UsersExist(ctx context.Context, ids []uuid.UUID) (bool, error) { + repo.t.Helper() + if repo.usersExist == nil { + repo.t.Fatalf("unexpected store.UsersExist call") + return false, nil + } + return repo.usersExist(ctx, ids) +} + +// CreateChat delegates to the arranged behavior and rejects unexpected storage access. +func (repo *storeStub) CreateChat(ctx context.Context, chat dto.ChatDTO) (dto.ChatDTO, error) { + repo.t.Helper() + if repo.createChat == nil { + repo.t.Fatalf("unexpected store.CreateChat call") + return dto.ChatDTO{}, nil + } + return repo.createChat(ctx, chat) +} + +// Chat delegates to the arranged behavior and rejects unexpected storage access. +func (repo *storeStub) Chat(ctx context.Context, id uuid.UUID) (dto.ChatDTO, error) { + repo.t.Helper() + if repo.chat == nil { + repo.t.Fatalf("unexpected store.Chat call") + return dto.ChatDTO{}, nil + } + return repo.chat(ctx, id) +} + +// Chats delegates to the arranged behavior and rejects unexpected storage access. +func (repo *storeStub) Chats(ctx context.Context, id uuid.UUID, position dto.PositionDTO, limit int) ([]dto.ChatDTO, error) { + repo.t.Helper() + if repo.chats == nil { + repo.t.Fatalf("unexpected store.Chats call") + return nil, nil + } + return repo.chats(ctx, id, position, limit) +} + +// CreateMessage delegates to the arranged behavior and rejects unexpected storage access. +func (repo *storeStub) CreateMessage(ctx context.Context, message dto.MessageDTO) (dto.MessageDTO, error) { + repo.t.Helper() + if repo.createMessage == nil { + repo.t.Fatalf("unexpected store.CreateMessage call") + return dto.MessageDTO{}, nil + } + return repo.createMessage(ctx, message) +} + +// Messages delegates to the arranged behavior and rejects unexpected storage access. +func (repo *storeStub) Messages(ctx context.Context, id uuid.UUID, position dto.PositionDTO, limit int) ([]dto.MessageDTO, error) { + repo.t.Helper() + if repo.messages == nil { + repo.t.Fatalf("unexpected store.Messages call") + return nil, nil + } + return repo.messages(ctx, id, position, limit) +} + +// newStoreStub creates a repository that fails on every unarranged interaction. +func newStoreStub(t *testing.T) *storeStub { + t.Helper() + return &storeStub{t: t} +} + +// newStubService composes the service with controlled storage and a real cursor codec. +func newStubService(t *testing.T, repo *storeStub) *Service { + t.Helper() + codec, err := cursor.New() + if err != nil { + t.Fatal(err) + } + svc, err := New(repo, codec) + if err != nil { + t.Fatal(err) + } + return svc +} + +// allowIdentity permits exactly the arranged actor's existence lookup, never a profile read. +func allowIdentity(repo *storeStub, actor uuid.UUID) { + repo.t.Helper() + repo.usersExist = func(_ context.Context, ids []uuid.UUID) (bool, error) { + if len(ids) != 1 || ids[0] != actor { + repo.t.Fatalf("unexpected identity query: %v", ids) + } + return true, nil + } +} + +// allowChatAccess supplies a typed chat after checking the lookup key at the service boundary. +func allowChatAccess(repo *storeStub, actor uuid.UUID, chat dto.ChatDTO) { + repo.t.Helper() + allowIdentity(repo, actor) + repo.chat = func(_ context.Context, id uuid.UUID) (dto.ChatDTO, error) { + if id != chat.ID { + repo.t.Fatalf("chat queried for %s, want %s", id, chat.ID) + } + return chat, nil + } +} diff --git a/internal/service/production/members.go b/internal/service/production/members.go new file mode 100644 index 00000000..3c1437b9 --- /dev/null +++ b/internal/service/production/members.go @@ -0,0 +1,42 @@ +package production + +import ( + "context" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// parseMembers validates unique member identifiers and requires the caller to be included. +func parseMembers(rawIDs []string, caller uuid.UUID) ([]uuid.UUID, error) { + if len(rawIDs) == 0 || len(rawIDs) > maxChatMembers { + return nil, service.ErrInvalid + } + members := make([]uuid.UUID, 0, len(rawIDs)) + seen := make(map[uuid.UUID]bool, len(rawIDs)) + for _, rawID := range rawIDs { + id, err := parseID(rawID) + if err != nil || seen[id] { + return nil, service.ErrInvalid + } + seen[id] = true + members = append(members, id) + } + if !seen[caller] { + return nil, service.ErrInvalid + } + return members, nil +} + +// requireExistingMembers validates the complete membership set with one storage operation. +func (s *Service) requireExistingMembers(ctx context.Context, members []uuid.UUID) error { + exists, err := s.repo.UsersExist(ctx, members) + if err != nil { + return normalizeStoreError(err) + } + if !exists { + return service.ErrInvalid + } + return nil +} diff --git a/internal/service/production/messages.go b/internal/service/production/messages.go new file mode 100644 index 00000000..4885b04b --- /dev/null +++ b/internal/service/production/messages.go @@ -0,0 +1,38 @@ +package production + +import ( + "context" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// MessagesCreate authorizes the sender, validates the message and stores it atomically. +func (s *Service) MessagesCreate(ctx context.Context, request dto.MessagesCreateRequestDTO) (dto.MessageDTO, error) { + caller, chat, err := s.requireChatMember(ctx, request.UserID, request.ChatID) + if err != nil { + return dto.MessageDTO{}, err + } + message, err := prepareMessage(request, caller, chat.ID) + if err != nil { + return dto.MessageDTO{}, err + } + created, err := s.repo.CreateMessage(ctx, message) + return created, normalizeStoreError(err) +} + +// MessagesGetPage authorizes access, loads history and prepares its continuation. +func (s *Service) MessagesGetPage(ctx context.Context, request dto.PageRequestDTO) (dto.MessagePageDTO, error) { + _, chat, err := s.requireChatMember(ctx, request.UserID, request.ChatID) + if err != nil { + return dto.MessagePageDTO{}, err + } + page, err := s.parsePage(request, messageHistoryResource(chat.ID)) + if err != nil { + return dto.MessagePageDTO{}, err + } + items, err := s.repo.Messages(ctx, chat.ID, page.position, page.fetchLimit()) + if err != nil { + return dto.MessagePageDTO{}, normalizeStoreError(err) + } + return s.messagePage(items, page) +} diff --git a/internal/service/production/messages_page_test.go b/internal/service/production/messages_page_test.go new file mode 100644 index 00000000..e54fe8e8 --- /dev/null +++ b/internal/service/production/messages_page_test.go @@ -0,0 +1,231 @@ +package production + +import ( + "context" + "errors" + "reflect" + "testing" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// TestService_MessagesGetPage validates access and pagination before issuing a typed store query. +func TestService_MessagesGetPage(t *testing.T) { + t.Run("Positive: continuation uses scope, position and lookahead", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{actor}} + allowChatAccess(repo, actor, chat) + + previous := cursor.Position{ID: uuid.New(), CreatedAt: time.Unix(1700000000, 0).UTC()} + records := []dto.MessageDTO{ + {ID: uuid.New(), CreatedAt: time.Unix(1700000001, 0).UTC()}, + {ID: uuid.New(), CreatedAt: time.Unix(1700000002, 0).UTC()}, + {ID: uuid.New(), CreatedAt: time.Unix(1700000003, 0).UTC()}, + } + calls := 0 + repo.messages = func(_ context.Context, id uuid.UUID, position dto.PositionDTO, limit int) ([]dto.MessageDTO, error) { + calls++ + expected := dto.PositionDTO{ID: previous.ID, CreatedAt: previous.CreatedAt} + if id != chat.ID || position != expected || limit != 3 { + t.Fatalf("wrong page query: id=%s, position=%v, limit=%d", id, position, limit) + } + return records, nil + } + svc := newStubService(t, repo) + resource := "messages:" + chat.ID.String() + token, err := svc.cursors.Encode(resource, previous) + if err != nil { + t.Fatal(err) + } + input := dto.PageRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Limit: "2", Cursor: token} + + // Act. + got, err := svc.MessagesGetPage(t.Context(), input) + + // Assert. + + if err != nil { + t.Fatal(err) + } + if calls != 1 || !reflect.DeepEqual(got.Items, records[:2]) || got.NextCursor == nil { + t.Fatalf("calls=%d, page=%+v", calls, got) + } + position, err := svc.cursors.Decode(*got.NextCursor, resource) + expected := cursor.Position{ID: records[1].ID, CreatedAt: records[1].CreatedAt} + if err != nil || position != expected { + t.Fatalf("next position=%v, want=%v, error=%v", position, expected, err) + } + + }) + + t.Run("Positive: empty history uses default limit and no continuation", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{actor}} + allowChatAccess(repo, actor, chat) + + calls := 0 + repo.messages = func(_ context.Context, id uuid.UUID, position dto.PositionDTO, limit int) ([]dto.MessageDTO, error) { + calls++ + if id != chat.ID || position != (dto.PositionDTO{}) || limit != 51 { + t.Fatalf("wrong initial page query: id=%s, position=%v, limit=%d", id, position, limit) + } + return []dto.MessageDTO{}, nil + } + svc := newStubService(t, repo) + input := dto.PageRequestDTO{UserID: actor.String(), ChatID: chat.ID.String()} + + // Act. + got, err := svc.MessagesGetPage(t.Context(), input) + + // Assert. + if err != nil { + t.Fatal(err) + } + if calls != 1 || got.Items == nil || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("calls=%d, page=%+v", calls, got) + } + }) + + t.Run("Negative: cursor for another resource skips page lookup", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{actor}} + allowChatAccess(repo, actor, chat) + + svc := newStubService(t, repo) + token, err := svc.cursors.Encode("another-resource", cursor.Position{ID: uuid.New(), CreatedAt: time.Unix(1700000000, 0).UTC()}) + if err != nil { + t.Fatal(err) + } + input := dto.PageRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Cursor: token} + + // Act. + got, err := svc.MessagesGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrInvalid) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: codec failure skips page lookup", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{actor}} + allowChatAccess(repo, actor, chat) + + failure := errors.New("cursor unavailable") + svc := newStubService(t, repo) + svc.cursors = failingCursor{failure: failure} + input := dto.PageRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Cursor: "token"} + + // Act. + got, err := svc.MessagesGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, failure) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: page storage fails", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{actor}} + allowChatAccess(repo, actor, chat) + + failure := errors.New("page unavailable") + repo.messages = func(_ context.Context, _ uuid.UUID, _ dto.PositionDTO, _ int) ([]dto.MessageDTO, error) { + return nil, failure + } + svc := newStubService(t, repo) + input := dto.PageRequestDTO{UserID: actor.String(), ChatID: chat.ID.String()} + + // Act. + got, err := svc.MessagesGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, failure) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: malformed identity skips all storage", func(t *testing.T) { + // Arrange. + svc := newStubService(t, newStoreStub(t)) + input := dto.PageRequestDTO{UserID: "invalid", ChatID: uuid.NewString()} + + // Act. + got, err := svc.MessagesGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrUnauthorized) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: outsider cannot read message history", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{uuid.New()}} + allowChatAccess(repo, actor, chat) + svc := newStubService(t, repo) + input := dto.PageRequestDTO{UserID: actor.String(), ChatID: chat.ID.String()} + + // Act. + got, err := svc.MessagesGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrNotFound) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) +} + +// TestService_MessagesGetPage_InvalidLimit rejects invalid limits before reading stored pages. +func TestService_MessagesGetPage_InvalidLimit(t *testing.T) { + cases := []struct { + name string + limit string + }{ + {"Negative: zero limit", "0"}, + {"Negative: negative limit", "-1"}, + {"Negative: limit above maximum", "101"}, + {"Negative: nonnumeric limit", "text"}, + {"Negative: fractional limit", "1.5"}, + {"Negative: integer overflow", "99999999999999999999999999"}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{actor}} + allowChatAccess(repo, actor, chat) + + svc := newStubService(t, repo) + input := dto.PageRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Limit: tc.limit} + + // Act. + got, err := svc.MessagesGetPage(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrInvalid) || len(got.Items) != 0 || got.NextCursor != nil { + t.Fatalf("page=%+v, error=%v", got, err) + } + }) + } +} diff --git a/internal/service/production/messages_test.go b/internal/service/production/messages_test.go new file mode 100644 index 00000000..24eaf706 --- /dev/null +++ b/internal/service/production/messages_test.go @@ -0,0 +1,147 @@ +package production + +import ( + "context" + "errors" + "strings" + "testing" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// TestService_MessagesCreate authorizes the sender before validating and persisting the message. +func TestService_MessagesCreate(t *testing.T) { + t.Run("Positive: authenticated sender and original text persisted", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{actor}} + allowChatAccess(repo, actor, chat) + var persisted dto.MessageDTO + repo.createMessage = func(_ context.Context, input dto.MessageDTO) (dto.MessageDTO, error) { + persisted = input + input.CreatedAt = time.Unix(1700000000, 0).UTC() + return input, nil + } + svc := newStubService(t, repo) + input := dto.MessagesCreateRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Text: " Original 👋 "} + + // Act. + got, err := svc.MessagesCreate(t.Context(), input) + + // Assert. + if err != nil { + t.Fatal(err) + } + if persisted.ID == uuid.Nil || persisted.SenderID != actor || persisted.ChatID != chat.ID || persisted.Text != input.Text { + t.Fatalf("wrong persistence input: %+v", persisted) + } + if got.ID != persisted.ID || got.SenderID != actor || got.ChatID != chat.ID || got.Text != input.Text || got.CreatedAt.IsZero() { + t.Fatalf("wrong acknowledgement: %+v", got) + } + }) + + t.Run("Negative: outsider cannot persist messages", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{uuid.New()}} + allowChatAccess(repo, actor, chat) + svc := newStubService(t, repo) + input := dto.MessagesCreateRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Text: "Valid text"} + + // Act. + got, err := svc.MessagesCreate(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrNotFound) || got != (dto.MessageDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + }) + + t.Run("Negative: malformed identity skips storage", func(t *testing.T) { + // Arrange. + svc := newStubService(t, newStoreStub(t)) + input := dto.MessagesCreateRequestDTO{UserID: "invalid", ChatID: uuid.NewString(), Text: "text"} + + // Act. + got, err := svc.MessagesCreate(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrUnauthorized) || got != (dto.MessageDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + }) +} + +// TestService_MessagesCreate_InvalidText refuses invalid text without attempting persistence. +func TestService_MessagesCreate_InvalidText(t *testing.T) { + cases := []struct { + name string + text string + }{ + {"Negative: empty text", ""}, + {"Negative: whitespace only", " \t"}, + {"Negative: rune limit exceeded", strings.Repeat("界", 4001)}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{actor}} + allowChatAccess(repo, actor, chat) + svc := newStubService(t, repo) + input := dto.MessagesCreateRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Text: tc.text} + + // Act. + got, err := svc.MessagesCreate(t.Context(), input) + + // Assert. + if !errors.Is(err, service.ErrInvalid) || got != (dto.MessageDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + }) + } +} + +// TestService_MessagesCreate_StoreErrors propagates persistence failures without acknowledging a record. +func TestService_MessagesCreate_StoreErrors(t *testing.T) { + failure := errors.New("write unavailable") + cases := []struct { + name string + cause error + want error + }{ + {"Negative: capacity exhausted", store.ErrCapacity, service.ErrCapacity}, + {"Negative: chat disappeared", store.ErrNotFound, service.ErrNotFound}, + {"Negative: unexpected write failure", failure, failure}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + actor := uuid.New() + chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{actor}} + allowChatAccess(repo, actor, chat) + repo.createMessage = func(_ context.Context, _ dto.MessageDTO) (dto.MessageDTO, error) { + return dto.MessageDTO{}, tc.cause + } + svc := newStubService(t, repo) + input := dto.MessagesCreateRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Text: "Valid text"} + + // Act. + got, err := svc.MessagesCreate(t.Context(), input) + + // Assert. + if !errors.Is(err, tc.want) || got != (dto.MessageDTO{}) { + t.Fatalf("result=%+v, error=%v, want=%v", got, err, tc.want) + } + }) + } +} diff --git a/internal/service/production/pages.go b/internal/service/production/pages.go new file mode 100644 index 00000000..4ff66f2c --- /dev/null +++ b/internal/service/production/pages.go @@ -0,0 +1,49 @@ +package production + +import ( + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// chatPage adapts the shared page result to the chat response DTO. +func (s *Service) chatPage(items []dto.ChatDTO, page pagination) (dto.ChatPageDTO, error) { + items, next, err := buildPage(items, page, s.cursors, chatPosition) + if err != nil { + return dto.ChatPageDTO{}, err + } + return dto.ChatPageDTO{Items: items, NextCursor: next}, nil +} + +// messagePage adapts the shared page result to the message response DTO. +func (s *Service) messagePage(items []dto.MessageDTO, page pagination) (dto.MessagePageDTO, error) { + items, next, err := buildPage(items, page, s.cursors, messagePosition) + if err != nil { + return dto.MessagePageDTO{}, err + } + return dto.MessagePageDTO{Items: items, NextCursor: next}, nil +} + +// buildPage trims lookahead and signs the last returned record when more data exists. +// The page limit must be validated before calling this helper. +func buildPage[T any](items []T, page pagination, codec service.CursorCodec, position func(T) cursor.Position) ([]T, *string, error) { + if len(items) <= page.limit { + return items, nil, nil + } + items = items[:page.limit] + next, err := codec.Encode(page.resource, position(items[len(items)-1])) + if err != nil { + return nil, nil, err + } + return items, new(next), nil +} + +// chatPosition extracts the stable pagination boundary from a stored chat. +func chatPosition(chat dto.ChatDTO) cursor.Position { + return cursor.Position{CreatedAt: chat.CreatedAt, ID: chat.ID} +} + +// messagePosition extracts the stable pagination boundary from a stored message. +func messagePosition(message dto.MessageDTO) cursor.Position { + return cursor.Position{CreatedAt: message.CreatedAt, ID: message.ID} +} diff --git a/internal/service/production/pages_test.go b/internal/service/production/pages_test.go new file mode 100644 index 00000000..0638f7ce --- /dev/null +++ b/internal/service/production/pages_test.go @@ -0,0 +1,53 @@ +package production + +import ( + "reflect" + "testing" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// TestService_messagePage checks boundaries and signs the last returned item, not lookahead. +func TestService_messagePage(t *testing.T) { + for _, count := range []int{0, 2, 3} { + names := map[int]string{0: "Positive: empty page", 2: "Positive: exact limit is final", 3: "Positive: lookahead creates continuation"} + t.Run(names[count], func(t *testing.T) { + // Arrange. + svc := newStubService(t, newStoreStub(t)) + items := make([]dto.MessageDTO, count) + for i := range items { + items[i] = dto.MessageDTO{ID: uuid.New(), Text: "message", CreatedAt: time.Unix(int64(i+1), 0).UTC()} + } + expected := items[:min(count, 2)] + + // Act. + page, err := svc.messagePage(items, pagination{limit: 2, resource: "messages:chat"}) + + // Assert. + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(page.Items, expected) { + t.Fatalf("page=%v, want=%v", page.Items, expected) + } + if count <= 2 { + if page.NextCursor != nil { + t.Fatal("final page has a continuation") + } + return + } + if page.NextCursor == nil { + t.Fatal("lookahead did not produce continuation") + } + decoded, err := svc.cursors.Decode(*page.NextCursor, "messages:chat") + want := cursor.Position{ID: items[1].ID, CreatedAt: items[1].CreatedAt} + if err != nil || decoded != want { + t.Fatalf("cursor=%v, want=%v, error=%v", decoded, want, err) + } + }) + } +} diff --git a/internal/service/production/pagination.go b/internal/service/production/pagination.go new file mode 100644 index 00000000..c5326b6e --- /dev/null +++ b/internal/service/production/pagination.go @@ -0,0 +1,78 @@ +package production + +import ( + "errors" + "strconv" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +const ( + defaultPageLimit = 50 + maxPageLimit = 100 + // Fetching one extra record determines whether to issue a next cursor. + pageLookahead = 1 +) + +type pagination struct { + position dto.PositionDTO + limit int + resource string +} + +// parsePage validates the page size and resource-bound cursor. +func (s *Service) parsePage(request dto.PageRequestDTO, resource string) (pagination, error) { + limit, err := parseLimit(request.Limit) + if err != nil { + return pagination{}, err + } + position, err := s.cursors.Decode(request.Cursor, resource) + if errors.Is(err, cursor.ErrInvalid) { + return pagination{}, service.ErrInvalid + } + if err != nil { + return pagination{}, err + } + return pagination{ + position: dto.PositionDTO{CreatedAt: position.CreatedAt, ID: position.ID}, + limit: limit, + resource: resource, + }, nil +} + +// parseLimit parses a bounded page size or supplies the default. +func parseLimit(raw string) (int, error) { + if raw == "" { + return defaultPageLimit, nil + } + for _, char := range raw { + if char < '0' || char > '9' { + return 0, service.ErrInvalid + } + } + limit, err := strconv.Atoi(raw) + if err != nil || limit < 1 || limit > maxPageLimit { + return 0, service.ErrInvalid + } + return limit, nil +} + +// fetchLimit includes one lookahead record to detect a following page. +func (page pagination) fetchLimit() int { + return page.limit + pageLookahead +} + +// chatListResource scopes a cursor to one user's visible chats. +func chatListResource(userID uuid.UUID) string { + return "chats:" + userID.String() +} + +// messageHistoryResource scopes a cursor to one chat's message history. +func messageHistoryResource(chatID uuid.UUID) string { + return "messages:" + chatID.String() +} diff --git a/internal/service/production/pagination_test.go b/internal/service/production/pagination_test.go new file mode 100644 index 00000000..6861ea45 --- /dev/null +++ b/internal/service/production/pagination_test.go @@ -0,0 +1,74 @@ +package production + +import ( + "errors" + "testing" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +type failingCursor struct { + failure error +} + +// Encode injects a signing failure at the service dependency boundary. +func (codec failingCursor) Encode(_ string, _ cursor.Position) (string, error) { + return "", codec.failure +} + +// Decode injects a verification failure at the service dependency boundary. +func (codec failingCursor) Decode(_, _ string) (cursor.Position, error) { + return cursor.Position{}, codec.failure +} + +// TestService_parsePage translates invalid tokens while retaining unexpected dependency failures. +func TestService_parsePage(t *testing.T) { + failure := errors.New("codec unavailable") + cases := []struct { + name string + cause error + want error + }{ + {"Negative: invalid token", cursor.ErrInvalid, service.ErrInvalid}, + {"Negative: unavailable codec", failure, failure}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + svc := &Service{cursors: failingCursor{failure: tc.cause}} + input := dto.PageRequestDTO{Cursor: "supplied-token"} + + // Act. + page, err := svc.parsePage(input, "messages:chat") + + // Assert. + if !errors.Is(err, tc.want) { + t.Fatalf("error=%v, want=%v", err, tc.want) + } + if page != (pagination{}) { + t.Fatalf("failed cursor produced a page: %+v", page) + } + }) + } +} + +// TestService_messagePage_EncodeFailure returns no partial page when signing fails. +func TestService_messagePage_EncodeFailure(t *testing.T) { + // Arrange. + failure := errors.New("signing unavailable") + svc := &Service{cursors: failingCursor{failure: failure}} + items := []dto.MessageDTO{{Text: "first"}, {Text: "lookahead"}} + + // Act. + page, err := svc.messagePage(items, pagination{limit: 1, resource: "messages:chat"}) + + // Assert. + if !errors.Is(err, failure) { + t.Fatalf("lost signing failure: %v", err) + } + if page.Items != nil || page.NextCursor != nil { + t.Fatalf("partial page escaped: %+v", page) + } +} diff --git a/internal/service/production/service.go b/internal/service/production/service.go new file mode 100644 index 00000000..c069823a --- /dev/null +++ b/internal/service/production/service.go @@ -0,0 +1,39 @@ +// Package production implements the messenger application operations. +package production + +import ( + "fmt" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// Service orchestrates operations through storage and cursor interfaces. +type Service struct { + repo store.Interface + cursors service.CursorCodec + cache service.ProfileCache +} + +var _ service.Service = (*Service)(nil) + +// New creates an application service using explicitly supplied dependencies. +func New(repo store.Interface, cursors service.CursorCodec) (*Service, error) { + if repo == nil || cursors == nil { + return nil, fmt.Errorf("store and cursor codec are required") + } + return &Service{repo: repo, cursors: cursors}, nil +} + +// NewCached builds the business service with optional immutable-profile caching. +func NewCached(repo store.Interface, cursors service.CursorCodec, cache service.ProfileCache) (*Service, error) { + instance, err := New(repo, cursors) + if err != nil { + return nil, err + } + if cache == nil { + return nil, fmt.Errorf("profile cache is required") + } + instance.cache = cache + return instance, nil +} diff --git a/internal/service/production/service_test.go b/internal/service/production/service_test.go new file mode 100644 index 00000000..461fc3cf --- /dev/null +++ b/internal/service/production/service_test.go @@ -0,0 +1,39 @@ +package production + +import ( + "testing" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor" +) + +// TestService_New rejects each missing dependency separately. +func TestService_New(t *testing.T) { + t.Run("Negative: missing store", func(t *testing.T) { + // Arrange. + codec, err := cursor.New() + if err != nil { + t.Fatal(err) + } + + // Act. + svc, err := New(nil, codec) + + // Assert. + if err == nil || svc != nil { + t.Fatalf("service=%v, error=%v", svc, err) + } + }) + + t.Run("Negative: missing codec", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + + // Act. + svc, err := New(repo, nil) + + // Assert. + if err == nil || svc != nil { + t.Fatalf("service=%v, error=%v", svc, err) + } + }) +} diff --git a/internal/service/production/users.go b/internal/service/production/users.go new file mode 100644 index 00000000..9db4b1c0 --- /dev/null +++ b/internal/service/production/users.go @@ -0,0 +1,47 @@ +package production + +import ( + "context" + "errors" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// UsersCreate validates registration and atomically reserves the unique username. +func (s *Service) UsersCreate(ctx context.Context, request dto.UsersCreateRequestDTO) (dto.UserDTO, error) { + user, err := PrepareUser(request) + if err != nil { + return dto.UserDTO{}, err + } + created, err := s.repo.CreateUser(ctx, user) + return created, normalizeStoreError(err) +} + +// UsersGetMe loads the current user's profile; malformed and missing identities are unauthorized. +func (s *Service) UsersGetMe(ctx context.Context, rawID string) (dto.UserDTO, error) { + id, err := parseIdentity(rawID) + if err != nil { + return dto.UserDTO{}, err + } + if s.cache != nil { + if cached, ok := s.cache.GetProfile(ctx, id); ok { + return cached, nil + } + } + user, err := s.repo.User(ctx, id) + if errors.Is(err, store.ErrNotFound) { + return dto.UserDTO{}, service.ErrUnauthorized + } + if err == nil && s.cache != nil { + s.cache.PutProfile(ctx, user) + } + return user, normalizeStoreError(err) +} + +// UsersCheckIdentity validates the current identity without loading its profile. +func (s *Service) UsersCheckIdentity(ctx context.Context, rawID string) error { + _, err := s.requireUserID(ctx, rawID) + return err +} diff --git a/internal/service/production/users_test.go b/internal/service/production/users_test.go new file mode 100644 index 00000000..70f91a6f --- /dev/null +++ b/internal/service/production/users_test.go @@ -0,0 +1,289 @@ +package production + +import ( + "context" + "errors" + "slices" + "strings" + "testing" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// TestService_UsersCreate validates registration before persistence and preserves storage failures. +func TestService_UsersCreate(t *testing.T) { + t.Run("Positive: validates and persists the original profile", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + expected := dto.UserDTO{Username: "alice", DisplayName: "Алиса 👋", CreatedAt: time.Unix(1700000000, 0).UTC()} + calls := 0 + repo.createUser = func(_ context.Context, input dto.UserDTO) (dto.UserDTO, error) { + calls++ + if input.ID == uuid.Nil || input.Username != expected.Username || input.DisplayName != expected.DisplayName { + t.Fatalf("wrong persistence input: %+v", input) + } + expected.ID = input.ID + return expected, nil + } + svc := newStubService(t, repo) + input := dto.UsersCreateRequestDTO{Username: expected.Username, DisplayName: expected.DisplayName} + + // Act. + got, err := svc.UsersCreate(t.Context(), input) + + // Assert. + if err != nil { + t.Fatal(err) + } + if calls != 1 || got != expected { + t.Fatalf("calls=%d, got=%+v, want=%+v", calls, got, expected) + } + }) +} + +// TestService_UsersCreate_InvalidInput refuses malformed registrations without calling storage. +func TestService_UsersCreate_InvalidInput(t *testing.T) { + cases := []struct { + name string + input dto.UsersCreateRequestDTO + }{ + {"Negative: short username", dto.UsersCreateRequestDTO{Username: "a", DisplayName: "Alice"}}, + {"Negative: uppercase username", dto.UsersCreateRequestDTO{Username: "Alice", DisplayName: "Alice"}}, + {"Negative: blank display name", dto.UsersCreateRequestDTO{Username: "alice", DisplayName: " "}}, + {"Negative: display name exceeds rune limit", dto.UsersCreateRequestDTO{Username: "alice", DisplayName: strings.Repeat("界", 101)}}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange: every store method fails immediately if called. + svc := newStubService(t, newStoreStub(t)) + + // Act. + got, err := svc.UsersCreate(t.Context(), tc.input) + + // Assert. + if !errors.Is(err, service.ErrInvalid) || got != (dto.UserDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + }) + } +} + +// TestService_UsersCreate_StoreErrors preserves the application meaning of persistence failures. +func TestService_UsersCreate_StoreErrors(t *testing.T) { + unexpected := errors.New("storage unavailable") + cases := []struct { + name string + cause error + want error + }{ + {"Negative: duplicate username", store.ErrConflict, service.ErrConflict}, + {"Negative: capacity exhausted", store.ErrCapacity, service.ErrCapacity}, + {"Negative: unexpected failure", unexpected, unexpected}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + repo.createUser = func(_ context.Context, _ dto.UserDTO) (dto.UserDTO, error) { + return dto.UserDTO{}, tc.cause + } + svc := newStubService(t, repo) + + // Act. + got, err := svc.UsersCreate(t.Context(), dto.UsersCreateRequestDTO{Username: "alice", DisplayName: "Alice"}) + + // Assert. + if !errors.Is(err, tc.want) || got != (dto.UserDTO{}) { + t.Fatalf("result=%+v, error=%v, want=%v", got, err, tc.want) + } + }) + } +} + +// TestService_UsersGetMe loads only the requested profile and hides unknown identities. +func TestService_UsersGetMe(t *testing.T) { + t.Run("Positive: returns stored profile", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + expected := dto.UserDTO{ID: uuid.New(), Username: "alice", DisplayName: "Alice", CreatedAt: time.Unix(1700000000, 0).UTC()} + calls := 0 + repo.user = func(_ context.Context, id uuid.UUID) (dto.UserDTO, error) { + calls++ + if id != expected.ID { + t.Fatalf("profile queried for %s instead of %s", id, expected.ID) + } + return expected, nil + } + svc := newStubService(t, repo) + + // Act. + got, err := svc.UsersGetMe(t.Context(), expected.ID.String()) + + // Assert. + if err != nil { + t.Fatal(err) + } + if calls != 1 || got != expected { + t.Fatalf("calls=%d, got=%+v, want=%+v", calls, got, expected) + } + }) + + t.Run("Negative: unknown identity", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + repo.user = func(_ context.Context, _ uuid.UUID) (dto.UserDTO, error) { + return dto.UserDTO{}, store.ErrNotFound + } + svc := newStubService(t, repo) + wantErr := service.ErrUnauthorized + + // Act. + got, err := svc.UsersGetMe(t.Context(), uuid.NewString()) + + // Assert. + if !errors.Is(err, wantErr) { + t.Fatalf("error=%v, want=%v", err, wantErr) + } + if got != (dto.UserDTO{}) { + t.Fatalf("failed operation returned a profile: %+v", got) + } + }) + + t.Run("Negative: storage failure preserved", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + wantErr := errors.New("profile unavailable") + repo.user = func(_ context.Context, _ uuid.UUID) (dto.UserDTO, error) { + return dto.UserDTO{}, wantErr + } + svc := newStubService(t, repo) + + // Act. + got, err := svc.UsersGetMe(t.Context(), uuid.NewString()) + + // Assert. + if !errors.Is(err, wantErr) { + t.Fatalf("error=%v, want=%v", err, wantErr) + } + if got != (dto.UserDTO{}) { + t.Fatalf("failed operation returned a profile: %+v", got) + } + }) +} + +// TestService_UsersGetMe_InvalidIdentity rejects malformed identifiers before any store call. +func TestService_UsersGetMe_InvalidIdentity(t *testing.T) { + cases := []struct { + name string + raw string + }{ + {"Negative: missing header", ""}, + {"Negative: short ID", "invalid"}, + {"Negative: non-UUID characters", strings.Repeat("z", 36)}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + svc := newStubService(t, newStoreStub(t)) + + // Act. + got, err := svc.UsersGetMe(t.Context(), tc.raw) + + // Assert. + if !errors.Is(err, service.ErrUnauthorized) || got != (dto.UserDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + }) + } +} + +// TestService_UsersCheckIdentity uses the existence query and never loads a profile. +func TestService_UsersCheckIdentity(t *testing.T) { + t.Run("Positive: existence check without profile loading", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + id := uuid.New() + calls := 0 + repo.usersExist = func(_ context.Context, ids []uuid.UUID) (bool, error) { + calls++ + if !slices.Equal(ids, []uuid.UUID{id}) { + t.Fatalf("queried IDs=%v", ids) + } + return true, nil + } + svc := newStubService(t, repo) + + // Act. + err := svc.UsersCheckIdentity(t.Context(), id.String()) + + // Assert. + if !errors.Is(err, nil) || calls != 1 { + t.Fatalf("calls=%d, error=%v", calls, err) + } + }) + + t.Run("Negative: identity does not exist", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + id := uuid.New() + calls := 0 + repo.usersExist = func(_ context.Context, ids []uuid.UUID) (bool, error) { + calls++ + if !slices.Equal(ids, []uuid.UUID{id}) { + t.Fatalf("queried IDs=%v", ids) + } + return false, nil + } + svc := newStubService(t, repo) + + // Act. + err := svc.UsersCheckIdentity(t.Context(), id.String()) + + // Assert. + if !errors.Is(err, service.ErrUnauthorized) || calls != 1 { + t.Fatalf("calls=%d, error=%v", calls, err) + } + }) + + t.Run("Negative: existence lookup fails", func(t *testing.T) { + // Arrange. + repo := newStoreStub(t) + id := uuid.New() + calls := 0 + failure := errors.New("identity unavailable") + repo.usersExist = func(_ context.Context, ids []uuid.UUID) (bool, error) { + calls++ + if !slices.Equal(ids, []uuid.UUID{id}) { + t.Fatalf("queried IDs=%v", ids) + } + return false, failure + } + svc := newStubService(t, repo) + + // Act. + err := svc.UsersCheckIdentity(t.Context(), id.String()) + + // Assert. + if !errors.Is(err, failure) || calls != 1 { + t.Fatalf("calls=%d, error=%v", calls, err) + } + }) + + t.Run("Negative: malformed identity skips storage", func(t *testing.T) { + // Arrange. + svc := newStubService(t, newStoreStub(t)) + + // Act. + err := svc.UsersCheckIdentity(t.Context(), "invalid") + + // Assert. + if !errors.Is(err, service.ErrUnauthorized) { + t.Fatalf("error=%v", err) + } + }) +} diff --git a/internal/service/production/validation.go b/internal/service/production/validation.go new file mode 100644 index 00000000..84d12bd8 --- /dev/null +++ b/internal/service/production/validation.go @@ -0,0 +1,51 @@ +package production + +import ( + "strings" + "unicode/utf8" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service" +) + +// These bounds come from the mandatory lab1 OpenAPI schema. +const ( + minUsernameLength = 3 + maxUsernameLength = 32 + maxDisplayNameRunes = 100 + maxChatTitleRunes = 100 + maxChatMembers = 100 + maxMessageRunes = 4000 + canonicalUUIDLength = len("00000000-0000-0000-0000-000000000000") +) + +// validText checks that text is nonblank and within its Unicode length limit. +func validText(value string, maxRunes int) bool { + return utf8.ValidString(value) && strings.TrimSpace(value) != "" && utf8.RuneCountInString(value) <= maxRunes +} + +// validUsername checks the username length and permitted ASCII characters. +func validUsername(value string) bool { + if len(value) < minUsernameLength || len(value) > maxUsernameLength { + return false + } + for _, char := range value { + if (char < 'a' || char > 'z') && (char < '0' || char > '9') && char != '_' { + return false + } + } + return true +} + +// parseID parses a canonical UUID or returns a validation error. +func parseID(value string) (uuid.UUID, error) { + if len(value) != canonicalUUIDLength { + return uuid.Nil, service.ErrInvalid + } + id, err := uuid.Parse(value) + if err != nil { + return uuid.Nil, service.ErrInvalid + } + return id, nil +} diff --git a/internal/store/interface.go b/internal/store/interface.go new file mode 100644 index 00000000..90ef47a1 --- /dev/null +++ b/internal/store/interface.go @@ -0,0 +1,54 @@ +// Package store defines typed persistence operations and storage errors. +package store + +import ( + "context" + "errors" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +var ( + // ErrUnavailable means a required storage dependency cannot serve the operation. + ErrUnavailable = errors.New("storage unavailable") + + // ErrNotFound means a record does not exist. + ErrNotFound = errors.New("record not found") + + // ErrConflict means a unique constraint failed. + ErrConflict = errors.New("record already exists") + + // ErrCapacity means the bounded store cannot accept more data. + ErrCapacity = errors.New("storage capacity reached") +) + +// Interface defines persistence operations on validated typed records. +// Implementations own atomicity, unique constraints and storage capacity, but not +// authorization. Callers must validate membership before accessing chat records. +type Interface interface { + // CreateUser atomically enforces username uniqueness and assigns CreatedAt. + CreateUser(ctx context.Context, user dto.UserDTO) (dto.UserDTO, error) + + // User returns a user by ID or ErrNotFound. + User(ctx context.Context, id uuid.UUID) (dto.UserDTO, error) + + // UsersExist reports whether every supplied ID exists; an empty set returns true. + UsersExist(ctx context.Context, ids []uuid.UUID) (bool, error) + + // CreateChat atomically stores a chat and its member indexes, assigning CreatedAt. + CreateChat(ctx context.Context, chat dto.ChatDTO) (dto.ChatDTO, error) + + // Chat returns a defensive copy of the stored chat or ErrNotFound. + Chat(ctx context.Context, id uuid.UUID) (dto.ChatDTO, error) + + // Chats reads up to limit records after position from the user's chat index. + Chats(ctx context.Context, userID uuid.UUID, position dto.PositionDTO, limit int) ([]dto.ChatDTO, error) + + // CreateMessage appends one message atomically and assigns its ordering timestamp. + CreateMessage(ctx context.Context, message dto.MessageDTO) (dto.MessageDTO, error) + + // Messages reads up to limit records strictly after position in one chat. + Messages(ctx context.Context, chatID uuid.UUID, position dto.PositionDTO, limit int) ([]dto.MessageDTO, error) +} diff --git a/internal/store/memory/capacity.go b/internal/store/memory/capacity.go new file mode 100644 index 00000000..715e266d --- /dev/null +++ b/internal/store/memory/capacity.go @@ -0,0 +1,38 @@ +package memory + +import "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + +// Conservative logical charges, not measurements of Go allocations or RSS. +// The budget includes record metadata and index entries; HTTP buffers are separate. +const ( + userRecordOverheadBytes = 256 + chatRecordOverheadBytes = 256 + messageRecordOverheadBytes = 256 + chatMemberIndexBytes = 128 + usernameIndexCopies = 2 +) + +// userCost calculates the logical storage charge for a user and its index entries. +func userCost(user dto.UserDTO) int { + return userRecordOverheadBytes + len(user.Username)*usernameIndexCopies + len(user.DisplayName) +} + +// chatCost calculates the logical storage charge for a chat and its membership index. +func chatCost(chat dto.ChatDTO) int { + return chatRecordOverheadBytes + len(chat.Title) + chatMemberIndexBytes*len(chat.MemberIDs) +} + +// messageCost calculates the logical storage charge for a message. +func messageCost(message dto.MessageDTO) int { + return messageRecordOverheadBytes + len(message.Text) +} + +// reserve checks and charges capacity while the caller holds the write lock. +// Callers must not perform a fallible operation after reserving this budget. +func (s *Store) reserve(bytes int) bool { + if bytes > s.limits.MaxStateBytes-s.usedBytes { + return false + } + s.usedBytes += bytes + return true +} diff --git a/internal/store/memory/chats.go b/internal/store/memory/chats.go new file mode 100644 index 00000000..b0a7501d --- /dev/null +++ b/internal/store/memory/chats.go @@ -0,0 +1,66 @@ +package memory + +import ( + "context" + "slices" + "sort" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// copyChat copies the membership slice to keep stored chat state private. +func copyChat(c dto.ChatDTO) dto.ChatDTO { + c.MemberIDs = slices.Clone(c.MemberIDs) + return c +} + +// CreateChat stores the chat and its member index atomically. +func (s *Store) CreateChat(_ context.Context, c dto.ChatDTO) (dto.ChatDTO, error) { + s.mu.Lock() + defer s.mu.Unlock() + for _, id := range c.MemberIDs { + if _, ok := s.users[id]; !ok { + return dto.ChatDTO{}, store.ErrNotFound + } + } + if len(s.chats) >= s.limits.MaxChats || !s.reserve(chatCost(c)) { + return dto.ChatDTO{}, store.ErrCapacity + } + c.CreatedAt = s.timestamp() + c = copyChat(c) + s.chats[c.ID] = c + for _, id := range c.MemberIDs { + s.userChats[id] = append(s.userChats[id], c) + } + return copyChat(c), nil +} + +// Chat retrieves a defensive copy. Authorization belongs to the service. +func (s *Store) Chat(_ context.Context, id uuid.UUID) (dto.ChatDTO, error) { + s.mu.RLock() + defer s.mu.RUnlock() + c, ok := s.chats[id] + if !ok { + return c, store.ErrNotFound + } + return copyChat(c), nil +} + +// Chats uses the per-member index and binary search, without scanning other chats. +func (s *Store) Chats(_ context.Context, user uuid.UUID, p dto.PositionDTO, limit int) ([]dto.ChatDTO, error) { + s.mu.RLock() + defer s.mu.RUnlock() + all := s.userChats[user] + i := sort.Search(len(all), func(i int) bool { + return after(all[i].CreatedAt, all[i].ID, p) + }) + end := min(len(all), i+limit) + out := make([]dto.ChatDTO, 0, end-i) + for _, c := range all[i:end] { + out = append(out, copyChat(c)) + } + return out, nil +} diff --git a/internal/store/memory/chats_test.go b/internal/store/memory/chats_test.go new file mode 100644 index 00000000..a433cb25 --- /dev/null +++ b/internal/store/memory/chats_test.go @@ -0,0 +1,148 @@ +package memory + +import ( + "errors" + "reflect" + "testing" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// TestStore_CreateChat_RejectsWithoutMutation checks atomic rejection of invalid or excess chats. +func TestStore_CreateChat_RejectsWithoutMutation(t *testing.T) { + t.Run("Negative: chat capacity reached", func(t *testing.T) { + // Arrange. + cfg := config.Default().Memory + cfg.MaxChats = 1 + repo := newTestStore(t, cfg) + member := seedUser(t, repo, "alice") + original := seedChat(t, repo, member.ID) + input := dto.ChatDTO{ID: uuid.New(), Title: "Rejected", MemberIDs: []uuid.UUID{member.ID}} + wantErr := store.ErrCapacity + + previousBytes := repo.usedBytes + + // Act. + got, err := repo.CreateChat(t.Context(), input) + + // Assert. + if !errors.Is(err, wantErr) || got.ID != uuid.Nil { + t.Fatalf("result=%+v, error=%v, want=%v", got, err, wantErr) + } + items, readErr := repo.Chats(t.Context(), member.ID, dto.PositionDTO{}, 10) + if readErr != nil { + t.Fatal(readErr) + } + if !reflect.DeepEqual(items, []dto.ChatDTO{original}) || len(repo.chats) != 1 || repo.usedBytes != previousBytes { + t.Fatalf("rejected chat changed stored state: %v", items) + } + }) + + t.Run("Negative: member does not exist", func(t *testing.T) { + // Arrange. + cfg := config.Default().Memory + cfg.MaxChats = 1 + repo := newTestStore(t, cfg) + member := seedUser(t, repo, "alice") + original := seedChat(t, repo, member.ID) + input := dto.ChatDTO{ID: uuid.New(), Title: "Rejected", MemberIDs: []uuid.UUID{member.ID}} + wantErr := store.ErrNotFound + input.MemberIDs = append(input.MemberIDs, uuid.New()) + + previousBytes := repo.usedBytes + + // Act. + got, err := repo.CreateChat(t.Context(), input) + + // Assert. + if !errors.Is(err, wantErr) || got.ID != uuid.Nil { + t.Fatalf("result=%+v, error=%v, want=%v", got, err, wantErr) + } + items, readErr := repo.Chats(t.Context(), member.ID, dto.PositionDTO{}, 10) + if readErr != nil { + t.Fatal(readErr) + } + if !reflect.DeepEqual(items, []dto.ChatDTO{original}) || len(repo.chats) != 1 || repo.usedBytes != previousBytes { + t.Fatalf("rejected chat changed stored state: %v", items) + } + }) +} + +// TestStore_CreateChat_DefensiveCopy ensures callers cannot mutate membership through write boundaries. +func TestStore_CreateChat_DefensiveCopy(t *testing.T) { + t.Run("Positive: isolated input membership", func(t *testing.T) { + // Arrange. + repo := newTestStore(t, config.Default().Memory) + member := seedUser(t, repo, "alice") + input := dto.ChatDTO{ID: uuid.New(), Title: "Team", MemberIDs: []uuid.UUID{member.ID}} + _, err := repo.CreateChat(t.Context(), input) + if err != nil { + t.Fatal(err) + } + + // Act: a caller modifies the slice it owns after CreateChat returns. + + input.MemberIDs[0] = uuid.New() + + // Assert. + stored, err := repo.Chat(t.Context(), input.ID) + if err != nil { + t.Fatal(err) + } + if len(stored.MemberIDs) != 1 || stored.MemberIDs[0] != member.ID { + t.Fatalf("caller mutated stored membership: %+v", stored) + } + }) + + t.Run("Positive: isolated result membership", func(t *testing.T) { + // Arrange. + repo := newTestStore(t, config.Default().Memory) + member := seedUser(t, repo, "alice") + input := dto.ChatDTO{ID: uuid.New(), Title: "Team", MemberIDs: []uuid.UUID{member.ID}} + created, err := repo.CreateChat(t.Context(), input) + if err != nil { + t.Fatal(err) + } + + // Act: a caller modifies the slice it owns after CreateChat returns. + + created.MemberIDs[0] = uuid.New() + + // Assert. + stored, err := repo.Chat(t.Context(), input.ID) + if err != nil { + t.Fatal(err) + } + if len(stored.MemberIDs) != 1 || stored.MemberIDs[0] != member.ID { + t.Fatalf("caller mutated stored membership: %+v", stored) + } + }) +} + +// TestStore_Chat_DefensiveCopy ensures a fetched detail cannot alter future reads. +func TestStore_Chat_DefensiveCopy(t *testing.T) { + // Arrange. + repo := newTestStore(t, config.Default().Memory) + member := seedUser(t, repo, "alice") + original := seedChat(t, repo, member.ID) + fetched, err := repo.Chat(t.Context(), original.ID) + if err != nil { + t.Fatal(err) + } + + // Act. + fetched.MemberIDs[0] = uuid.New() + + // Assert. + stored, err := repo.Chat(t.Context(), original.ID) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(stored, original) { + t.Fatalf("read changed stored chat: %+v", stored) + } +} diff --git a/internal/store/memory/messages.go b/internal/store/memory/messages.go new file mode 100644 index 00000000..a56eb98c --- /dev/null +++ b/internal/store/memory/messages.go @@ -0,0 +1,41 @@ +package memory + +import ( + "context" + "sort" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// CreateMessage assigns ordering and publishes one complete message atomically. +func (s *Store) CreateMessage(_ context.Context, m dto.MessageDTO) (dto.MessageDTO, error) { + s.mu.Lock() + defer s.mu.Unlock() + if _, ok := s.chats[m.ChatID]; !ok { + return dto.MessageDTO{}, store.ErrNotFound + } + if s.messageCount >= s.limits.MaxMessages || !s.reserve(messageCost(m)) { + return dto.MessageDTO{}, store.ErrCapacity + } + m.CreatedAt = s.timestamp() + s.messages[m.ChatID] = append(s.messages[m.ChatID], m) + s.messageCount++ + return m, nil +} + +// Messages performs keyset pagination over an append-only ordered history. +func (s *Store) Messages(_ context.Context, chat uuid.UUID, p dto.PositionDTO, limit int) ([]dto.MessageDTO, error) { + s.mu.RLock() + defer s.mu.RUnlock() + all := s.messages[chat] + i := sort.Search(len(all), func(i int) bool { + return after(all[i].CreatedAt, all[i].ID, p) + }) + end := min(len(all), i+limit) + out := make([]dto.MessageDTO, end-i) + copy(out, all[i:end]) + return out, nil +} diff --git a/internal/store/memory/messages_test.go b/internal/store/memory/messages_test.go new file mode 100644 index 00000000..9550729e --- /dev/null +++ b/internal/store/memory/messages_test.go @@ -0,0 +1,72 @@ +package memory + +import ( + "errors" + "reflect" + "strings" + "testing" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// TestStore_CreateMessage_ByteCapacity preserves acknowledged history and accounting on rejection. +func TestStore_CreateMessage_ByteCapacity(t *testing.T) { + // Arrange. + cfg := config.Default().Memory + cfg.MaxStateBytes = 2048 + repo := newTestStore(t, cfg) + member := seedUser(t, repo, "alice") + chat := seedChat(t, repo, member.ID) + original := seedMessage(t, repo, chat, "kept") + input := dto.MessageDTO{ID: uuid.New(), ChatID: chat.ID, SenderID: member.ID, Text: strings.Repeat("x", 2000)} + previousBytes := repo.usedBytes + + // Act. + got, err := repo.CreateMessage(t.Context(), input) + + // Assert. + if !errors.Is(err, store.ErrCapacity) || got != (dto.MessageDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + items, readErr := repo.Messages(t.Context(), chat.ID, dto.PositionDTO{}, 10) + if readErr != nil { + t.Fatal(readErr) + } + if !reflect.DeepEqual(items, []dto.MessageDTO{original}) || repo.messageCount != 1 || repo.usedBytes != previousBytes { + t.Fatalf("overflow changed history or accounting: %v", items) + } +} + +// TestStore_CreateMessage_ClockRollback preserves chronological append order after a clock rollback. +func TestStore_CreateMessage_ClockRollback(t *testing.T) { + // Arrange. + repo := newTestStore(t, config.Default().Memory) + member := seedUser(t, repo, "alice") + chat := seedChat(t, repo, member.ID) + repo.lastTime = time.Now().UTC().Add(time.Hour) + first := seedMessage(t, repo, chat, "first") + input := dto.MessageDTO{ID: uuid.New(), ChatID: chat.ID, SenderID: member.ID, Text: "second"} + + // Act. + second, err := repo.CreateMessage(t.Context(), input) + + // Assert. + if err != nil { + t.Fatal(err) + } + if !second.CreatedAt.After(first.CreatedAt) { + t.Fatalf("second=%s must follow first=%s", second.CreatedAt, first.CreatedAt) + } + page, readErr := repo.Messages(t.Context(), chat.ID, dto.PositionDTO{CreatedAt: first.CreatedAt, ID: first.ID}, 10) + if readErr != nil { + t.Fatal(readErr) + } + if !reflect.DeepEqual(page, []dto.MessageDTO{second}) { + t.Fatalf("continuation lost the later message: %v", page) + } +} diff --git a/internal/store/memory/ordering.go b/internal/store/memory/ordering.go new file mode 100644 index 00000000..a3576b1d --- /dev/null +++ b/internal/store/memory/ordering.go @@ -0,0 +1,25 @@ +package memory + +import ( + "bytes" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// timestamp is called under the write lock, keeping append order during clock rollback. +func (s *Store) timestamp() time.Time { + now := time.Now().UTC() + if !now.After(s.lastTime) { + now = s.lastTime.Add(time.Nanosecond) + } + s.lastTime = now + return now +} + +// after compares a record with a keyset pagination position. +func after(t time.Time, id uuid.UUID, p dto.PositionDTO) bool { + return t.After(p.CreatedAt) || (t.Equal(p.CreatedAt) && bytes.Compare(id[:], p.ID[:]) > 0) +} diff --git a/internal/store/memory/store.go b/internal/store/memory/store.go new file mode 100644 index 00000000..9df013c6 --- /dev/null +++ b/internal/store/memory/store.go @@ -0,0 +1,47 @@ +// Package memory implements synchronized storage within one bounded process. +package memory + +import ( + "sync" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// Store owns all mutable state and its indexes under one lock. +// Records are immutable once published; membership slices are copied on both +// write and read boundaries. Its zero value is not usable; construct it with New. +type Store struct { + mu sync.RWMutex + limits config.Memory + users map[uuid.UUID]dto.UserDTO + usernames map[string]uuid.UUID + chats map[uuid.UUID]dto.ChatDTO + userChats map[uuid.UUID][]dto.ChatDTO + messages map[uuid.UUID][]dto.MessageDTO + messageCount int + usedBytes int + lastTime time.Time +} + +var _ store.Interface = (*Store)(nil) + +// New validates and copies capacity settings, then initializes an empty store. +// It creates no files, goroutines or external connections. +func New(cfg *config.Memory) (*Store, error) { + if err := cfg.Validate(); err != nil { + return nil, err + } + return &Store{ + limits: *cfg, + users: make(map[uuid.UUID]dto.UserDTO), + usernames: make(map[string]uuid.UUID), + chats: make(map[uuid.UUID]dto.ChatDTO), + userChats: make(map[uuid.UUID][]dto.ChatDTO), + messages: make(map[uuid.UUID][]dto.MessageDTO), + }, nil +} diff --git a/internal/store/memory/store_test.go b/internal/store/memory/store_test.go new file mode 100644 index 00000000..2d516760 --- /dev/null +++ b/internal/store/memory/store_test.go @@ -0,0 +1,64 @@ +package memory + +import ( + "testing" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// TestStore_New rejects missing capacity settings. +func TestStore_New(t *testing.T) { + // Arrange. + var cfg *config.Memory + + // Act. + repo, err := New(cfg) + + // Assert. + if err == nil || repo != nil { + t.Fatalf("missing configuration accepted: %v, %v", repo, err) + } +} + +// newTestStore creates independent storage for one scenario. +func newTestStore(t *testing.T, cfg *config.Memory) *Store { + t.Helper() + repo, err := New(cfg) + if err != nil { + t.Fatal(err) + } + return repo +} + +// seedUser creates a fixture user and checks preparation errors. +func seedUser(t *testing.T, repo *Store, username string) dto.UserDTO { + t.Helper() + user, err := repo.CreateUser(t.Context(), dto.UserDTO{ID: uuid.New(), Username: username}) + if err != nil { + t.Fatal(err) + } + return user +} + +// seedChat creates a fixture chat for an existing member. +func seedChat(t *testing.T, repo *Store, member uuid.UUID) dto.ChatDTO { + t.Helper() + chat, err := repo.CreateChat(t.Context(), dto.ChatDTO{ID: uuid.New(), Title: "Fixture", MemberIDs: []uuid.UUID{member}}) + if err != nil { + t.Fatal(err) + } + return chat +} + +// seedMessage creates an acknowledged fixture message. +func seedMessage(t *testing.T, repo *Store, chat dto.ChatDTO, text string) dto.MessageDTO { + t.Helper() + message, err := repo.CreateMessage(t.Context(), dto.MessageDTO{ID: uuid.New(), ChatID: chat.ID, SenderID: chat.MemberIDs[0], Text: text}) + if err != nil { + t.Fatal(err) + } + return message +} diff --git a/internal/store/memory/users.go b/internal/store/memory/users.go new file mode 100644 index 00000000..bae9971e --- /dev/null +++ b/internal/store/memory/users.go @@ -0,0 +1,50 @@ +package memory + +import ( + "context" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// CreateUser atomically enforces uniqueness and resource limits. +func (s *Store) CreateUser(_ context.Context, u dto.UserDTO) (dto.UserDTO, error) { + s.mu.Lock() + defer s.mu.Unlock() + if _, ok := s.usernames[u.Username]; ok { + return dto.UserDTO{}, store.ErrConflict + } + if len(s.users) >= s.limits.MaxUsers || !s.reserve(userCost(u)) { + return dto.UserDTO{}, store.ErrCapacity + } + u.CreatedAt = s.timestamp() + s.users[u.ID] = u + s.usernames[u.Username] = u.ID + return u, nil +} + +// User retrieves an immutable user. +func (s *Store) User(_ context.Context, id uuid.UUID) (dto.UserDTO, error) { + s.mu.RLock() + defer s.mu.RUnlock() + u, ok := s.users[id] + if !ok { + return u, store.ErrNotFound + } + return u, nil +} + +// UsersExist checks the complete set under one read lock without loading user records. +// Empty sets return true, and duplicate IDs do not affect the result. +func (s *Store) UsersExist(_ context.Context, ids []uuid.UUID) (bool, error) { + s.mu.RLock() + defer s.mu.RUnlock() + for _, id := range ids { + if _, exists := s.users[id]; !exists { + return false, nil + } + } + return true, nil +} diff --git a/internal/store/memory/users_test.go b/internal/store/memory/users_test.go new file mode 100644 index 00000000..a2dfaccc --- /dev/null +++ b/internal/store/memory/users_test.go @@ -0,0 +1,116 @@ +package memory + +import ( + "errors" + "testing" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// TestStore_UsersExist checks all-members semantics on an independent store per case. +func TestStore_UsersExist(t *testing.T) { + t.Run("Positive: existing user", func(t *testing.T) { + // Arrange. + repo := newTestStore(t, config.Default().Memory) + user := seedUser(t, repo, "alice") + ids := []uuid.UUID{user.ID} + want := true + + // Act. + got, err := repo.UsersExist(t.Context(), ids) + + // Assert. + if err != nil { + t.Fatal(err) + } + if got != want { + t.Fatalf("UsersExist(%v)=%v, want=%v", ids, got, want) + } + }) + + t.Run("Positive: duplicate IDs", func(t *testing.T) { + // Arrange. + repo := newTestStore(t, config.Default().Memory) + user := seedUser(t, repo, "alice") + ids := []uuid.UUID{user.ID} + want := true + + ids = append(ids, user.ID) + + // Act. + got, err := repo.UsersExist(t.Context(), ids) + + // Assert. + if err != nil { + t.Fatal(err) + } + if got != want { + t.Fatalf("UsersExist(%v)=%v, want=%v", ids, got, want) + } + }) + + t.Run("Positive: empty set", func(t *testing.T) { + // Arrange. + repo := newTestStore(t, config.Default().Memory) + var ids []uuid.UUID + want := true + + // Act. + got, err := repo.UsersExist(t.Context(), ids) + + // Assert. + if err != nil { + t.Fatal(err) + } + if got != want { + t.Fatalf("UsersExist(%v)=%v, want=%v", ids, got, want) + } + }) + + t.Run("Negative: missing member", func(t *testing.T) { + // Arrange. + repo := newTestStore(t, config.Default().Memory) + user := seedUser(t, repo, "alice") + ids := []uuid.UUID{user.ID} + want := false + + ids = append(ids, uuid.New()) + + // Act. + got, err := repo.UsersExist(t.Context(), ids) + + // Assert. + if err != nil { + t.Fatal(err) + } + if got != want { + t.Fatalf("UsersExist(%v)=%v, want=%v", ids, got, want) + } + }) +} + +// TestStore_CreateUser_Capacity checks that a refused user consumes no storage or username index. +func TestStore_CreateUser_Capacity(t *testing.T) { + // Arrange. + cfg := config.Default().Memory + cfg.MaxUsers = 1 + repo := newTestStore(t, cfg) + original := seedUser(t, repo, "alice") + rejected := dto.UserDTO{ID: uuid.New(), Username: "bob"} + previousBytes := repo.usedBytes + + // Act. + got, err := repo.CreateUser(t.Context(), rejected) + + // Assert. + if !errors.Is(err, store.ErrCapacity) || got != (dto.UserDTO{}) { + t.Fatalf("result=%+v, error=%v", got, err) + } + if len(repo.users) != 1 || repo.users[original.ID] != original || len(repo.usernames) != 1 || repo.usernames[original.Username] != original.ID || repo.usedBytes != previousBytes { + t.Fatal("refused registration changed storage or indexes") + } +} diff --git a/internal/store/postgres/chats.go b/internal/store/postgres/chats.go new file mode 100644 index 00000000..8946c12d --- /dev/null +++ b/internal/store/postgres/chats.go @@ -0,0 +1,58 @@ +package postgres + +import ( + "context" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// CreateChat commits the chat and every member together, rolling back on any failure. +func (s *Store) CreateChat(ctx context.Context, chat dto.ChatDTO) (dto.ChatDTO, error) { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + err := pgx.BeginFunc(ctx, s.pool, func(tx pgx.Tx) error { + if err := tx.QueryRow(ctx, `INSERT INTO chats(id,title) VALUES(@id,@title) RETURNING created_at`, pgx.StrictNamedArgs{"id": chat.ID, "title": chat.Title}).Scan(&chat.CreatedAt); err != nil { + return err + } + _, err := tx.Exec(ctx, `INSERT INTO chat_members(chat_id,user_id) SELECT @chat,id FROM unnest(@members::uuid[]) AS member(id)`, pgx.StrictNamedArgs{"chat": chat.ID, "members": chat.MemberIDs}) + return err + }) + return chat, normalize(err) +} + +// Chat reads a chat and its immutable membership in one snapshot. +func (s *Store) Chat(ctx context.Context, id uuid.UUID) (dto.ChatDTO, error) { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + var chat dto.ChatDTO + err := s.pool.QueryRow(ctx, `SELECT c.id,c.title,c.created_at,ARRAY(SELECT user_id FROM chat_members WHERE chat_id=c.id ORDER BY user_id) + FROM chats c WHERE c.id=@id`, pgx.StrictNamedArgs{"id": id}).Scan(&chat.ID, &chat.Title, &chat.CreatedAt, &chat.MemberIDs) + return chat, normalize(err) +} + +// Chats returns the requested keyset page of chats visible to a user. +func (s *Store) Chats(ctx context.Context, userID uuid.UUID, position dto.PositionDTO, limit int) ([]dto.ChatDTO, error) { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + rows, err := s.pool.Query(ctx, `SELECT c.id,c.title,c.created_at,ARRAY(SELECT user_id FROM chat_members WHERE chat_id=c.id ORDER BY user_id) + FROM chats c JOIN chat_members m ON m.chat_id=c.id + WHERE m.user_id=@user AND (c.created_at,c.id)>(@time,@id) ORDER BY c.created_at,c.id LIMIT @limit`, pgx.StrictNamedArgs{ + "user": userID, "time": position.CreatedAt, "id": position.ID, "limit": limit, + }) + if err != nil { + return nil, normalize(err) + } + defer rows.Close() + chats := make([]dto.ChatDTO, 0) + for rows.Next() { + var chat dto.ChatDTO + if err := rows.Scan(&chat.ID, &chat.Title, &chat.CreatedAt, &chat.MemberIDs); err != nil { + return nil, normalize(err) + } + chats = append(chats, chat) + } + return chats, normalize(rows.Err()) +} diff --git a/internal/store/postgres/errors_test.go b/internal/store/postgres/errors_test.go new file mode 100644 index 00000000..e326ee84 --- /dev/null +++ b/internal/store/postgres/errors_test.go @@ -0,0 +1,52 @@ +package postgres + +import ( + "context" + "errors" + "fmt" + "io" + "net" + "testing" + + "github.com/jackc/pgx/v5/pgconn" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// TestNormalizeUnavailable classifies dependency failures while retaining their causes. +func TestNormalizeUnavailable(t *testing.T) { + cases := []struct { + name string + err error + }{ + {"deadline", context.DeadlineExceeded}, + {"closed stream", io.EOF}, + {"truncated stream", io.ErrUnexpectedEOF}, + {"network", &net.OpError{Op: "dial", Net: "tcp", Err: errors.New("refused")}}, + {"connection exception", &pgconn.PgError{Code: "08006"}}, + {"connection limit", &pgconn.PgError{Code: "53300"}}, + {"shutdown", &pgconn.PgError{Code: "57P01"}}, + {"crash", &pgconn.PgError{Code: "57P02"}}, + {"starting", &pgconn.PgError{Code: "57P03"}}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + err := normalize(fmt.Errorf("operation failed: %w", tc.err)) + if !errors.Is(err, store.ErrUnavailable) || !errors.Is(err, tc.err) { + t.Fatalf("failure category or cause lost: %T", tc.err) + } + }) + } +} + +// TestNormalizeUnexpected preserves programming errors instead of misclassifying them as outages. +func TestNormalizeUnexpected(t *testing.T) { + for _, code := range []string{"42601", "23503", "42P01"} { + t.Run(code, func(t *testing.T) { + err := &pgconn.PgError{Code: code} + if normalize(err) != err { + t.Fatal("unexpected SQL error was reclassified") + } + }) + } +} diff --git a/internal/store/postgres/messages.go b/internal/store/postgres/messages.go new file mode 100644 index 00000000..1b7ba212 --- /dev/null +++ b/internal/store/postgres/messages.go @@ -0,0 +1,50 @@ +package postgres + +import ( + "context" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// CreateMessage serializes timestamps on the owning chat and atomically appends a message. +func (s *Store) CreateMessage(ctx context.Context, message dto.MessageDTO) (dto.MessageDTO, error) { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + err := pgx.BeginFunc(ctx, s.pool, func(tx pgx.Tx) error { + if err := tx.QueryRow(ctx, `UPDATE chats SET last_message_at=GREATEST(clock_timestamp(),last_message_at+interval '1 microsecond') + WHERE id=@chat RETURNING last_message_at`, pgx.StrictNamedArgs{"chat": message.ChatID}).Scan(&message.CreatedAt); err != nil { + return err + } + _, err := tx.Exec(ctx, `INSERT INTO messages(id,chat_id,sender_id,text,created_at) VALUES(@id,@chat,@sender,@text,@time)`, pgx.StrictNamedArgs{ + "id": message.ID, "chat": message.ChatID, "sender": message.SenderID, "text": message.Text, "time": message.CreatedAt, + }) + return err + }) + return message, normalize(err) +} + +// Messages reads an indexed keyset page without scanning earlier history. +func (s *Store) Messages(ctx context.Context, chatID uuid.UUID, position dto.PositionDTO, limit int) ([]dto.MessageDTO, error) { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + rows, err := s.pool.Query(ctx, `SELECT id,chat_id,sender_id,text,created_at FROM messages + WHERE chat_id=@chat AND (created_at,id)>(@time,@id) ORDER BY created_at,id LIMIT @limit`, pgx.StrictNamedArgs{ + "chat": chatID, "time": position.CreatedAt, "id": position.ID, "limit": limit, + }) + if err != nil { + return nil, normalize(err) + } + defer rows.Close() + messages := make([]dto.MessageDTO, 0) + for rows.Next() { + var message dto.MessageDTO + if err := rows.Scan(&message.ID, &message.ChatID, &message.SenderID, &message.Text, &message.CreatedAt); err != nil { + return nil, normalize(err) + } + messages = append(messages, message) + } + return messages, normalize(rows.Err()) +} diff --git a/internal/store/postgres/migrations/001_initial.sql b/internal/store/postgres/migrations/001_initial.sql new file mode 100644 index 00000000..0a19d68d --- /dev/null +++ b/internal/store/postgres/migrations/001_initial.sql @@ -0,0 +1,34 @@ +CREATE TABLE users ( + id uuid PRIMARY KEY, + username text NOT NULL UNIQUE, + display_name text NOT NULL, + password_hash text NOT NULL DEFAULT '', + created_at timestamptz NOT NULL DEFAULT clock_timestamp() +); +CREATE TABLE chats ( + id uuid PRIMARY KEY, + title text NOT NULL, + created_at timestamptz NOT NULL DEFAULT clock_timestamp(), + last_message_at timestamptz NOT NULL DEFAULT '-infinity' +); +CREATE TABLE chat_members ( + chat_id uuid NOT NULL REFERENCES chats(id), + user_id uuid NOT NULL REFERENCES users(id), + PRIMARY KEY(chat_id,user_id) +); +CREATE INDEX chat_members_user ON chat_members(user_id,chat_id); +CREATE TABLE messages ( + id uuid PRIMARY KEY, + chat_id uuid NOT NULL REFERENCES chats(id), + sender_id uuid NOT NULL REFERENCES users(id), + text text NOT NULL, + created_at timestamptz NOT NULL, + FOREIGN KEY(chat_id,sender_id) REFERENCES chat_members(chat_id,user_id) +); +CREATE INDEX messages_history ON messages(chat_id,created_at,id); +CREATE TABLE sessions ( + token_hash text PRIMARY KEY, + user_id uuid NOT NULL REFERENCES users(id), + expires_at timestamptz NOT NULL +); +CREATE INDEX sessions_expiry ON sessions(expires_at); diff --git a/internal/store/postgres/sessions.go b/internal/store/postgres/sessions.go new file mode 100644 index 00000000..3e64d274 --- /dev/null +++ b/internal/store/postgres/sessions.go @@ -0,0 +1,36 @@ +package postgres + +import ( + "context" + "time" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5" +) + +// SaveSession persists an absolute expiry and a token digest in PostgreSQL. +func (s *Store) SaveSession(ctx context.Context, hash string, userID uuid.UUID, expiry time.Time) error { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + _, err := s.pool.Exec(ctx, `INSERT INTO sessions(token_hash,user_id,expires_at) VALUES(@hash,@user,@expiry)`, pgx.StrictNamedArgs{ + "hash": hash, "user": userID, "expiry": expiry, + }) + return normalize(err) +} + +// SessionUser rejects absent, revoked and expired sessions using database time. +func (s *Store) SessionUser(ctx context.Context, hash string) (uuid.UUID, error) { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + var id uuid.UUID + err := s.pool.QueryRow(ctx, `SELECT user_id FROM sessions WHERE token_hash=@hash AND expires_at>clock_timestamp()`, pgx.StrictNamedArgs{"hash": hash}).Scan(&id) + return id, normalize(err) +} + +// RevokeSession deletes the authoritative session before logout succeeds. +func (s *Store) RevokeSession(ctx context.Context, hash string) error { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + _, err := s.pool.Exec(ctx, `DELETE FROM sessions WHERE token_hash=@hash`, pgx.StrictNamedArgs{"hash": hash}) + return normalize(err) +} diff --git a/internal/store/postgres/store.go b/internal/store/postgres/store.go new file mode 100644 index 00000000..12968062 --- /dev/null +++ b/internal/store/postgres/store.go @@ -0,0 +1,127 @@ +// Package postgres persists messenger records in PostgreSQL. +package postgres + +import ( + "context" + _ "embed" + "errors" + "fmt" + "io" + "net" + "strings" + "time" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" + "github.com/jackc/pgx/v5/pgtype" + "github.com/jackc/pgx/v5/pgxpool" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +//go:embed migrations/001_initial.sql +var initialMigration string + +const migrationLockID = 202602 + +// Options bounds database resource use. +type Options struct { + // URL identifies the isolated application database. + URL string + // MaxConnections bounds concurrent database connections. + MaxConnections int32 + // Timeout bounds each persistence operation. + Timeout time.Duration +} + +// Store owns the PostgreSQL pool; Start and Close belong to application lifecycle. +type Store struct { + pool *pgxpool.Pool + timeout time.Duration +} + +var _ store.Interface = (*Store)(nil) + +// New validates options and builds a lazy pool without opening connections. +func New(options Options) (*Store, error) { + if options.URL == "" || options.MaxConnections < 1 || options.Timeout <= 0 { + return nil, fmt.Errorf("database URL, pool bound and timeout are required") + } + cfg, err := pgxpool.ParseConfig(options.URL) + if err != nil { + return nil, fmt.Errorf("invalid database configuration") + } + cfg.AfterConnect = func(_ context.Context, conn *pgx.Conn) error { + conn.TypeMap().RegisterType(&pgtype.Type{Name: "timestamptz", OID: pgtype.TimestamptzOID, Codec: &pgtype.TimestamptzCodec{ScanLocation: time.UTC}}) + return nil + } + cfg.MaxConns = options.MaxConnections + cfg.ConnConfig.ConnectTimeout = options.Timeout + pool, err := pgxpool.NewWithConfig(context.Background(), cfg) + if err != nil { + return nil, err + } + return &Store{pool: pool, timeout: options.Timeout}, nil +} + +// Start verifies connectivity and applies versioned migrations under a transaction lock. +func (s *Store) Start(ctx context.Context) error { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + return pgx.BeginFunc(ctx, s.pool, func(tx pgx.Tx) error { + if _, err := tx.Exec(ctx, "SELECT pg_advisory_xact_lock(@id)", pgx.StrictNamedArgs{"id": migrationLockID}); err != nil { + return err + } + if _, err := tx.Exec(ctx, "CREATE TABLE IF NOT EXISTS schema_migrations (version integer PRIMARY KEY)"); err != nil { + return err + } + var exists bool + if err := tx.QueryRow(ctx, "SELECT EXISTS(SELECT 1 FROM schema_migrations WHERE version=1)").Scan(&exists); err != nil { + return err + } + if exists { + return nil + } + + if _, err := tx.Exec(ctx, initialMigration); err != nil { + return err + } + _, err := tx.Exec(ctx, "INSERT INTO schema_migrations(version) VALUES(1)") + return err + }) +} + +// Close releases owned pool resources after serving has stopped. +func (s *Store) Close() { + s.pool.Close() +} + +// Ping checks whether mandatory persistence can serve requests. +func (s *Store) Ping(ctx context.Context) error { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + return s.pool.Ping(ctx) +} + +// normalize translates expected database errors without exposing SQL to higher layers. +func normalize(err error) error { + if errors.Is(err, pgx.ErrNoRows) { + return store.ErrNotFound + } + if databaseError, ok := errors.AsType[*pgconn.PgError](err); ok { + if databaseError.Code == "23505" { + return store.ErrConflict + } + if strings.HasPrefix(databaseError.Code, "08") || strings.HasPrefix(databaseError.Code, "53") || + databaseError.Code == "57P01" || databaseError.Code == "57P02" || databaseError.Code == "57P03" { + return fmt.Errorf("%w: %w", store.ErrUnavailable, err) + } + } + var networkError net.Error + var connectError *pgconn.ConnectError + if errors.Is(err, context.DeadlineExceeded) || errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) || + errors.As(err, &networkError) || errors.As(err, &connectError) || pgconn.SafeToRetry(err) { + return fmt.Errorf("%w: %w", store.ErrUnavailable, err) + } + return err +} diff --git a/internal/store/postgres/store_test.go b/internal/store/postgres/store_test.go new file mode 100644 index 00000000..fdda0eef --- /dev/null +++ b/internal/store/postgres/store_test.go @@ -0,0 +1,336 @@ +package postgres + +import ( + "context" + "errors" + "os" + "sync" + "testing" + "time" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// testStore creates an isolated schema inside the explicitly configured test database. +func testStore(t *testing.T) *Store { + t.Helper() + url := os.Getenv("TEST_DATABASE_URL") + if url == "" { + t.Skip("TEST_DATABASE_URL is required for PostgreSQL integration tests") + } + admin, err := pgx.Connect(t.Context(), url) + if err != nil { + t.Fatal(err) + } + schema := "test_" + uuid.New().String()[:8] + identifier := pgx.Identifier{schema}.Sanitize() + if _, err := admin.Exec(t.Context(), "CREATE SCHEMA "+identifier); err != nil { + t.Fatal(err) + } + separator := "?" + if containsQuery(url) { + separator = "&" + } + s, err := New(Options{URL: url + separator + "search_path=" + schema, MaxConnections: 4, Timeout: 3 * time.Second}) + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { + s.Close() + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) + defer cancel() + if _, err := admin.Exec(ctx, "DROP SCHEMA "+identifier+" CASCADE"); err != nil { + t.Error(err) + } + if err := admin.Close(ctx); err != nil { + t.Error(err) + } + }) + if err := s.Start(t.Context()); err != nil { + t.Fatal(err) + } + return s +} + +// containsQuery identifies URL parameters without exposing credentials in test logs. +func containsQuery(value string) bool { + for _, char := range value { + if char == '?' { + return true + } + } + return false +} + +// fixtureUser creates an independent profile for a persistence scenario. +func fixtureUser(t *testing.T, s *Store) dto.UserDTO { + t.Helper() + user, err := s.Register(t.Context(), dto.UserDTO{ID: uuid.New(), Username: "u_" + uuid.NewString()[:8], DisplayName: "Test"}, "test-hash") + if err != nil { + t.Fatal(err) + } + return user +} + +// fixtureChat creates a chat containing an existing user. +func fixtureChat(t *testing.T, s *Store, user dto.UserDTO) dto.ChatDTO { + t.Helper() + chat, err := s.CreateChat(t.Context(), dto.ChatDTO{ID: uuid.New(), Title: "Test", MemberIDs: []uuid.UUID{user.ID}}) + if err != nil { + t.Fatal(err) + } + return chat +} + +// TestMigrationsRepeat verifies idempotent schema initialization. +func TestMigrationsRepeat(t *testing.T) { + s := testStore(t) + user := fixtureUser(t, s) + if err := s.Start(t.Context()); err != nil { + t.Fatal(err) + } + read, err := s.User(t.Context(), user.ID) + if err != nil || read.ID != user.ID || read.CreatedAt.Location() != time.UTC { + t.Fatalf("migration changed data or UTC: %v", err) + } + if err := s.Ping(t.Context()); err != nil { + t.Fatal(err) + } +} + +// TestRegistrationRace verifies database uniqueness under concurrent registration. +func TestRegistrationRace(t *testing.T) { + s := testStore(t) + outcomes := make(chan error, 12) + var wg sync.WaitGroup + for range 12 { + wg.Go(func() { + _, err := s.Register(t.Context(), dto.UserDTO{ID: uuid.New(), Username: "same", DisplayName: "Test"}, "hash") + outcomes <- err + }) + } + wg.Wait() + close(outcomes) + successes := 0 + for err := range outcomes { + if err == nil { + successes++ + } else if !errors.Is(err, store.ErrConflict) { + t.Fatal(err) + } + } + if successes != 1 { + t.Fatalf("got %d successful registrations", successes) + } +} + +// TestCreateChatRollsBack verifies failure of membership insertion leaves no chat. +func TestCreateChatRollsBack(t *testing.T) { + s := testStore(t) + id := uuid.New() + _, err := s.CreateChat(t.Context(), dto.ChatDTO{ID: id, Title: "Rollback", MemberIDs: []uuid.UUID{uuid.New()}}) + if err == nil { + t.Fatal("foreign key failure absent") + } + if _, err := s.Chat(t.Context(), id); !errors.Is(err, store.ErrNotFound) { + t.Fatalf("chat survived rollback: %v", err) + } +} + +// TestChatPageUsesMembershipAndCursor verifies one compound visibility/page invariant. +func TestChatPageUsesMembershipAndCursor(t *testing.T) { + s := testStore(t) + owner := fixtureUser(t, s) + outsider := fixtureUser(t, s) + first := fixtureChat(t, s, owner) + second := fixtureChat(t, s, owner) + fixtureChat(t, s, outsider) + page, err := s.Chats(t.Context(), owner.ID, dto.PositionDTO{CreatedAt: first.CreatedAt, ID: first.ID}, 10) + if err != nil || len(page) != 1 || page[0].ID != second.ID || len(page[0].MemberIDs) != 1 { + t.Fatalf("invalid membership page: %+v %v", page, err) + } +} + +// TestMessagePageOrdersConcurrentWrites verifies monotonic durable ordering and continuation. +func TestMessagePageOrdersConcurrentWrites(t *testing.T) { + s := testStore(t) + user := fixtureUser(t, s) + chat := fixtureChat(t, s, user) + var wg sync.WaitGroup + failures := make(chan error, 20) + for range 20 { + wg.Go(func() { + _, err := s.CreateMessage(t.Context(), dto.MessageDTO{ID: uuid.New(), ChatID: chat.ID, SenderID: user.ID, Text: "synthetic"}) + failures <- err + }) + } + wg.Wait() + close(failures) + for err := range failures { + if err != nil { + t.Fatal(err) + } + } + page, err := s.Messages(t.Context(), chat.ID, dto.PositionDTO{}, 10) + if err != nil || len(page) != 10 { + t.Fatalf("first page: %d %v", len(page), err) + } + for index := 1; index < len(page); index++ { + if !page[index].CreatedAt.After(page[index-1].CreatedAt) { + t.Fatal("timestamps are not monotonic") + } + } + last := page[len(page)-1] + next, err := s.Messages(t.Context(), chat.ID, dto.PositionDTO{CreatedAt: last.CreatedAt, ID: last.ID}, 20) + if err != nil || len(next) != 10 || !next[0].CreatedAt.After(last.CreatedAt) { + t.Fatalf("continuation: %d %v", len(next), err) + } +} + +// TestCredentialsReadsStoredHash checks credential lookup independently of public profiles. +func TestCredentialsReadsStoredHash(t *testing.T) { + s := testStore(t) + user := fixtureUser(t, s) + got, hash, err := s.Credentials(t.Context(), user.Username) + if err != nil || got.ID != user.ID || hash != "test-hash" { + t.Fatalf("credentials mismatch: %v", err) + } +} + +// TestUsersExistChecksAllIDs verifies the set membership contract. +func TestUsersExistChecksAllIDs(t *testing.T) { + for _, missing := range []bool{false, true} { + t.Run(map[bool]string{false: "all exist", true: "missing member"}[missing], func(t *testing.T) { + s := testStore(t) + ids := []uuid.UUID{fixtureUser(t, s).ID} + if missing { + ids = append(ids, uuid.New()) + } + exists, err := s.UsersExist(t.Context(), ids) + if err != nil || exists == missing { + t.Fatalf("exists=%v error=%v", exists, err) + } + }) + } +} + +// TestSessionExpiry rejects persisted sessions whose absolute deadline has passed. +func TestSessionExpiry(t *testing.T) { + s := testStore(t) + user := fixtureUser(t, s) + if err := s.SaveSession(t.Context(), "expired", user.ID, time.Now().Add(-time.Second)); err != nil { + t.Fatal(err) + } + if _, err := s.SessionUser(t.Context(), "expired"); !errors.Is(err, store.ErrNotFound) { + t.Fatalf("expired session accepted: %v", err) + } +} + +// TestSessionRevocation removes a still-valid session from the source of truth. +func TestSessionRevocation(t *testing.T) { + s := testStore(t) + user := fixtureUser(t, s) + if err := s.SaveSession(t.Context(), "live", user.ID, time.Now().Add(time.Hour)); err != nil { + t.Fatal(err) + } + if err := s.RevokeSession(t.Context(), "live"); err != nil { + t.Fatal(err) + } + if _, err := s.SessionUser(t.Context(), "live"); !errors.Is(err, store.ErrNotFound) { + t.Fatalf("revoked session accepted: %v", err) + } +} + +// TestSessionResolvesOwner verifies a live session's immutable identity. +func TestSessionResolvesOwner(t *testing.T) { + s := testStore(t) + user := fixtureUser(t, s) + if err := s.SaveSession(t.Context(), "live", user.ID, time.Now().Add(time.Hour)); err != nil { + t.Fatal(err) + } + id, err := s.SessionUser(t.Context(), "live") + if err != nil || id != user.ID { + t.Fatalf("invalid owner: %v", err) + } +} + +// TestNewRejectsInvalidOptions verifies pool construction errors without connecting. +func TestNewRejectsInvalidOptions(t *testing.T) { + for _, options := range []Options{{}, {URL: "://invalid", MaxConnections: 1, Timeout: time.Second}} { + if _, err := New(options); err == nil { + t.Fatal("invalid options accepted") + } + } +} + +// TestCreateMessageMissingChat reports a typed missing-record error. +func TestCreateMessageMissingChat(t *testing.T) { + s := testStore(t) + _, err := s.CreateMessage(t.Context(), dto.MessageDTO{ID: uuid.New(), ChatID: uuid.New(), SenderID: uuid.New(), Text: "test"}) + if !errors.Is(err, store.ErrNotFound) { + t.Fatal(err) + } +} + +// TestMessagesCanceledReturnsError verifies bounded cancellation before query execution. +func TestMessagesCanceledReturnsError(t *testing.T) { + s := testStore(t) + ctx, cancel := context.WithCancel(t.Context()) + cancel() + if _, err := s.Messages(ctx, uuid.New(), dto.PositionDTO{}, 10); err == nil { + t.Fatal("canceled query succeeded") + } +} + +// TestChatsCanceledReturnsError verifies bounded cancellation of membership pages. +func TestChatsCanceledReturnsError(t *testing.T) { + s := testStore(t) + ctx, cancel := context.WithCancel(t.Context()) + cancel() + if _, err := s.Chats(ctx, uuid.New(), dto.PositionDTO{}, 10); err == nil { + t.Fatal("canceled query succeeded") + } +} + +// TestMigrationCancellationReturnsError checks startup cancellation before migration work. +func TestMigrationCancellationReturnsError(t *testing.T) { + s := testStore(t) + ctx, cancel := context.WithCancel(t.Context()) + cancel() + if err := s.Start(ctx); err == nil { + t.Fatal("canceled migration succeeded") + } +} + +// TestMigrationFailureRollsBackVersion verifies a failed migration is never marked applied. +func TestMigrationFailureRollsBackVersion(t *testing.T) { + s := testStore(t) + if _, err := s.pool.Exec(t.Context(), "DELETE FROM schema_migrations"); err != nil { + t.Fatal(err) + } + if err := s.Start(t.Context()); err == nil { + t.Fatal("conflicting unversioned schema accepted") + } + var count int + if err := s.pool.QueryRow(t.Context(), "SELECT count(*) FROM schema_migrations").Scan(&count); err != nil { + t.Fatal(err) + } + if count != 0 { + t.Fatal("failed migration version committed") + } +} + +// TestMigrationRejectsBrokenVersionLedger verifies corrupt migration metadata stops startup safely. +func TestMigrationRejectsBrokenVersionLedger(t *testing.T) { + s := testStore(t) + if _, err := s.pool.Exec(t.Context(), "ALTER TABLE schema_migrations RENAME COLUMN version TO broken_version"); err != nil { + t.Fatal(err) + } + if err := s.Start(t.Context()); err == nil { + t.Fatal("broken version ledger accepted") + } +} diff --git a/internal/store/postgres/users.go b/internal/store/postgres/users.go new file mode 100644 index 00000000..3cac3225 --- /dev/null +++ b/internal/store/postgres/users.go @@ -0,0 +1,58 @@ +package postgres + +import ( + "context" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// CreateUser inserts a profile and enforces uniqueness inside PostgreSQL. +func (s *Store) CreateUser(ctx context.Context, user dto.UserDTO) (dto.UserDTO, error) { + return s.Register(ctx, user, "") +} + +// Register atomically stores a profile and its password hash. +func (s *Store) Register(ctx context.Context, user dto.UserDTO, passwordHash string) (dto.UserDTO, error) { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + err := s.pool.QueryRow(ctx, `INSERT INTO users(id,username,display_name,password_hash) + VALUES(@id,@username,@display_name,@password_hash) RETURNING created_at`, pgx.StrictNamedArgs{ + "id": user.ID, + "username": user.Username, + "display_name": user.DisplayName, + "password_hash": passwordHash, + }).Scan(&user.CreatedAt) + return user, normalize(err) +} + +// User reads a profile without credentials. +func (s *Store) User(ctx context.Context, id uuid.UUID) (dto.UserDTO, error) { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + var user dto.UserDTO + err := s.pool.QueryRow(ctx, `SELECT id,username,display_name,created_at FROM users WHERE id=@id`, pgx.StrictNamedArgs{"id": id}).Scan(&user.ID, &user.Username, &user.DisplayName, &user.CreatedAt) + return user, normalize(err) +} + +// Credentials reads the account needed for password verification. +func (s *Store) Credentials(ctx context.Context, username string) (dto.UserDTO, string, error) { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + var user dto.UserDTO + var hash string + err := s.pool.QueryRow(ctx, `SELECT id,username,display_name,created_at,password_hash FROM users WHERE username=@username`, pgx.StrictNamedArgs{"username": username}).Scan(&user.ID, &user.Username, &user.DisplayName, &user.CreatedAt, &hash) + return user, hash, normalize(err) +} + +// UsersExist checks all distinct requested identifiers in one bounded query. +func (s *Store) UsersExist(ctx context.Context, ids []uuid.UUID) (bool, error) { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + var exists bool + err := s.pool.QueryRow(ctx, `SELECT NOT EXISTS (SELECT id FROM unnest(@ids::uuid[]) AS requested(id) + WHERE NOT EXISTS (SELECT 1 FROM users WHERE users.id=requested.id))`, pgx.StrictNamedArgs{"ids": ids}).Scan(&exists) + return exists, normalize(err) +} diff --git a/internal/strictjson/decode.go b/internal/strictjson/decode.go new file mode 100644 index 00000000..366b92d4 --- /dev/null +++ b/internal/strictjson/decode.go @@ -0,0 +1,79 @@ +// Package strictjson decodes objects with an exact set of required, non-null fields. +package strictjson + +import ( + "bytes" + "encoding/json" + "errors" + "io" + "slices" + "unicode/utf8" +) + +// ErrInvalid indicates invalid JSON, encoding, fields or destination field types. +var ErrInvalid = errors.New("invalid JSON object") + +// DecodeObject decodes one UTF-8 object with exactly the listed required fields. +// Duplicate, unknown, missing and null fields are rejected before unmarshaling. +// The destination must describe the supplied fields; this is not a general schema validator. +func DecodeObject(body []byte, target any, requiredFields ...string) error { + if !utf8.Valid(body) { + return ErrInvalid + } + if err := validateObject(body, requiredFields); err != nil { + return err + } + if err := json.Unmarshal(body, target); err != nil { + return ErrInvalid + } + return nil +} + +// validateObject enforces exact, unique, non-null required keys and one JSON value. +// All lab1 request properties are required; this is not a generic schema validator. +func validateObject(body []byte, requiredFields []string) error { + decoder := json.NewDecoder(bytes.NewReader(body)) + token, err := decoder.Token() + if err != nil || token != json.Delim('{') { + return ErrInvalid + } + seen := make(map[string]bool, len(requiredFields)) + for decoder.More() { + key, err := readObjectField(decoder, requiredFields, seen) + if err != nil { + return err + } + seen[key] = true + } + if token, err = decoder.Token(); err != nil || token != json.Delim('}') { + return ErrInvalid + } + if len(seen) != len(requiredFields) { + return ErrInvalid + } + var trailing any + if err := decoder.Decode(&trailing); err != io.EOF { + return ErrInvalid + } + return nil +} + +// readObjectField reads a known, unique, non-null JSON object field. +func readObjectField(decoder *json.Decoder, requiredFields []string, seen map[string]bool) (string, error) { + token, err := decoder.Token() + if err != nil { + return "", ErrInvalid + } + key, ok := token.(string) + if !ok || seen[key] || !slices.Contains(requiredFields, key) { + return "", ErrInvalid + } + var value json.RawMessage + if err := decoder.Decode(&value); err != nil { + return "", ErrInvalid + } + if bytes.Equal(bytes.TrimSpace(value), []byte("null")) { + return "", ErrInvalid + } + return key, nil +} diff --git a/internal/strictjson/decode_test.go b/internal/strictjson/decode_test.go new file mode 100644 index 00000000..5c3b4285 --- /dev/null +++ b/internal/strictjson/decode_test.go @@ -0,0 +1,52 @@ +package strictjson + +import ( + "errors" + "testing" +) + +type input struct { + // Name contains the only accepted field in these fixed-schema tests. + Name string `json:"name"` +} + +// TestDecodeObject checks each fixed-schema rule with a fresh destination. +func TestDecodeObject(t *testing.T) { + cases := []struct { + name string + body string + want string + wantErr error + }{ + {"Positive: Unicode preserved", `{"name":"Алиса 👋"}`, "Алиса 👋", nil}, + {"Negative: missing field", `{}`, "", ErrInvalid}, + {"Negative: unknown field", `{"name":"alice","extra":true}`, "", ErrInvalid}, + {"Negative: duplicate field", `{"name":"alice","name":"bob"}`, "", ErrInvalid}, + {"Negative: case mismatch", `{"Name":"alice"}`, "", ErrInvalid}, + {"Negative: null field", `{"name":null}`, "", ErrInvalid}, + {"Negative: wrong value type", `{"name":12}`, "", ErrInvalid}, + {"Negative: invalid UTF-8", "{\"name\":\"\xff\"}", "", ErrInvalid}, + {"Negative: array root", `[]`, "", ErrInvalid}, + {"Negative: unclosed object", `{"name":"alice"`, "", ErrInvalid}, + {"Negative: invalid value", `{"name":}`, "", ErrInvalid}, + {"Negative: invalid key", `{name:"alice"}`, "", ErrInvalid}, + {"Negative: trailing value", `{"name":"alice"} {}`, "", ErrInvalid}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + // Arrange. + var destination input + + // Act. + err := DecodeObject([]byte(tc.body), &destination, "name") + + // Assert. + if !errors.Is(err, tc.wantErr) { + t.Fatalf("error=%v, want=%v", err, tc.wantErr) + } + if destination.Name != tc.want { + t.Fatalf("decoded name=%q, want=%q", destination.Name, tc.want) + } + }) + } +} diff --git a/internal/valkey/admission.go b/internal/valkey/admission.go new file mode 100644 index 00000000..28cddc45 --- /dev/null +++ b/internal/valkey/admission.go @@ -0,0 +1,132 @@ +package valkey + +import ( + "context" + "fmt" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/admission" +) + +const ( + admissionWindow = time.Second + admissionLease = 30 * time.Second + releaseTimeout = time.Second +) + +// Budget defines a rate window and concurrent execution capacity. +type Budget struct { + // Rate is the maximum attempts per one-second window. + Rate int + // Slots is the maximum requests executing concurrently. + Slots int +} + +// Limits separates global, route-group and user budgets. +type Limits struct { + // Global covers every business request before authentication. + Global Budget + // Groups covers auth, read and write independently. + Groups map[string]Budget + // User covers all authenticated requests made by one account. + User Budget + // UserGroups limits each authenticated account within a route group. + UserGroups map[string]Budget +} + +// Limiter applies atomic local-shard decisions; global reservations precede user reservations. +type Limiter struct { + client *Client + limits Limits +} + +// NewLimiter validates independent rate and concurrency budgets. +func NewLimiter(client *Client, limits Limits) (*Limiter, error) { + if client == nil || limits.Global.Rate < 1 || limits.Global.Slots < 1 || limits.User.Rate < 1 || limits.User.Slots < 1 { + return nil, fmt.Errorf("client and positive budgets are required") + } + for _, group := range []string{"auth", "read", "write"} { + global := limits.Groups[group] + user := limits.UserGroups[group] + if global.Rate < 1 || global.Slots < 1 || user.Rate < 1 || user.Slots < 1 { + return nil, fmt.Errorf("positive budgets for every group are required") + } + } + groups := make(map[string]Budget, len(limits.Groups)) + userGroups := make(map[string]Budget, len(limits.UserGroups)) + for key, value := range limits.Groups { + groups[key] = value + } + for key, value := range limits.UserGroups { + userGroups[key] = value + } + limits.Groups = groups + limits.UserGroups = userGroups + return &Limiter{client: client, limits: limits}, nil +} + +// Enter atomically reserves two rate and slot budgets on one shard. +// Global admission precedes authentication; user admission follows verified identity. +func (l *Limiter) Enter(ctx context.Context, group, user string) (func(), error) { + groupBudget, ok := l.limits.Groups[group] + if !ok { + return nil, fmt.Errorf("unknown admission group") + } + totalBudget := l.limits.Global + node := l.client.coordinator + prefix := "admission:global" + if user != "" { + prefix = "admission:user:" + user + node = l.client.nodes[l.client.ring.Owner(prefix)] + totalBudget = l.limits.User + groupBudget = l.limits.UserGroups[group] + } + keys := []string{prefix + ":rate", prefix + ":slots", prefix + ":" + group + ":rate", prefix + ":" + group + ":slots"} + token := uuid.NewString() + ctx, cancel := context.WithTimeout(ctx, l.client.timeout) + defer cancel() + result, err := node.Eval(ctx, reserveScript, keys, token, admissionWindow.Milliseconds(), admissionLease.Milliseconds(), totalBudget.Rate, totalBudget.Slots, groupBudget.Rate, groupBudget.Slots).Int() + if err != nil { + return nil, err + } + if result == 1 { + return nil, admission.ErrRate + } + if result == 2 { + return nil, admission.ErrSlots + } + return func() { + releaseCtx, releaseCancel := context.WithTimeout(context.Background(), releaseTimeout) + defer releaseCancel() + // Failed release is bounded by the lease; tokens are never reused. + _ = node.Eval(releaseCtx, releaseScript, []string{keys[1], keys[3]}, token).Err() + }, nil +} + +// Redis TIME and one Lua operation make check-and-reserve indivisible within a shard. +const reserveScript = ` +local clock = redis.call('TIME') +local now = clock[1]*1000 + math.floor(clock[2]/1000) +for i=1,3,2 do + redis.call('ZREMRANGEBYSCORE',KEYS[i+1],'-inf',now) + local rate = tonumber(redis.call('GET',KEYS[i]) or '0') + local limitIndex = i==1 and 4 or 6 + if rate >= tonumber(ARGV[limitIndex]) then return 1 end + if redis.call('ZCARD',KEYS[i+1]) >= tonumber(ARGV[limitIndex+1]) then return 2 end +end +for i=1,3,2 do + local count = redis.call('INCR',KEYS[i]) + if count==1 then redis.call('PEXPIRE',KEYS[i],ARGV[2]) end + redis.call('ZADD',KEYS[i+1],now+tonumber(ARGV[3]),ARGV[1]) + redis.call('PEXPIRE',KEYS[i+1],ARGV[3]) +end +return 0 +` + +const releaseScript = ` +redis.call('ZREM',KEYS[1],ARGV[1]) +redis.call('ZREM',KEYS[2],ARGV[1]) +return 0 +` diff --git a/internal/valkey/cache.go b/internal/valkey/cache.go new file mode 100644 index 00000000..a3a407a9 --- /dev/null +++ b/internal/valkey/cache.go @@ -0,0 +1,42 @@ +package valkey + +import ( + "context" + "encoding/json" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +const profileTTL = 5 * time.Minute + +// GetProfile reads an immutable profile; corrupt values and outages are cache misses. +func (c *Client) GetProfile(ctx context.Context, id uuid.UUID) (dto.UserDTO, bool) { + ctx, cancel := context.WithTimeout(ctx, c.timeout) + defer cancel() + key := "profile:" + id.String() + value, err := c.nodes[c.ring.Owner(key)].Get(ctx, key).Bytes() + if err != nil { + return dto.UserDTO{}, false + } + var user dto.UserDTO + if json.Unmarshal(value, &user) != nil || user.ID != id { + return dto.UserDTO{}, false + } + return user, true +} + +// PutProfile populates the immutable profile cache with a bounded TTL. +func (c *Client) PutProfile(ctx context.Context, user dto.UserDTO) { + ctx, cancel := context.WithTimeout(ctx, c.timeout) + defer cancel() + value, err := json.Marshal(user) + if err != nil { + return + } + key := "profile:" + user.ID.String() + // Cache writes are best effort; PostgreSQL remains the source of truth. + _ = c.nodes[c.ring.Owner(key)].Set(ctx, key, value, profileTTL).Err() +} diff --git a/internal/valkey/client.go b/internal/valkey/client.go new file mode 100644 index 00000000..93eb629f --- /dev/null +++ b/internal/valkey/client.go @@ -0,0 +1,113 @@ +// Package valkey implements sharded cache and admission infrastructure. +package valkey + +import ( + "context" + "crypto/sha256" + "encoding/hex" + "errors" + "fmt" + "sort" + "strings" + "time" + + "github.com/redis/go-redis/v9" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/hashring" +) + +const virtualNodes = 256 + +// Options bounds each independent Valkey connection pool. +type Options struct { + // Nodes maps stable shard identities to network addresses. + Nodes map[string]string + // Coordinator identifies the stable global admission shard. + Coordinator string + // Timeout bounds operations and pool acquisition. + Timeout time.Duration + // PoolSize bounds connections to each shard. + PoolSize int +} + +// Client owns a fixed topology; callers must drain before changing it. +type Client struct { + nodes map[string]*redis.Client + ring *hashring.Ring + coordinator *redis.Client + timeout time.Duration + topology string +} + +// New prepares lazy clients without opening network connections. +func New(options Options) (*Client, error) { + if len(options.Nodes) < 1 || options.PoolSize < 1 || options.Timeout <= 0 { + return nil, fmt.Errorf("valkey nodes, pool bound and timeout are required") + } + ids := make([]string, 0, len(options.Nodes)) + for id, address := range options.Nodes { + if address == "" { + return nil, fmt.Errorf("valkey address is required") + } + ids = append(ids, id) + } + ring, err := hashring.New(ids, virtualNodes) + if err != nil { + return nil, err + } + if _, ok := options.Nodes[options.Coordinator]; !ok { + return nil, fmt.Errorf("coordinator must identify a configured node") + } + sort.Strings(ids) + topologyHash := sha256.Sum256([]byte(strings.Join(ids, ","))) + client := &Client{nodes: make(map[string]*redis.Client), ring: ring, timeout: options.Timeout} + for id, address := range options.Nodes { + client.nodes[id] = redis.NewClient(&redis.Options{ + Addr: address, + PoolSize: options.PoolSize, + MaxActiveConns: options.PoolSize, + PoolTimeout: options.Timeout, + DialTimeout: options.Timeout, + ReadTimeout: options.Timeout, + WriteTimeout: options.Timeout, + ContextTimeoutEnabled: true, + MaxRetries: -1, + }) + } + client.topology = hex.EncodeToString(topologyHash[:]) + client.coordinator = client.nodes[options.Coordinator] + return client, nil +} + +// Ping checks every shard required for safe admission. +func (c *Client) Ping(ctx context.Context) error { + ctx, cancel := context.WithTimeout(ctx, c.timeout) + defer cancel() + for _, node := range c.nodes { + if err := node.Ping(ctx).Err(); err != nil { + return err + } + } + stored, err := c.coordinator.Eval(ctx, topologyScript, []string{"admission:topology"}, c.topology).Text() + if err != nil { + return err + } + if stored != c.topology { + return fmt.Errorf("valkey topology differs: stop admission and drain before changing the ring") + } + return nil +} + +const topologyScript = ` +redis.call('SET',KEYS[1],ARGV[1],'NX') +return redis.call('GET',KEYS[1]) +` + +// Close releases every connection pool owned by the client. +func (c *Client) Close() error { + var result error + for _, node := range c.nodes { + result = errors.Join(result, node.Close()) + } + return result +} diff --git a/internal/valkey/client_test.go b/internal/valkey/client_test.go new file mode 100644 index 00000000..5abe3992 --- /dev/null +++ b/internal/valkey/client_test.go @@ -0,0 +1,247 @@ +package valkey + +import ( + "context" + "errors" + "os" + "sync" + "sync/atomic" + "testing" + "time" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/admission" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" +) + +// testClient connects only to explicitly configured disposable Valkey shards. +func testClient(t *testing.T) *Client { + t.Helper() + address := os.Getenv("TEST_VALKEY_ADDRESS") + if address == "" { + t.Skip("TEST_VALKEY_ADDRESS is required for Valkey integration tests") + } + client, err := New(Options{Nodes: map[string]string{"test": address}, Coordinator: "test", PoolSize: 16, Timeout: time.Second}) + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { + if err := client.Close(); err != nil { + t.Error(err) + } + }) + if err := client.Ping(t.Context()); err != nil { + t.Fatal(err) + } + return client +} + +// testLimits builds independent small budgets for admission scenarios. +func testLimits() Limits { + return Limits{ + Global: Budget{Rate: 10000, Slots: 100}, + User: Budget{Rate: 1000, Slots: 3}, + Groups: map[string]Budget{ + "auth": {Rate: 100, Slots: 4}, + "read": {Rate: 1000, Slots: 50}, + "write": {Rate: 1000, Slots: 50}, + }, + UserGroups: map[string]Budget{ + "auth": {Rate: 10, Slots: 1}, + "read": {Rate: 100, Slots: 2}, + "write": {Rate: 100, Slots: 2}, + }, + } +} + +// TestPerUserSlotsAreAtomic verifies concurrent reservations cannot exceed the group budget. +func TestPerUserSlotsAreAtomic(t *testing.T) { + client := testClient(t) + limiter, err := NewLimiter(client, testLimits()) + if err != nil { + t.Fatal(err) + } + user := uuid.NewString() + var accepted atomic.Int32 + releases := make(chan func(), 30) + failures := make(chan error, 30) + var wg sync.WaitGroup + for range 30 { + wg.Go(func() { + release, err := limiter.Enter(t.Context(), "read", user) + if err == nil { + accepted.Add(1) + releases <- release + } else if !errors.Is(err, admission.ErrSlots) { + failures <- err + } + }) + } + wg.Wait() + close(releases) + close(failures) + for release := range releases { + release() + } + for err := range failures { + t.Error(err) + } + if accepted.Load() != 2 { + t.Fatalf("accepted %d, want exactly two", accepted.Load()) + } +} + +// TestUserGroupsHaveSeparateSlots verifies read saturation does not consume write-group capacity. +func TestUserGroupsHaveSeparateSlots(t *testing.T) { + client := testClient(t) + limiter, err := NewLimiter(client, testLimits()) + if err != nil { + t.Fatal(err) + } + user := uuid.NewString() + for range 2 { + release, err := limiter.Enter(t.Context(), "read", user) + if err != nil { + t.Fatal(err) + } + t.Cleanup(release) + } + release, err := limiter.Enter(t.Context(), "write", user) + if err != nil { + t.Fatal(err) + } + release() +} + +// TestUserRateSurvivesSlotRelease checks that release returns concurrency but not rate tokens. +func TestUserRateSurvivesSlotRelease(t *testing.T) { + client := testClient(t) + limits := testLimits() + limits.User.Rate = 1 + limiter, err := NewLimiter(client, limits) + if err != nil { + t.Fatal(err) + } + user := uuid.NewString() + release, err := limiter.Enter(t.Context(), "read", user) + if err != nil { + t.Fatal(err) + } + release() + if _, err := limiter.Enter(t.Context(), "read", user); !errors.Is(err, admission.ErrRate) { + t.Fatalf("rate budget reset after release: %v", err) + } +} + +// TestAdmissionRejectsUnavailableBackend verifies fail-closed behavior without network fallback. +func TestAdmissionRejectsUnavailableBackend(t *testing.T) { + client := testClient(t) + limiter, err := NewLimiter(client, testLimits()) + if err != nil { + t.Fatal(err) + } + ctx, cancel := context.WithCancel(t.Context()) + cancel() + if _, err := limiter.Enter(ctx, "read", ""); err == nil { + t.Fatal("canceled backend operation admitted request") + } +} + +// TestGlobalAdmissionReleasesSlots verifies the coordinator path and release semantics. +func TestGlobalAdmissionReleasesSlots(t *testing.T) { + client := testClient(t) + limiter, err := NewLimiter(client, testLimits()) + if err != nil { + t.Fatal(err) + } + release, err := limiter.Enter(t.Context(), "read", "") + if err != nil { + t.Fatal(err) + } + release() +} + +// TestProfileRoundTrip checks storage and ownership of immutable cached profiles. +func TestProfileRoundTrip(t *testing.T) { + client := testClient(t) + user := dto.UserDTO{ID: uuid.New(), Username: "synthetic", DisplayName: "Test", CreatedAt: time.Now().UTC()} + client.PutProfile(t.Context(), user) + got, ok := client.GetProfile(t.Context(), user.ID) + if !ok || got.ID != user.ID || got.Username != user.Username { + t.Fatal("profile cache did not preserve account") + } +} + +// TestProfileMissHandlesCorruption verifies corrupt cache entries cannot impersonate another account. +func TestProfileMissHandlesCorruption(t *testing.T) { + client := testClient(t) + id := uuid.New() + key := "profile:" + id.String() + if err := client.nodes[client.ring.Owner(key)].Set(t.Context(), key, `{"ID":"00000000-0000-0000-0000-000000000000"}`, time.Minute).Err(); err != nil { + t.Fatal(err) + } + if _, ok := client.GetProfile(t.Context(), id); ok { + t.Fatal("corrupt profile accepted") + } +} + +// TestProfileBackendFailureIsMiss checks optional-cache fallback semantics. +func TestProfileBackendFailureIsMiss(t *testing.T) { + client := testClient(t) + ctx, cancel := context.WithCancel(t.Context()) + cancel() + if _, ok := client.GetProfile(ctx, uuid.New()); ok { + t.Fatal("failed cache read treated as hit") + } + client.PutProfile(ctx, dto.UserDTO{ID: uuid.New()}) + if err := client.Ping(ctx); err == nil { + t.Fatal("canceled readiness succeeded") + } +} + +// TestClientRejectsInvalidConfiguration covers configuration boundaries without opening sockets. +func TestClientRejectsInvalidConfiguration(t *testing.T) { + cases := []Options{ + {}, + {Nodes: map[string]string{"a": ""}, Coordinator: "a", PoolSize: 1, Timeout: time.Second}, + {Nodes: map[string]string{"": "localhost:6379"}, Coordinator: "", PoolSize: 1, Timeout: time.Second}, + {Nodes: map[string]string{"a": "localhost:6379"}, Coordinator: "b", PoolSize: 1, Timeout: time.Second}, + } + for index, options := range cases { + t.Run(string(rune('a'+index)), func(t *testing.T) { + if _, err := New(options); err == nil { + t.Fatal("invalid client options accepted") + } + }) + } +} + +// TestLimiterRejectsInvalidConfiguration verifies policy completeness. +func TestLimiterRejectsInvalidConfiguration(t *testing.T) { + if _, err := NewLimiter(nil, testLimits()); err == nil { + t.Fatal("nil client accepted") + } + client := testClient(t) + limits := testLimits() + delete(limits.Groups, "auth") + if _, err := NewLimiter(client, limits); err == nil { + t.Fatal("missing group accepted") + } + limiter, err := NewLimiter(client, testLimits()) + if err != nil { + t.Fatal(err) + } + if _, err := limiter.Enter(t.Context(), "unknown", ""); err == nil { + t.Fatal("unknown group accepted") + } +} + +// TestTopologyMismatchFailsClosed prevents replicas from silently splitting user budgets. +func TestTopologyMismatchFailsClosed(t *testing.T) { + client := testClient(t) + client.topology = "different-ring" + if err := client.Ping(t.Context()); err == nil { + t.Fatal("incompatible topology accepted") + } +} diff --git a/scripts/coverage.awk b/scripts/coverage.awk new file mode 100644 index 00000000..982f844f --- /dev/null +++ b/scripts/coverage.awk @@ -0,0 +1,35 @@ +# Aggregate covered statements once per merged block; keep files with no statements as N/A. +FNR == NR { + split($0, fields, "\t") + paths[fields[1]] = fields[2] + hashes[fields[1]] = fields[3] + executable[fields[1]] = fields[4] + next +} +/^mode:/ { next } +{ + file = $1 + sub(/:[^:]*$/, "", file) + if (!(file in paths)) { + print "unknown coverage source: " file > "/dev/stderr" + invalid = 1 + } + total[file] += $2 + if ($3 > 0) covered[file] += $2 +} +END { + print "{\"threshold_per_file\":90,\"files\":[" > summary + separator = "" + for (file in paths) { + percent = total[file] ? sprintf("%.8f", covered[file] * 100 / total[file]) : "null" + printf "%s{\"file\":\"%s\",\"statements\":%d,\"covered\":%d,\"percent\":%s,\"sha256\":\"%s\"}", separator, paths[file], total[file], covered[file], percent, hashes[file] > summary + separator = ",\n" + printf "%8s %s\n", (total[file] ? sprintf("%.2f%%", covered[file] * 100 / total[file]) : "N/A"), paths[file] + if (covered[file] * 100 < total[file] * 90 || (executable[file] && !total[file])) invalid = 1 + } + printf "\n],\"passed\":%s}\n", (invalid ? "false" : "true") > summary + if (invalid) { + print "FAIL: per-file coverage must reach 90%" > "/dev/stderr" + exit 1 + } +} diff --git a/scripts/coverage.sh b/scripts/coverage.sh new file mode 100755 index 00000000..56210675 --- /dev/null +++ b/scripts/coverage.sh @@ -0,0 +1,80 @@ +#!/bin/sh +# Measure unit and real-process coverage, enforcing 90% separately for each Go source file. +set -eu +cd "$(dirname "$0")/.." +GO=${GO:-go} +: "${DATABASE_URL:?Use an isolated test database}" "${VALKEY_SHARDS:?Use test shards}" +: "${TEST_DATABASE_URL:?Use an isolated test database}" "${TEST_VALKEY_ADDRESS:?Use a test shard}" +export APP_PORT=${COVERAGE_PORT:-18080} +export LOG_LEVEL=error +server_pid= +watchdog_pid= +mkdir -p coverage +run_dir=$(mktemp -d "$PWD/coverage/run.XXXXXX") +cleanup() { + if [ -n "$server_pid" ]; then kill "$server_pid" 2>/dev/null || true; wait "$server_pid" 2>/dev/null || true; fi + if [ -n "$watchdog_pid" ]; then kill "$watchdog_pid" 2>/dev/null || true; wait "$watchdog_pid" 2>/dev/null || true; fi + rm -rf "$run_dir" +} +trap cleanup EXIT +trap 'exit 129' HUP +trap 'exit 130' INT +trap 'exit 143' TERM +mkdir "$run_dir/process" +"$GO" build -race -cover -covermode=atomic -coverpkg=./... -o "$run_dir/server" ./cmd/server +"$GO" test -race -coverpkg=./... -coverprofile="$run_dir/unit.out" ./... +export GOCOVERDIR="$run_dir/process" +if "$run_dir/server" unknown >"$run_dir/server-invalid.log" 2>&1; then + echo 'server accepted an unknown command' >&2 + exit 1 +else + test "$?" -eq 1 +fi +"$run_dir/server" >"$run_dir/server.log" 2>&1 & +server_pid=$! +ready=false +for attempt in $(seq 1 60); do + kill -0 "$server_pid" 2>/dev/null || { cat "$run_dir/server.log"; exit 1; } + if curl --fail --silent --max-time 1 "http://localhost:$APP_PORT/health/ready" >/dev/null; then ready=true; break; fi + sleep .25 +done +$ready || { cat "$run_dir/server.log"; exit 1; } +"$run_dir/server" healthcheck +"${PYTHON:-python3}" tests/smoke.py --base-url "http://localhost:$APP_PORT" +kill -TERM "$server_pid" +# Bound the real-process shutdown check; a forced kill makes wait fail. +(sleep 12; kill -KILL "$server_pid" 2>/dev/null || true) & +watchdog_pid=$! +wait "$server_pid" +server_pid= +kill "$watchdog_pid" 2>/dev/null || true +wait "$watchdog_pid" 2>/dev/null || true +watchdog_pid= +unset GOCOVERDIR +"$GO" tool covdata textfmt -i="$run_dir/process" -o="$run_dir/process.out" +awk ' +/^mode:/ { if ($0 != "mode: atomic") exit 1; next } +{ + if (($1 in statements) && statements[$1] != $2) exit 1; + statements[$1] = $2; hits[$1] += $3 +} +END { + print "mode: atomic"; + for (block in statements) print block, statements[block], hits[block] +}' "$run_dir/unit.out" "$run_dir/process.out" > coverage/coverage.out +"$GO" list -f '{{.ImportPath}} {{.Dir}} {{join .GoFiles ","}}' ./... > "$run_dir/packages.txt" +: > "$run_dir/inventory.tsv" +while read -r import_path directory names; do + old_ifs=$IFS + IFS=, + for name in $names; do + checksum=$(shasum -a 256 "$directory/$name") + checksum=${checksum%% *} + relative=${directory#"$PWD/"}/$name + executable=$(awk '/^func[ (]/ {found=1} END {print found+0}' "$directory/$name") + printf '%s\t%s\t%s\t%s\n' "$import_path/$name" "$relative" "$checksum" "$executable" >> "$run_dir/inventory.tsv" + done + IFS=$old_ifs +done < "$run_dir/packages.txt" +awk -v summary=coverage/summary.json -f scripts/coverage.awk "$run_dir/inventory.tsv" coverage/coverage.out +"$GO" version > coverage/go-version.txt diff --git a/scripts/experiment.sh b/scripts/experiment.sh new file mode 100755 index 00000000..31554c23 --- /dev/null +++ b/scripts/experiment.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# Compare controlled replica/resource budgets, then restore the normal HPA configuration. +set -eu +cd "$(dirname "$0")/.." +: "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" "${RELEASE:=lab3}" +: "${DURATION:=30}" "${VUS:=32}" +run_id=$(date -u +%Y%m%d%H%M%S) +export KUBE_CONTEXT NAMESPACE DURATION VUS +mkdir -p evidence +restore() { + helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" -f charts/messenger/values.yaml --wait --wait-for-jobs --timeout 240s +} +trap restore EXIT +printf 'profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool\n' > evidence/scaling-profiles.csv +for profile in fixed1 fixed2 fixed4 growing1 growing2 growing4; do + case "$profile" in + fixed1) replicas=1; cpu=1000; memory=512 ;; + fixed2) replicas=2; cpu=500; memory=256 ;; + fixed4) replicas=4; cpu=250; memory=128 ;; + growing1) replicas=1; cpu=250; memory=128 ;; + growing2) replicas=2; cpu=250; memory=128 ;; + growing4) replicas=4; cpu=250; memory=128 ;; + esac + helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set autoscaling.enabled=false --set "api.replicas=$replicas" --set "api.resources.requests.cpu=${cpu}m,api.resources.limits.cpu=${cpu}m,api.resources.requests.memory=${memory}Mi,api.resources.limits.memory=${memory}Mi" --set-string api.env.GOMEMLIMIT=80MiB --wait --wait-for-jobs --timeout 240s > "evidence/rollout-$profile.txt" + printf '%s,%s,%s,%s,%s,8\n' "$profile" "$profile-$run_id" "$replicas" "$cpu" "$memory" >> evidence/scaling-profiles.csv + RUN="$profile-$run_id" scripts/run-load.sh + done diff --git a/scripts/init-secrets.sh b/scripts/init-secrets.sh new file mode 100755 index 00000000..af9529b1 --- /dev/null +++ b/scripts/init-secrets.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Create lab credentials once, outside Helm values and release history. +set -eu +: "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" +: "${REGISTRY:=asisti.registry.twcstorage.ru}" "${REGISTRY_USER:=token}" +: "${REGISTRY_TOKEN_FILE:=$HOME/.secrets/twc-registry-token}" +test -s "$REGISTRY_TOKEN_FILE" || { echo 'Registry token file is missing or empty' >&2; exit 1; } +umask 077 +work=$(mktemp -d) +trap 'rm -rf "$work"' EXIT +kubectl --context "$KUBE_CONTEXT" create namespace "$NAMESPACE" --dry-run=client -o yaml | kubectl --context "$KUBE_CONTEXT" apply -f - +if ! kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get secret messenger-secrets >/dev/null 2>&1; then + openssl rand -hex 32 | tr -d '\n' > "$work/postgres-password" + printf 'postgres://messenger:%s@postgres:5432/messenger?sslmode=disable' "$(cat "$work/postgres-password")" > "$work/database-url" + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" create secret generic messenger-secrets --from-file="$work/postgres-password" --from-file="$work/database-url" +fi +jq -n --arg registry "$REGISTRY" --arg user "$REGISTRY_USER" --rawfile token "$REGISTRY_TOKEN_FILE" \ + '{auths:{($registry):{auth:(($user+":"+($token | sub("[\\r\\n]+$"; "")))|@base64)}}}' > "$work/config.json" +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" create secret generic registry-pull \ + --type=kubernetes.io/dockerconfigjson --from-file=".dockerconfigjson=$work/config.json" \ + --dry-run=client -o yaml | kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" apply -f - diff --git a/scripts/port-forward.sh b/scripts/port-forward.sh new file mode 100755 index 00000000..84dfa080 --- /dev/null +++ b/scripts/port-forward.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Reconnect the loopback tunnel after the API pod is replaced during restart tests. +set -eu +: "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" +LOCAL_PORT=${LOCAL_PORT:-8080} +child= +cleanup() { + if [ -n "$child" ]; then + kill "$child" 2>/dev/null || true + wait "$child" 2>/dev/null || true + fi + exit 0 +} +trap cleanup INT TERM +while :; do + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" port-forward service/api "$LOCAL_PORT:8080" --address 127.0.0.1 & + child=$! + wait "$child" || true + child= + sleep 1 +done diff --git a/scripts/research.sh b/scripts/research.sh new file mode 100755 index 00000000..4728cc61 --- /dev/null +++ b/scripts/research.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# Run the SQL experiment in a fresh disposable container, never the deployed DB. +set -eu +cd "$(dirname "$0")/.." +mkdir -p evidence +work=$(mktemp -d) +container= +cleanup() { + if [ -n "$container" ]; then docker rm -f "$container" >/dev/null; fi + rm -rf "$work" +} +trap cleanup EXIT +container=$(docker run -d --label purpose=lab2-research --memory=512m --cpus=1 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:17.6-alpine) +for attempt in $(seq 1 60); do + if docker exec "$container" pg_isready -U postgres >/dev/null 2>&1; then break; fi + sleep 1 +done +docker exec "$container" createdb -U postgres messenger +docker exec -i "$container" psql -X -v ON_ERROR_STOP=1 -U postgres -d messenger < internal/store/postgres/migrations/001_initial.sql > /dev/null +docker cp student-tests/plans.sql "$container:/tmp/plans.sql" >/dev/null +{ + date -u '+UTC: %Y-%m-%dT%H:%M:%SZ' + echo 'Hypothesis: composite index improves late-page reads, with additional write cost.' + echo '100000 rows, distribution 90/9/1%; three reads and 1000-row rollback writes per index.' + echo 'Limits: 1 CPU, 512MiB; single local Docker instance; no concurrent writes or PITR.' + docker inspect --format 'Image: {{.Image}}' "$container" + git ls-files --cached --others --exclude-standard cmd internal student-tests/research.sql student-tests/plans.sql scripts/research.sh | sort | while read -r file; do shasum -a 256 "$file"; done + docker exec -i "$container" psql -XAt -v ON_ERROR_STOP=1 -U postgres -d messenger < student-tests/research.sql +} > evidence/sql-research-helm.txt +# Use the actual schema, all table contents, and a fresh target database. +query="SELECT count(*),md5(string_agg(id||':'||chat_id||':'||sender_id||':'||text||':'||created_at,',' ORDER BY id)) FROM messages" +docker exec "$container" psql -XAt -U postgres -d messenger -c "$query" > "$work/before" +{ time docker exec "$container" pg_dump -U postgres -d messenger --no-owner --no-acl > "$work/dump.sql"; } 2>> evidence/sql-research-helm.txt +docker exec "$container" createdb -U postgres restored +{ time docker exec -i "$container" psql -X -v ON_ERROR_STOP=1 -U postgres -d restored < "$work/dump.sql" > /dev/null; } 2>> evidence/sql-research-helm.txt +docker exec "$container" psql -XAt -U postgres -d restored -c "$query" > "$work/after" +diff -u "$work/before" "$work/after" +{ + echo 'PASS: restore row count and checksum match' + cat "$work/after" + wc -c < "$work/dump.sql" + docker exec "$container" psql -X -U postgres -d restored -c "SELECT id,text FROM messages WHERE id IN(md5('1')::uuid,md5('50000')::uuid,md5('100000')::uuid) ORDER BY id" +} >> evidence/sql-research-helm.txt +echo 'PASS: evidence/sql-research-helm.txt' diff --git a/scripts/restart.sh b/scripts/restart.sh new file mode 100755 index 00000000..6a56d3da --- /dev/null +++ b/scripts/restart.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Restart only this lab's API and persistent stores, retaining every PVC. +set -eu +: "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" +replicas=$(kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get deployment api -o jsonpath='{.spec.replicas}') +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" scale deployment/api --replicas=0 +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" wait --for=delete pod -l app=api --timeout=60s +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" rollout restart statefulset/postgres statefulset/valkey +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" rollout status statefulset/postgres --timeout=120s +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" rollout status statefulset/valkey --timeout=120s +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" scale deployment/api --replicas="$replicas" +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" rollout status deployment/api --timeout=120s diff --git a/scripts/run-load.sh b/scripts/run-load.sh new file mode 100755 index 00000000..49286023 --- /dev/null +++ b/scripts/run-load.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# Run the pinned k6 workload inside the cluster and retain raw results and resource samples. +set -eu +cd "$(dirname "$0")/.." +: "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" +: "${RUN:=manual-$(date -u +%Y%m%d%H%M%S)}" "${DURATION:=30}" "${VUS:=32}" "${LOAD_SCRIPT:=scaling.js}" +case "$RUN" in *[!a-z0-9-]*|'') echo 'RUN must be a DNS label' >&2; exit 2 ;; esac +mkdir -p evidence +manifest=$(mktemp) +sampler= +cleanup() { + if [ -n "$sampler" ]; then kill "$sampler" 2>/dev/null || true; wait "$sampler" 2>/dev/null || true; fi + rm -f "$manifest" +} +trap cleanup EXIT +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" create configmap lab3-load-scripts --from-file=student-tests/load/ --dry-run=client -o yaml | kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" apply -f - +helm template lab3 charts/messenger -n "$NAMESPACE" -s templates/load.yaml --set load.enabled=true --set-string "load.run=$RUN" --set-string "load.script=$LOAD_SCRIPT" --set "load.duration=$DURATION" --set "load.vus=$VUS" > "$manifest" +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" apply -f "$manifest" +( + while :; do + date -u '+UTC %Y-%m-%dT%H:%M:%SZ' + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" top pods -l 'app in (lab3-api,lab3-lb,lab3-postgres,lab3-valkey,lab3-load)' || true + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" exec lab3-postgres-0 -- psql -U messenger -d messenger -Atc "SELECT state,wait_event_type,wait_event,count(*) FROM pg_stat_activity WHERE datname='messenger' GROUP BY state,wait_event_type,wait_event" || true + sleep 5 + done +) > "evidence/resources-$RUN.txt" 2>&1 & +sampler=$! +complete=false +for attempt in $(seq 1 140); do + state=$(kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get "job/lab3-load-$RUN" -o json) + if printf '%s' "$state" | jq -e '.status.succeeded > 0' >/dev/null; then complete=true; break; fi + if printf '%s' "$state" | jq -e '.status.failed > 0' >/dev/null; then break; fi + sleep 2 +done +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" logs "job/lab3-load-$RUN" > "evidence/load-$RUN.txt" +$complete || { echo "Load failed; inspect evidence/load-$RUN.txt" >&2; exit 1; } +if [ "$LOAD_SCRIPT" = scaling.js ]; then + jq -R 'fromjson? | select(has("profile"))' "evidence/load-$RUN.txt" > "evidence/load-$RUN.json" + test -s "evidence/load-$RUN.json" +fi diff --git a/scripts/scale-shards.sh b/scripts/scale-shards.sh new file mode 100755 index 00000000..8cdbbe8c --- /dev/null +++ b/scripts/scale-shards.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# Change the ring only after all API pods and their leases have drained. +set -eu +cd "$(dirname "$0")/.." +: "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" "${RELEASE:=lab2}" +: "${SHARDS:?Set SHARDS=2 or SHARDS=3}" +case "$SHARDS" in 2|3) ;; *) echo 'SHARDS must be 2 or 3' >&2; exit 2 ;; esac +# Keep the desired replica count explicit so an interrupted run can resume from zero. +: "${API_REPLICAS:=1}" +helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set api.replicas=0 --wait --timeout 180s +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" wait --for=delete pod -l app=api --timeout=60s +# Maximum lease is 30 seconds; the rate window is one second. +sleep 31 +helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set api.replicas=0 --set "valkey.shards=$SHARDS" --wait --timeout 180s +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" exec valkey-0 -- valkey-cli DEL admission:topology +helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set "api.replicas=$API_REPLICAS" --wait --timeout 180s +printf 'Ring updated. Set valkey.shards=%s in your values file before the next make deploy.\n' "$SHARDS" diff --git a/scripts/stop-one.sh b/scripts/stop-one.sh new file mode 100755 index 00000000..adfe8665 --- /dev/null +++ b/scripts/stop-one.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Terminate the exact observed API pod; its replacement receives a different instance ID. +set -eu +: "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" "${TARGET_INSTANCE_ID:?Expected API pod name}" +case "$TARGET_INSTANCE_ID" in lab3-api-*) ;; *) echo 'Target is not a lab3 API pod' >&2; exit 2 ;; esac +label=$(kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pod "$TARGET_INSTANCE_ID" -o jsonpath='{.metadata.labels.app}') +test "$label" = lab3-api +mkdir -p evidence +printf '%s target=%s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$TARGET_INSTANCE_ID" >> evidence/failover-targets.txt +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" delete pod "$TARGET_INSTANCE_ID" --wait=false diff --git a/scripts/test-faults.sh b/scripts/test-faults.sh new file mode 100755 index 00000000..b80a7e0c --- /dev/null +++ b/scripts/test-faults.sh @@ -0,0 +1,112 @@ +#!/bin/sh +# Exercise real dependency outages on disposable containers; never target the dev cluster. +set -eu +cd "$(dirname "$0")/.." +umask 077 +work=$(mktemp -d) +name="lab2-fault-$(basename "$work" | tr '[:upper:].' '[:lower:]-')" +containers= +cleanup() { + for container in $containers; do + docker unpause "$container" >/dev/null 2>&1 || true + docker rm -f "$container" >/dev/null 2>&1 || true + done + docker network rm "$name" >/dev/null 2>&1 || true + docker image rm "$name" >/dev/null 2>&1 || true + rm -rf "$work" +} +trap cleanup EXIT +trap 'exit 130' INT +trap 'exit 143' TERM +printf 'UTC %s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" +git rev-parse HEAD +shasum -a 256 internal/store/postgres/*.go internal/service/errors.go internal/store/interface.go internal/controller/http/fiber/public_errors.go scripts/test-faults.sh +# Build the working tree, including uncommitted fixes, without publishing an image. +docker build -q -t "$name" . > "$work/build.txt" +docker network create "$name" >/dev/null +pg=$(docker run -d --network "$name" --network-alias postgres -e POSTGRES_PASSWORD=synthetic-fault-password -e POSTGRES_DB=messenger postgres:17.6-alpine) +containers="$pg" +cache=$(docker run -d --network "$name" --network-alias valkey valkey/valkey:8.1.3-alpine) +containers="$containers $cache" +for attempt in $(seq 1 60); do + if docker exec "$pg" pg_isready -U postgres >/dev/null 2>&1; then break; fi + sleep 1 + done +api=$(docker run -d --network "$name" -p 127.0.0.1::8080 \ + -e DATABASE_URL=postgres://postgres:synthetic-fault-password@postgres:5432/messenger?sslmode=disable \ + -e VALKEY_SHARDS=shard0=valkey:6379 -e VALKEY_COORDINATOR=shard0 \ + -e DEPENDENCY_TIMEOUT_MS=500 -e LOG_LEVEL=error "$name") +containers="$containers $api" +base="http://$(docker port "$api" 8080/tcp)" +: > "$work/anonymous" +wait_ready() { + for attempt in $(seq 1 60); do + if curl -fsS --max-time 2 "$base/health/ready" >/dev/null 2>&1; then return; fi + sleep 1 + done + echo 'FAIL: API did not recover within 60 seconds' >&2 + exit 1 +} +# Credentials remain in private temporary curl config files, never in evidence or argv. +request() { + method=$1; path=$2; expected=$3; auth=$4 + shift 4 + result=$(curl -sS --max-time 3 --config "$work/$auth" -X "$method" \ + -H 'Content-Type: application/json' -o "$work/response" \ + -w '%{http_code} %{time_total}' "$base$path" "$@") + status=${result%% *} + elapsed=${result#* } + if [ "$status" != "$expected" ]; then + printf 'FAIL: %s %s expected=%s actual=%s\n' "$method" "$path" "$expected" "$status" >&2 + exit 1 + fi +} +assert_error() { + jq -e --arg code "$1" '.error.code == $code and (.error.request_id | type == "string") and (has("items") | not)' "$work/response" >/dev/null + if rg -qi 'postgres|synthetic-fault-password|dial tcp|SELECT |SQLSTATE|redis|valkey|token_hash' "$work/response"; then + echo 'FAIL: internal dependency details exposed' >&2 + exit 1 + fi +} +wait_ready +request POST /api/v1/users 201 anonymous --data '{"username":"fault_actor","display_name":"Synthetic","password":"synthetic-user-password"}' +user=$(jq -er .id "$work/response") +printf 'header = "Authorization: Basic %s"\n' "$(printf 'fault_actor:synthetic-user-password' | openssl base64 -A)" > "$work/basic" +request POST /api/v1/auth/sessions 201 basic +jq -er '"header = \"Authorization: Bearer " + .token + "\""' "$work/response" > "$work/bearer" +printf 'header = "X-User-Id: %s"\n' "$user" > "$work/spoofed" +printf 'header = "Authorization: Bearer malformed"\n' > "$work/malformed" +printf 'header = "Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"\n' > "$work/unknown" +request POST /api/v1/chats 201 bearer --data "{\"title\":\"Synthetic fault chat\",\"member_ids\":[\"$user\"]}" +chat=$(jq -er .id "$work/response") +history="/api/v1/chats/$chat/messages" +request POST "$history" 201 bearer --data '{"text":"confirmed before outage"}' +cp "$work/response" "$work/message" +request GET "$history" 200 bearer +for dependency in "$pg" "$cache"; do + if [ "$dependency" = "$pg" ]; then label=postgres; else label=valkey; fi + for fault in stop pause; do + docker "$fault" "$dependency" >/dev/null + request GET "$history" 503 bearer + assert_error unavailable + printf 'PASS: %s %s authenticated history => 503 unavailable (%ss)\n' "$label" "$fault" "$elapsed" + request GET /health/ready 503 anonymous + assert_error unavailable + request GET /health/live 200 anonymous + for auth in anonymous spoofed malformed unknown; do + expected=503 + if [ "$label" = postgres ] && [ "$auth" != unknown ]; then expected=401; fi + request GET "$history" "$expected" "$auth" + if [ "$expected" = 401 ]; then assert_error unauthorized; else assert_error unavailable; fi + done + printf 'PASS: %s %s rejects anonymous/spoofed/malformed/unknown identity; liveness=200 readiness=503\n' "$label" "$fault" + if [ "$fault" = stop ]; then docker start "$dependency" >/dev/null; else docker unpause "$dependency" >/dev/null; fi + wait_ready + request GET "$history" 200 bearer + jq -e --slurpfile message "$work/message" '.items == $message' "$work/response" >/dev/null + request GET "$history" 401 anonymous + assert_error unauthorized + printf 'PASS: %s %s recovery preserves the original session and message\n' "$label" "$fault" + done + done +printf 'PASS: real dependency fault scenarios completed\n' diff --git a/student-tests/README.md b/student-tests/README.md new file mode 100644 index 00000000..a477fa34 --- /dev/null +++ b/student-tests/README.md @@ -0,0 +1,13 @@ +# Собственные проверки + +Go-тесты расположены рядом с кодом. `quality_test.go` проверяет документацию объявлений и направление импортов. PostgreSQL-тесты используют реальные запросы и изолированные схемы; Valkey-тесты проверяют атомарные бюджеты, группы, cache hit/miss и topology mismatch. + +Для unit tests: `make test-student`. Для всех интеграционных проверок задать переменные из [REPORT](../REPORT.md). `make coverage` запускает race detector и настоящий инструментированный процесс, проверяет публичный HTTP smoke и SIGTERM, затем применяет порог ≥90% statements отдельно к каждому Go-файлу. + +Тестовые controller fixtures заменяют только Authentication/Admission/Readiness: fixture Bearer равен UUID для изоляции бизнес-сценариев. Production Authentication всегда использует случайный токен и PostgreSQL; это отдельно проверяют unit tests authentication и настоящие HTTP smoke/expiry/persistence. Fixture токены не являются доступным режимом приложения. + +`make research` запускает SQL из `research.sql` и `plans.sql` в новом временном контейнере, с ограничениями 1 CPU и 512 MiB. Исследуемые запросы находятся непосредственно в SQL, shell отвечает только за запуск PostgreSQL и dump/restore. + +`make test-faults` — воспроизводимый HTTP-сценарий реальных отказов PostgreSQL и Valkey. Нужны Docker, curl, jq, rg, OpenSSL и shasum. Скрипт собирает текущий код в локальный образ, создаёт отдельную Docker-сеть и временные контейнеры. Каждый backend по очереди останавливается и приостанавливается (`stop`/`pause`). Проверяются 503/unavailable с действительным токеном, ограничение ожидания 3 секундами при timeout зависимости 500 мс, readiness=503, liveness=200, отсутствие доступа без токена, по X-User-Id, с повреждённым и неизвестным Bearer. После каждого восстановления прежняя сессия читает подтверждённое сообщение без повторного входа. Секреты находятся только во временных файлах; вывод не содержит токенов или тел сообщений. Ресурсы удаляются через trap, dev-кластер не используется. + +Свежий результат: [fault-regression.txt](../evidence/fault-regression.txt). Старые проверки в [dependencies.json](../evidence/dependencies.json) остаются историческими измерениями; текущий сценарий не зависит от удалённой Python-обвязки. TTL отдельно проверяется Go-тестами. diff --git a/student-tests/plans.sql b/student-tests/plans.sql new file mode 100644 index 00000000..9e1ea28f --- /dev/null +++ b/student-tests/plans.sql @@ -0,0 +1,16 @@ +-- Repeat the same read and rolled-back write three times for each index. +SELECT 'EXPLAIN (ANALYZE,BUFFERS,FORMAT JSON) +SELECT id,chat_id,sender_id,text,created_at FROM messages +WHERE chat_id=md5(''1'')::uuid +AND (created_at,id)>(''2026-01-01Z''::timestamptz+85000*interval ''1 microsecond'',md5(''85000'')::uuid) +ORDER BY created_at,id LIMIT 51; +BEGIN; +EXPLAIN (ANALYZE,BUFFERS,FORMAT JSON) +INSERT INTO messages +SELECT md5(n::text)::uuid,md5(''1'')::uuid, +''11111111-1111-4111-8111-111111111111'',''new-synthetic-''||n, +''2026-01-01Z''::timestamptz+n*interval ''1 microsecond'' +FROM generate_series(100001,101000) n; +ROLLBACK;' +FROM generate_series(1,3) +\gexec diff --git a/student-tests/quality_test.go b/student-tests/quality_test.go new file mode 100644 index 00000000..dcbfecc5 --- /dev/null +++ b/student-tests/quality_test.go @@ -0,0 +1,125 @@ +// Package quality checks source-level conventions required by the lab implementation. +package quality + +import ( + "go/ast" + "go/parser" + "go/token" + "io/fs" + "path/filepath" + "strconv" + "strings" + "testing" +) + +// TestExportedDocumentation checks functions, types, constants, fields and interface methods. +func TestExportedDocumentation(t *testing.T) { + visitProductionFiles(t, func(path string, file *ast.File) { + ast.Inspect(file, func(node ast.Node) bool { + switch declaration := node.(type) { + case *ast.FuncDecl: + if declaration.Doc == nil || !strings.HasPrefix(strings.TrimSpace(declaration.Doc.Text()), declaration.Name.Name+" ") { + t.Errorf("%s: function %s needs a prefixed doc comment", path, declaration.Name.Name) + } + case *ast.GenDecl: + for _, spec := range declaration.Specs { + switch spec := spec.(type) { + case *ast.TypeSpec: + doc := spec.Doc + if doc == nil { + doc = declaration.Doc + } + requireDoc(t, path, spec.Name, doc) + case *ast.ValueSpec: + doc := spec.Doc + if doc == nil { + doc = declaration.Doc + } + for _, name := range spec.Names { + requireDoc(t, path, name, doc) + } + } + } + case *ast.StructType: + for _, field := range declaration.Fields.List { + for _, name := range field.Names { + requireDoc(t, path, name, field.Doc) + } + } + case *ast.InterfaceType: + for _, method := range declaration.Methods.List { + for _, name := range method.Names { + requireDoc(t, path, name, method.Doc) + } + } + } + return true + }) + }) +} + +// requireDoc checks that an exported declaration has a correctly prefixed doc comment. +func requireDoc(t *testing.T, path string, name *ast.Ident, doc *ast.CommentGroup) { + t.Helper() + if !name.IsExported() { + return + } + if doc == nil || !strings.HasPrefix(strings.TrimSpace(doc.Text()), name.Name+" ") { + t.Errorf("%s: %s needs a Go doc comment starting with its name", path, name.Name) + } +} + +// TestDependencyDirection prevents concrete infrastructure leaking into higher layers. +func TestDependencyDirection(t *testing.T) { + visitProductionFiles(t, func(path string, file *ast.File) { + normalized := filepath.ToSlash(path) + for _, dependency := range file.Imports { + imported, err := strconv.Unquote(dependency.Path.Value) + if err != nil { + t.Fatal(err) + } + var forbidden []string + switch { + case strings.Contains(normalized, "internal/service/"): + forbidden = []string{"net/http", "github.com/gofiber/", "/internal/controller", "/internal/store/memory", "/internal/store/postgres", "/internal/valkey", "/internal/config", "go.lab260.ru/fielderr"} + case strings.Contains(normalized, "internal/admission/"), strings.Contains(normalized, "internal/strictjson/"): + forbidden = []string{"net/http", "github.com/gofiber/", "/internal/"} + case strings.Contains(normalized, "internal/cursor/"): + forbidden = []string{"net/http", "github.com/gofiber/", "/internal/service", "/internal/store", "/internal/controller", "/internal/model"} + case strings.Contains(normalized, "internal/store/"): + forbidden = []string{"net/http", "github.com/gofiber/", "/internal/controller", "/internal/service"} + case strings.Contains(normalized, "internal/controller/"): + forbidden = []string{"/internal/service/production", "/internal/store"} + } + for _, fragment := range forbidden { + if strings.Contains(imported, fragment) { + t.Errorf("%s: forbidden dependency %s", path, imported) + } + } + } + }) +} + +// visitProductionFiles parses application Go files and visits their syntax trees. +func visitProductionFiles(t *testing.T, visit func(string, *ast.File)) { + t.Helper() + for _, root := range []string{"../cmd", "../internal"} { + err := filepath.WalkDir(root, func(path string, entry fs.DirEntry, err error) error { + if err != nil { + return err + } + if entry.IsDir() || !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") { + return nil + } + file, err := parser.ParseFile(token.NewFileSet(), path, nil, parser.ParseComments) + if err != nil { + return err + } + visit(path, file) + return nil + }) + if err != nil { + t.Fatal(err) + } + } +} diff --git a/student-tests/research.sql b/student-tests/research.sql new file mode 100644 index 00000000..c43c67b1 --- /dev/null +++ b/student-tests/research.sql @@ -0,0 +1,26 @@ +-- Isolated database: actual application schema and a deliberately skewed history. +\set ON_ERROR_STOP on +\timing on +SELECT version(); +INSERT INTO users(id,username,display_name,password_hash) +VALUES('11111111-1111-4111-8111-111111111111','research','Synthetic','not-a-login-hash'); +INSERT INTO chats(id,title) +SELECT md5(n::text)::uuid,'Synthetic '||n FROM generate_series(1,3) n; +INSERT INTO chat_members(chat_id,user_id) +SELECT id,'11111111-1111-4111-8111-111111111111' FROM chats; +INSERT INTO messages(id,chat_id,sender_id,text,created_at) +SELECT md5(n::text)::uuid, + md5((CASE WHEN n<=90000 THEN 1 WHEN n<=99000 THEN 2 ELSE 3 END)::text)::uuid, + '11111111-1111-4111-8111-111111111111','synthetic-'||n, + '2026-01-01Z'::timestamptz+n*interval '1 microsecond' +FROM generate_series(1,100000) AS n; +DROP INDEX messages_history; +CREATE INDEX candidate ON messages(chat_id); +\echo 'VARIANT: chat_only' +ANALYZE messages; +\i /tmp/plans.sql +DROP INDEX candidate; +CREATE INDEX candidate ON messages(chat_id,created_at,id); +\echo 'VARIANT: history_keyset' +ANALYZE messages; +\i /tmp/plans.sql -- 2.54.0 From 94945473009a513b287d8fc56e88d2e5bf81f9ff Mon Sep 17 00:00:00 2001 From: Vladislav Agapov Date: Fri, 16 Oct 2026 11:51:20 +0300 Subject: [PATCH 2/4] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D1=8C=20lab3=20=D0=B2=20=D0=BE=D0=B1=D1=89?= =?UTF-8?q?=D0=B5=D0=BC=20Helm-=D1=80=D0=B5=D0=BB=D0=B8=D0=B7=D0=B5=20?= =?UTF-8?q?=D1=81=20Traefik,=20TLS=20=D0=B8=20HPA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 5 + .github/workflows/application.yml | 2 +- ARCHITECTURE.md | 45 +--- Makefile | 27 ++- REPORT.md | 54 ++++- charts/messenger/Chart.yaml | 2 +- charts/messenger/templates/api.yaml | 35 ++- charts/messenger/templates/hpa.yaml | 33 +++ charts/messenger/templates/ingress.yaml | 23 ++ charts/messenger/templates/load.yaml | 37 ++++ charts/messenger/templates/migrate.yaml | 32 +++ charts/messenger/templates/monitoring.yaml | 19 ++ .../messenger/templates/network-policy.yaml | 32 +++ charts/messenger/values.yaml | 31 ++- cmd/server/app.go | 7 +- cmd/server/app_test.go | 4 + cmd/server/commands.go | 24 ++- cmd/server/persistence.go | 2 +- cmd/server/persistence_test.go | 18 ++ docs/DEFENSE.md | 91 ++------ docs/PLAN.md | 30 +-- docs/SPEC.md | 60 ++---- evidence/coverage-per-file.json | 75 +++++++ evidence/coverage.txt | 95 ++++++++ evidence/failover-targets.txt | 1 + evidence/load-idempotency-20261016084724.txt | 68 ++++++ .../resources-idempotency-20261016084724.txt | 20 ++ evidence/restart-after.txt | 7 + evidence/restart-before.txt | 7 + evidence/shared-contract.txt | 2 + evidence/shared-dependency-faults.txt | 28 +++ evidence/shared-deploy.txt | 8 + evidence/shared-failover-1.txt | 4 + evidence/shared-failover-2-retry.txt | 3 + evidence/shared-failover-2.txt | 3 + evidence/shared-go-tests.txt | 19 ++ evidence/shared-helm.txt | 6 + evidence/shared-idempotency.txt | 3 + evidence/shared-image-build.txt | 69 ++++++ evidence/shared-persistence.txt | 3 + evidence/shared-pvc-after.txt | 8 + evidence/shared-pvc-before.txt | 8 + evidence/shared-ready.json | 1 + evidence/shared-releases.txt | 2 + evidence/shared-rolling.txt | 2 + evidence/shared-rollout.txt | 1 + evidence/shared-smoke.txt | 2 + evidence/shared-source-snapshot.txt | 19 ++ evidence/shared-state.txt | 20 ++ evidence/shared-static.txt | 2 + go.mod | 10 +- go.sum | 32 ++- infra/metrics-server/components.yaml | 203 ++++++++++++++++++ infra/metrics-server/kustomization.yaml | 12 ++ infra/monitoring/grafana-dashboard.json | 106 +++++++++ infra/monitoring/prometheus-scrape.yaml | 19 ++ internal/config/controller.go | 3 + internal/config/persistence.go | 3 + internal/controller/http/fiber/controller.go | 8 + .../controller/http/fiber/controller_test.go | 1 + internal/controller/http/fiber/handlers.go | 7 +- internal/controller/http/fiber/metrics.go | 61 ++++++ .../controller/http/fiber/metrics_test.go | 73 +++++++ internal/controller/http/fiber/middleware.go | 6 + internal/controller/http/fiber/routes.go | 1 + internal/cursor/codec.go | 11 + internal/cursor/codec_test.go | 33 +++ internal/model/dto/models.go | 4 + internal/service/production/creation.go | 25 ++- internal/service/production/messages_test.go | 32 ++- internal/store/postgres/idempotency.go | 51 +++++ internal/store/postgres/idempotency_test.go | 139 ++++++++++++ internal/store/postgres/messages.go | 15 +- .../postgres/migrations/002_idempotency.sql | 9 + internal/store/postgres/store.go | 33 ++- scripts/coverage.sh | 3 + scripts/experiment.sh | 2 +- scripts/init-secrets.sh | 10 +- scripts/port-forward.sh | 4 +- scripts/restart.sh | 3 + scripts/run-load.sh | 12 +- scripts/scale-shards.sh | 8 +- scripts/stop-one.sh | 4 +- scripts/test-faults.sh | 7 +- student-tests/README.md | 14 +- student-tests/load/hpa.js | 18 ++ student-tests/load/idempotency.js | 34 +++ student-tests/load/scaling.js | 62 ++++++ 88 files changed, 1922 insertions(+), 255 deletions(-) create mode 100644 charts/messenger/templates/hpa.yaml create mode 100644 charts/messenger/templates/ingress.yaml create mode 100644 charts/messenger/templates/load.yaml create mode 100644 charts/messenger/templates/migrate.yaml create mode 100644 charts/messenger/templates/monitoring.yaml create mode 100644 evidence/coverage-per-file.json create mode 100644 evidence/coverage.txt create mode 100644 evidence/failover-targets.txt create mode 100644 evidence/load-idempotency-20261016084724.txt create mode 100644 evidence/resources-idempotency-20261016084724.txt create mode 100644 evidence/restart-after.txt create mode 100644 evidence/restart-before.txt create mode 100644 evidence/shared-contract.txt create mode 100644 evidence/shared-dependency-faults.txt create mode 100644 evidence/shared-deploy.txt create mode 100644 evidence/shared-failover-1.txt create mode 100644 evidence/shared-failover-2-retry.txt create mode 100644 evidence/shared-failover-2.txt create mode 100644 evidence/shared-go-tests.txt create mode 100644 evidence/shared-helm.txt create mode 100644 evidence/shared-idempotency.txt create mode 100644 evidence/shared-image-build.txt create mode 100644 evidence/shared-persistence.txt create mode 100644 evidence/shared-pvc-after.txt create mode 100644 evidence/shared-pvc-before.txt create mode 100644 evidence/shared-ready.json create mode 100644 evidence/shared-releases.txt create mode 100644 evidence/shared-rolling.txt create mode 100644 evidence/shared-rollout.txt create mode 100644 evidence/shared-smoke.txt create mode 100644 evidence/shared-source-snapshot.txt create mode 100644 evidence/shared-state.txt create mode 100644 evidence/shared-static.txt create mode 100644 infra/metrics-server/components.yaml create mode 100644 infra/metrics-server/kustomization.yaml create mode 100644 infra/monitoring/grafana-dashboard.json create mode 100644 infra/monitoring/prometheus-scrape.yaml create mode 100644 internal/controller/http/fiber/metrics.go create mode 100644 internal/controller/http/fiber/metrics_test.go create mode 100644 internal/store/postgres/idempotency.go create mode 100644 internal/store/postgres/idempotency_test.go create mode 100644 internal/store/postgres/migrations/002_idempotency.sql create mode 100644 student-tests/load/hpa.js create mode 100644 student-tests/load/idempotency.js create mode 100644 student-tests/load/scaling.js diff --git a/.env.example b/.env.example index e824eb8b..6dfa3d3a 100644 --- a/.env.example +++ b/.env.example @@ -20,3 +20,8 @@ USER_WRITE_SLOTS=4 USER_AUTH_RATE=20 USER_AUTH_SLOTS=2 LOG_LEVEL=info + +# Lab3: common 32-byte base64 secret for every replica; generate with openssl rand -base64 32. +CURSOR_SIGNING_KEY= +# Stable pod name supplied by the Downward API; local processes use a random alias if omitted. +INSTANCE_ID= diff --git a/.github/workflows/application.yml b/.github/workflows/application.yml index b9ba4fc3..3fefacd8 100644 --- a/.github/workflows/application.yml +++ b/.github/workflows/application.yml @@ -42,7 +42,7 @@ jobs: with: version: v2.12.2 - run: make coverage - - run: make test-faults + - run: scripts/test-faults.sh - uses: actions/upload-artifact@v4 if: always() with: diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index e0aef649..6bc38b40 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -1,44 +1,15 @@ -# Архитектура лабораторной 2 +# Архитектура лабораторной 3 -Статус: реализовано, проверено локально и развёрнуто в Kubernetes dev / highload-applications. Требования: [SPEC](docs/SPEC.md), фактический статус: [PLAN](docs/PLAN.md). +Fiber/Fx/Zap, HTTP models → DTO → service → store. PostgreSQL — источник истины для данных, сессий и результатов идемпотентных записей. Valkey хранит профильный кэш и распределённые лимиты. Ключ подписи cursor общий, хранится в Secret. -Сохраняются Fiber v2, Fx, Zap и транспортный реестр fielderr. Composition root связывает интерфейсы с реализациями. Controller декодирует HTTP и преобразует DTO, service валидирует значения и доступ, PostgreSQL store исполняет SQL и транзакции. Парольная криптография и кеширование имеют собственные интерфейсы потребителей. +Повтор сообщения сначала заново проходит аутентификацию, авторизацию и валидацию. Store блокирует строку чата, проверяет запись идемпотентности, затем в одной транзакции создаёт сообщение и результат. Ключ ограничен парой пользователь/чат (метод POST и endpoint сообщений фиксированы). Изменение body даёт конфликт; неуспешная транзакция не сохраняет результат. После 24 часов ключ допускает новую запись. Изоляция чатов предотвращает общий последовательный bottleneck всех записей. -## Схема и транзакции +Миграции выполняются командой `server migrate` в отдельном Kubernetes Job. API при старте проверяет версию схемы. Изменения схемы аддитивны. Job и API создаются одним Helm release; до завершения миграции новая API-реплика не готова, Kubernetes повторяет её запуск. При обновлении старая готовая реплика сохраняется благодаря maxUnavailable=0. -`users`: UUID PK, username UNIQUE, display_name, password_hash, created_at. `chats`: UUID PK, title, created_at. `chat_members`: составной PK(chat_id,user_id), FK на users/chats. `messages`: UUID PK, chat_id/sender_id FK, text, created_at; индекс (chat_id,created_at,id). `sessions`: hash токена PK, user_id FK, expires_at. Создание чата и всех участников — одна транзакция; ограничение username обеспечивается БД, включая гонки. Вставки сообщений сериализуются на строке чата для монотонного времени в пределах чата. Чтение истории использует keyset и LIMIT, без OFFSET. +Образы хранятся в Timeweb Cloud Registry и закреплены digest. Локальный токен передаётся Docker через stdin; `make init` создаёт переносимый imagePullSecret вне Helm release и обновляет его при смене токена. Пароль PostgreSQL и ключ cursor при повторной инициализации сохраняются. -PostgreSQL хранит источник истины. Кэш неизменяемых профилей пользователей допускает безопасное восстановление из БД; сессия проверяется по PostgreSQL при каждом запросе, поэтому logout не зависит от успешной инвалидации кэша. TTL ограничивает срок хранения профиля. История не кэшируется. +Traefik Ingress hl.agapov.space направляет запросы в Service api и отслеживает EndpointSlice без sticky sessions. Readiness проверяется каждые 2 секунды, timeout 2 секунды, исключение после двух ошибок. PreStop 3 секунды, shutdown timeout 5 секунд, terminationGracePeriodSeconds=20. TLS выдаёт letsencrypt-prod. Kubernetes управляет EndpointSlice, Deployment, rolling update и HPA. HPA использует CPU из metrics-server и не зависит от Grafana. Метрики HTTP имеют ограниченный набор route/method/status labels без user/chat/request ID. -## Admission и шарды +Один namespace `highload-applications`; существующий release lab2 обновляется на реализацию lab3. Имена api/postgres/valkey, три шарда, PVC и пароль БД сохраняются. Один LB, PostgreSQL и координатор Valkey остаются точками отказа; трек отказа узла не заявляется. -Клиентское кольцо consistent hashing с виртуальными узлами распределяет пользовательские ключи и кэш между 2–3 самостоятельными Valkey. Это не Redis Cluster с его 16384 hash slots. Глобальный координатор лимитов имеет стабильный адрес и не перемещается при расширении кольца. Группы auth/read/write имеют независимые бюджеты. Слоты ограничивают одновременную работу, rate ограничивает частоту; lease освобождается при завершении и истекает после аварии. Недоступность limiter закрывает admission с ограниченной ошибкой. - -Topology изменяется через остановку admission и drain активных lease; после выдержки полного окна rate новое кольцо безопасно включается. Кэш прогревается по требованию: обязательные данные не перемещаются и не теряются. Это демонстрация шардирования, не высокая доступность: отказ единственного PostgreSQL или глобального координатора останавливает обязательный путь. - -## Go и зависимости - -Указатели на данные конфигурации, nullable значения и конкретные внутренние объекты инфраструктурного адаптера допустимы. Интерфейсы вводятся на границах поведения, прежде всего service/store/admission, а не для каждого поля. Все функции многострочные и документированы; HTTP-коды принадлежат transport. - - -## Результат аудита зависимостей - -Controller получает `service.Service`, `service.Authentication`, `admission.Distributed` и собственный интерфейс `Readiness`. Прямая зависимость от `*admission.Limiter` заменена. Business service получает `store.Interface`, `service.CursorCodec` и `service.ProfileCache`; authentication получает `service.Accounts` и `service.Passwords`. PostgreSQL/Valkey связываются только в `cmd/server`. - -Конкретные указатели `*fiber.App`, `*zap.Logger`, `*fielderr.Registry`, `*pgxpool.Pool`, `*redis.Client` остаются внутри соответствующих инфраструктурных адаптеров. Они не пересекают business service boundary. Nullable cursor и указатели на секции конфигурации являются представлением данных, интерфейсы им не требуются. - -Memory store и локальный limiter сохранены для независимых тестовых fixtures. Production Fx graph использует только PostgreSQL и Valkey. Публичная регистрация проходит через authentication и KDF. `UsersCreate` базового service остаётся операцией профильных fixtures; HTTP route не вызывает её напрямую. - -Основные SQL-запросы используют `pgx.StrictNamedArgs`; статические migration DDL не содержат значений пользователя и выполняются без параметров. Миграция embedded, не зависит от рабочего каталога контейнера. Все чтения rows закрываются и проверяют `rows.Err()`. - -Фактические проверки и эксплуатационные ограничения, включая process-local cursor key, приведены в [REPORT](REPORT.md). Указанные Go conventions проверяются formatter/lint и AST-тестом направления импортов; они не заменяют анализ ответственности компонентов. - -## Классификация ошибок - -PostgreSQL нормализует сетевые ошибки, разрыв соединения, deadline и SQLSTATE недоступности в `store.ErrUnavailable`, сохраняя исходную причину для `errors.Is`. `service.ErrUnavailable` — alias этой общей категории интерфейса хранилища; controller не импортирует драйвер или store. Это сохраняет классификацию и на пути проверки сессии, и в бизнес-операциях. HTTP-слой возвращает фиксированный 503/unavailable без деталей. Неизвестные ошибки SQL остаются 500; ограничения уникальности и отсутствие записи сохраняют прежнее отображение. - -## Развёртывание - -[Helm chart](charts/messenger) — единственный источник ресурсов стенда. Values задают образ, API-конфигурацию, ресурсы и число шардов. Изменение конфигурации меняет checksum pod template и вызывает rollout API. Namespace изолирует лабораторную; имена StatefulSet и PVC стабильны. Credentials создаются отдельно и передаются по именам Secret, без записи паролей в Helm values. - -Смена кольца выполняется командой `make reshard` через Helm upgrade с остановленным API и ожиданием 31 секунды. Runtime topology guard защищает от несовпадающих колец; chart дополнительно запрещает изменение topology при работающем API. Подробности и порядок переноса существующих ресурсов: [ADR-0002](docs/decisions/0002-helm.md). +Источники: [HPA](https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/), [metrics-server](https://github.com/kubernetes-sigs/metrics-server), [PostgreSQL locking](https://www.postgresql.org/docs/17/explicit-locking.html). diff --git a/Makefile b/Makefile index cf02b534..b5ffcf3d 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@ PYTHON ?= python3 -BASE_URL ?= http://localhost:8080 +BASE_URL ?= https://hl.agapov.space CA_FILE ?= ACTION_SCRIPT ?= TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",) -.PHONY: help check validate test load test-persistence +.PHONY: help check validate test load test-persistence test-failover help: - @echo "init/deploy/port-forward: Helm stand; chart-check: Helm lint; reshard SHARDS=2|3; test/test-persistence: API; coverage: Go; research: SQL; check/validate: contract" + @echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes" check: $(PYTHON) scripts/check_contract.py @@ -25,6 +25,10 @@ test-persistence: @test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable restart hook"; exit 2) $(PYTHON) tests/resilience.py --mode persistence --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS) +test-failover: + @test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2) + $(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS) + GO ?= go .PHONY: build test-student coverage vet lint fmt research build: @@ -40,10 +44,10 @@ lint: fmt: golangci-lint fmt research: - scripts/research.sh + scripts/experiment.sh REGISTRY ?= asisti.registry.twcstorage.ru -IMAGE := $(REGISTRY)/mtusi2026lab2 +IMAGE := $(REGISTRY)/mtusi2026lab3 IMAGE_TAG ?= dev-$(shell date -u +%Y%m%d%H%M%S) PLATFORM ?= linux/amd64 REGISTRY_USER ?= token @@ -67,7 +71,7 @@ chart-check: helm lint $(CHART) -f "$(VALUES)" helm template "$(RELEASE)" $(CHART) -n "$(NAMESPACE)" -f "$(VALUES)" > /dev/null deploy: - helm upgrade --install "$(RELEASE)" $(CHART) $(HELM_ARGS) --create-namespace -f "$(VALUES)" $(if $(IMAGE_DIGEST),--set-string image.digest=$(IMAGE_DIGEST),) --wait --timeout 180s + helm upgrade --install "$(RELEASE)" $(CHART) $(HELM_ARGS) --create-namespace -f "$(VALUES)" $(if $(IMAGE_DIGEST),--set-string image.digest=$(IMAGE_DIGEST),) --wait --wait-for-jobs --timeout 240s reload: kubectl --context "$(KUBE_CONTEXT)" -n "$(NAMESPACE)" rollout restart deployment/api kubectl --context "$(KUBE_CONTEXT)" -n "$(NAMESPACE)" rollout status deployment/api --timeout=180s @@ -78,6 +82,11 @@ ready: reshard: SHARDS="$(SHARDS)" scripts/scale-shards.sh -.PHONY: test-faults -test-faults: - scripts/test-faults.sh +.PHONY: metrics-install test-idempotency load-cluster +metrics-install: + kubectl --context "$(KUBE_CONTEXT)" apply -k infra/metrics-server + kubectl --context "$(KUBE_CONTEXT)" -n "$(NAMESPACE)" rollout status deployment/metrics-server --timeout=180s +test-idempotency: + RUN="idempotency-$$(date -u +%Y%m%d%H%M%S)" LOAD_SCRIPT=idempotency.js scripts/run-load.sh +load-cluster: + scripts/run-load.sh diff --git a/REPORT.md b/REPORT.md index 8dd58bcf..f6c202a5 100644 --- a/REPORT.md +++ b/REPORT.md @@ -1,3 +1,53 @@ -# Базовое состояние +# Лабораторная 3 -Перенесена собственная реализация lab2 из коммита 8173f70. Контракт и публичные проверки lab3 сохранены. Требования lab3 на этом этапе ещё не реализованы. +Агапов Владислав, БПИ2303. База: текущая lab2 (8173f70), отдельный базовый коммит lab3 a57cbcf. Требования и статус: [SPEC](docs/SPEC.md), [PLAN](docs/PLAN.md). + +## Запуск + +Основной стенд: Kubernetes dev, namespace highload-applications, существующий release lab2. Публичная точка входа: https://hl.agapov.space через установленный Traefik. TLS: cert-manager ClusterIssuer letsencrypt-prod. PostgreSQL и три Valkey сохраняют прежние PVC. Новый release lab3 не требуется. + +Нужны Helm, kubectl, Docker buildx, jq, OpenSSL, curl. Для проверки: Go 1.26.1+, golangci-lint; Python 3 используется только публичными тестами преподавателя. В кластере нужны Traefik, cert-manager, default StorageClass и metrics-server. Образы PostgreSQL 17.6-alpine, Valkey 8.1.3-alpine, k6 1.3.0 закреплены в chart. + +```sh +make init +make chart-check +make deploy +make ready +make test +make test-idempotency +make test-failover ACTION_SCRIPT=scripts/stop-one.sh +make test-persistence ACTION_SCRIPT=scripts/restart.sh +``` + +make init читает ~/.secrets/twc-registry-token, обновляет registry-pull и сохраняет пароль messenger-secrets. При отсутствии добавляет общий cursor-key. При bootstrap создаёт пароль БД. Chart описывает API, PostgreSQL, Valkey, миграции, HPA, NetworkPolicy и Ingress. + +```sh +make build-push +make deploy IMAGE_DIGEST="$(jq -r '."containerimage.digest"' evidence/image-build.json)" +``` + +Для повторяемого запуска новой версии записать digest в charts/messenger/values.yaml. Не удалять PVC и не создавать параллельный release для обновления. + +## Поведение + +Две и более взаимозаменяемые API-реплики, X-Instance-Id равен имени pod. Общие сессии PostgreSQL и ключ cursor позволяют переключать реплики без повторного входа. POST сообщения требует Idempotency-Key; повтор возвращает исходное сообщение, другой текст — 409. Запись и ключ фиксируются атомарно. Миграции выполняет отдельный Job, API проверяет схему. Отказ БД возвращает 503 без раскрытия внутренних деталей. + +[Архитектура](ARCHITECTURE.md) описывает readiness, graceful shutdown и HPA. Подготовлены [scrape](infra/monitoring/prometheus-scrape.yaml) и [dashboard](infra/monitoring/grafana-dashboard.json); импорт в Grafana не заявляется. + +## Проверки + +Актуальные результаты обновления release сохраняются в evidence/shared-*. Старые файлы без этого префикса, кроме заново полученного coverage, относятся к прежнему экспериментальному стенду и не доказывают текущую конфигурацию. + +make coverage выполняется с изолированными PostgreSQL/Valkey (переменные в CI): race, интеграционные проверки, реальный процесс, SIGTERM и порог 90% на каждый файл. scripts/test-faults.sh создаёт одноразовые Docker-зависимости, останавливает и замораживает БД/Valkey, проверяет 503 и отсутствие анонимного доступа. + +## Исследование и ограничения + +Трек 5.1: scripts/experiment.sh сравнивает 1/2/4 API при фиксированном суммарном бюджете 1000m CPU / 512Mi и растущем бюджете по 250m / 128Mi на реплику. HPA временно отключается и восстанавливается. Профиль: 16 пользователей, 32 VU, 5 с прогрева, 30 с измерения; запись, чтение и повтор ключа. Сохраняются raw k6 и ресурсы. Полный трек требует матрицы, анализа насыщения и подтверждённого улучшения; наличие сценария не заменяет измерения. + +Задание перечисляет Compose/Swarm; принятие Kubernetes как замены преподавателем не подтверждено. PostgreSQL и Valkey не реплицированы: потеря узла с локальным диском не покрывается. Оценка не заявляется как полученная. + +Источники: README, COURSE, contracts этого репозитория; собственная lab2. Codex использован для реализации, проверки и документации. + +Свежий прогон 16.10.2026: Go test/vet/lint прошли; race/integration/coverage — 59 файлов, минимум 90%. Публичный HTTPS smoke прошёл. Первый failover: 48 записей, 0 неудачных попыток, восстановление 0.801 с. Повторный запуск получил внешний connection/TLS timeout до остановки pod; сохранён отдельно, не считается PASS. + +Конкурентная идемпотентность через HTTPS: 8 VU / 32 операции, 34/34 checks, ровно одно сообщение, другой body — конфликт. В процессе были 5 транзиентных неуспешных HTTP из 41; повторы выполнялись с исходным ключом. Полный рестарт API/PostgreSQL/Valkey прошёл: исходная сессия и сообщение сохранились, PVC неизменны. Реальные stop/pause PostgreSQL и Valkey на одноразовом стенде прошли: 503, отсутствие анонимного доступа, восстановление прежней сессии и сообщения. diff --git a/charts/messenger/Chart.yaml b/charts/messenger/Chart.yaml index 14ffef69..b6f6d1f4 100644 --- a/charts/messenger/Chart.yaml +++ b/charts/messenger/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: messenger description: Учебный мессенджер с PostgreSQL и шардированным Valkey version: 0.1.0 -appVersion: lab2 +appVersion: lab3 type: application diff --git a/charts/messenger/templates/api.yaml b/charts/messenger/templates/api.yaml index 594185b8..2f093250 100644 --- a/charts/messenger/templates/api.yaml +++ b/charts/messenger/templates/api.yaml @@ -14,13 +14,16 @@ data: apiVersion: v1 kind: Service metadata: + labels: + app: api name: api namespace: {{ .Release.Namespace }} spec: selector: app: api ports: - - port: 8080 + - name: http + port: 8080 targetPort: 8080 --- apiVersion: apps/v1 @@ -29,7 +32,13 @@ metadata: name: api namespace: {{ .Release.Namespace }} spec: +{{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.api.replicas }} +{{- end }} + strategy: + rollingUpdate: + maxUnavailable: 0 + maxSurge: 1 selector: matchLabels: app: api @@ -42,7 +51,14 @@ spec: spec: imagePullSecrets: - name: {{ .Values.imagePullSecret }} - terminationGracePeriodSeconds: 10 + terminationGracePeriodSeconds: 20 + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app: api securityContext: runAsNonRoot: true runAsUser: 65532 @@ -58,6 +74,15 @@ spec: - configMapRef: name: messenger-config env: + - name: INSTANCE_ID + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: CURSOR_SIGNING_KEY + valueFrom: + secretKeyRef: + name: {{ .Values.databaseSecret }} + key: cursor-key - name: DATABASE_URL valueFrom: secretKeyRef: @@ -65,6 +90,10 @@ spec: key: database-url resources: {{- toYaml .Values.api.resources | nindent 12 }} + lifecycle: + preStop: + sleep: + seconds: 3 startupProbe: httpGet: path: /health/ready @@ -72,6 +101,8 @@ spec: periodSeconds: 2 failureThreshold: 30 readinessProbe: + timeoutSeconds: 2 + failureThreshold: 2 httpGet: path: /health/ready port: 8080 diff --git a/charts/messenger/templates/hpa.yaml b/charts/messenger/templates/hpa.yaml new file mode 100644 index 00000000..a6b8d722 --- /dev/null +++ b/charts/messenger/templates/hpa.yaml @@ -0,0 +1,33 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: api +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: api + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.cpuPercent }} + behavior: + scaleUp: + stabilizationWindowSeconds: 15 + policies: + - type: Pods + value: 1 + periodSeconds: 30 + scaleDown: + stabilizationWindowSeconds: 120 + policies: + - type: Pods + value: 1 + periodSeconds: 60 +{{- end }} diff --git a/charts/messenger/templates/ingress.yaml b/charts/messenger/templates/ingress.yaml new file mode 100644 index 00000000..3bc3d8aa --- /dev/null +++ b/charts/messenger/templates/ingress.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: messenger + annotations: + cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer | quote }} +spec: + ingressClassName: {{ .Values.ingress.className }} + tls: + - hosts: + - {{ .Values.ingress.host | quote }} + secretName: messenger-tls + rules: + - host: {{ .Values.ingress.host | quote }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: api + port: + number: 8080 diff --git a/charts/messenger/templates/load.yaml b/charts/messenger/templates/load.yaml new file mode 100644 index 00000000..29f4f0e4 --- /dev/null +++ b/charts/messenger/templates/load.yaml @@ -0,0 +1,37 @@ +{{- if .Values.load.enabled }} +apiVersion: batch/v1 +kind: Job +metadata: + name: load-{{ .Values.load.run }} +spec: + backoffLimit: 0 + activeDeadlineSeconds: 300 + ttlSecondsAfterFinished: 86400 + template: + metadata: + labels: + app: load + spec: + restartPolicy: Never + containers: + - name: k6 + image: grafana/k6:1.3.0 + args: [run, --quiet, /scripts/{{ .Values.load.script }}] + env: + - name: BASE_URL + value: "https://{{ .Values.ingress.host }}" + - name: DURATION + value: {{ .Values.load.duration | quote }} + - name: VUS + value: {{ .Values.load.vus | quote }} + resources: + requests: {cpu: 250m, memory: 128Mi} + limits: {cpu: '2', memory: 256Mi} + volumeMounts: + - name: scripts + mountPath: /scripts + volumes: + - name: scripts + configMap: + name: load-scripts +{{- end }} diff --git a/charts/messenger/templates/migrate.yaml b/charts/messenger/templates/migrate.yaml new file mode 100644 index 00000000..db5f3722 --- /dev/null +++ b/charts/messenger/templates/migrate.yaml @@ -0,0 +1,32 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: migrate-{{ .Release.Revision }} +spec: + activeDeadlineSeconds: 180 + backoffLimit: 3 + ttlSecondsAfterFinished: 86400 + template: + metadata: + labels: + app: migrate + spec: + restartPolicy: OnFailure + imagePullSecrets: + - name: {{ .Values.imagePullSecret }} + containers: + - name: migrate + image: "{{ .Values.image.repository }}@{{ .Values.image.digest }}" + args: [migrate] + envFrom: + - configMapRef: + name: messenger-config + env: + - name: DATABASE_URL + valueFrom: + secretKeyRef: + name: {{ .Values.databaseSecret }} + key: database-url + resources: + requests: {cpu: 50m, memory: 32Mi} + limits: {cpu: 500m, memory: 128Mi} diff --git a/charts/messenger/templates/monitoring.yaml b/charts/messenger/templates/monitoring.yaml new file mode 100644 index 00000000..57db5d55 --- /dev/null +++ b/charts/messenger/templates/monitoring.yaml @@ -0,0 +1,19 @@ +{{- if .Values.monitoring.serviceMonitor }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: api + labels: + app: api +spec: + namespaceSelector: + matchNames: [{{ .Release.Namespace }}] + selector: + matchLabels: + app: api + endpoints: + - port: http + path: /metrics + interval: 15s + scrapeTimeout: 3s +{{- end }} diff --git a/charts/messenger/templates/network-policy.yaml b/charts/messenger/templates/network-policy.yaml index 433486ac..3ad21b20 100644 --- a/charts/messenger/templates/network-policy.yaml +++ b/charts/messenger/templates/network-policy.yaml @@ -20,3 +20,35 @@ spec: port: 5432 - protocol: TCP port: 6379 + - from: + - podSelector: + matchLabels: + app: migrate + ports: + - protocol: TCP + port: 5432 +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: private-api +spec: + podSelector: + matchLabels: + app: api + policyTypes: [Ingress] + ingress: + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: traefik + ports: + - protocol: TCP + port: 8080 + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: monitoring + ports: + - protocol: TCP + port: 8080 diff --git a/charts/messenger/values.yaml b/charts/messenger/values.yaml index 79800180..b3c55967 100644 --- a/charts/messenger/values.yaml +++ b/charts/messenger/values.yaml @@ -1,19 +1,19 @@ -# Ресурсы lab2 в общем namespace. Секреты создаются через make init. +# Existing lab2 release; shared persistent stores and credentials. image: - repository: asisti.registry.twcstorage.ru/mtusi2026lab2 - digest: sha256:3f19c9feb306a88044cc46b25d99592d48f04c21eba477d59676486277b2956c + repository: asisti.registry.twcstorage.ru/mtusi2026lab3 + digest: sha256:a73799010550ab2008b984ed9d0bfa8dfdd9bb963cb948bc91713748b24c3889 imagePullSecret: registry-pull databaseSecret: messenger-secrets api: - replicas: 1 + replicas: 2 resources: requests: {cpu: 250m, memory: 128Mi} limits: {cpu: '1', memory: 256Mi} env: SESSION_TTL_SECONDS: '3600' - DEPENDENCY_TIMEOUT_MS: '1000' + DEPENDENCY_TIMEOUT_MS: '2000' DEPENDENCY_POOL_SIZE: '8' - REQUEST_TIMEOUT_SECONDS: '3' + REQUEST_TIMEOUT_SECONDS: '4' SHUTDOWN_TIMEOUT_SECONDS: '5' GOMEMLIMIT: 160MiB postgres: @@ -32,3 +32,22 @@ valkey: limits: {cpu: 500m, memory: 128Mi} # Пустое значение использует default StorageClass. Задать до первой установки. storageClass: '' + +autoscaling: + enabled: true + minReplicas: 2 + maxReplicas: 4 + cpuPercent: 60 +monitoring: + serviceMonitor: false +load: + enabled: false + run: manual + script: scaling.js + duration: 30 + vus: 32 + +ingress: + host: hl.agapov.space + className: traefik + clusterIssuer: letsencrypt-prod diff --git a/cmd/server/app.go b/cmd/server/app.go index 8555b539..609d28eb 100644 --- a/cmd/server/app.go +++ b/cmd/server/app.go @@ -43,7 +43,7 @@ func CreateApp() fx.Option { fx.Annotate(databaseStore, fx.As(new(store.Interface))), fx.Annotate(databaseAccounts, fx.As(new(service.Accounts))), fx.Annotate(profileCache, fx.As(new(service.ProfileCache))), - fx.Annotate(cursor.New, fx.As(new(service.CursorCodec))), + fx.Annotate(newCursor, fx.As(new(service.CursorCodec))), fx.Annotate(production.NewCached, fx.As(new(service.Service))), fx.Annotate(fiberctrl.New, fx.As(new(controller.Controller))), ), @@ -95,3 +95,8 @@ func databaseAccounts(database *postgres.Store) service.Accounts { func profileCache(client *valkey.Client) service.ProfileCache { return client } + +// newCursor binds the shared signing secret at the composition root. +func newCursor(cfg *config.Persistence) (*cursor.Codec, error) { + return cursor.NewShared(cfg.CursorKey) +} diff --git a/cmd/server/app_test.go b/cmd/server/app_test.go index ac283300..74e32942 100644 --- a/cmd/server/app_test.go +++ b/cmd/server/app_test.go @@ -101,4 +101,8 @@ func requirePersistence(t *testing.T) { if os.Getenv("DATABASE_URL") == "" || os.Getenv("VALKEY_SHARDS") == "" { t.Skip("DATABASE_URL and VALKEY_SHARDS are required for real application lifecycle tests") } + t.Setenv("CURSOR_SIGNING_KEY", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") + if err := migrate(); err != nil { + t.Fatal(err) + } } diff --git a/cmd/server/commands.go b/cmd/server/commands.go index cdce9527..c91ffc0d 100644 --- a/cmd/server/commands.go +++ b/cmd/server/commands.go @@ -1,7 +1,12 @@ package main import ( + "context" "fmt" + "time" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/postgres" "go.uber.org/fx" ) @@ -12,8 +17,25 @@ func run(args []string) error { fx.New(CreateApp()).Run() return nil } + if len(args) == 1 && args[0] == "migrate" { + return migrate() + } if len(args) == 1 && args[0] == "healthcheck" { return healthcheck() } - return fmt.Errorf("usage: server [healthcheck]") + return fmt.Errorf("usage: server [healthcheck|migrate]") +} + +// migrate applies versioned DDL once from an operator job, independently of the API. +func migrate() error { + cfg, err := config.NewPersistence() + if err != nil { + return err + } + database, err := postgres.New(postgres.Options{URL: cfg.DatabaseURL, MaxConnections: 1, Timeout: 30 * time.Second}) + if err != nil { + return err + } + defer database.Close() + return database.Start(context.Background()) } diff --git a/cmd/server/persistence.go b/cmd/server/persistence.go index 5cf5674b..02f9fa5e 100644 --- a/cmd/server/persistence.go +++ b/cmd/server/persistence.go @@ -37,7 +37,7 @@ func newDatabase(lifecycle fx.Lifecycle, cfg *config.Persistence) (*postgres.Sto return nil, err } lifecycle.Append(fx.Hook{ - OnStart: database.Start, + OnStart: database.CheckSchema, OnStop: func(context.Context) error { database.Close() return nil diff --git a/cmd/server/persistence_test.go b/cmd/server/persistence_test.go index efe9660b..56442ddc 100644 --- a/cmd/server/persistence_test.go +++ b/cmd/server/persistence_test.go @@ -46,3 +46,21 @@ func TestReadinessStopsAtUnavailableDatabase(t *testing.T) { t.Fatal("closed database reported ready") } } + +// TestMigrationCommandRejectsMissingConfiguration fails before opening a database. +func TestMigrationCommandRejectsMissingConfiguration(t *testing.T) { + t.Setenv("DATABASE_URL", "") + t.Setenv("VALKEY_SHARDS", "shard0=localhost:6379") + if err := run([]string{"migrate"}); err == nil { + t.Fatal("missing database configuration accepted") + } +} + +// TestMigrationCommandRejectsMalformedDatabaseURL fails without logging credentials. +func TestMigrationCommandRejectsMalformedDatabaseURL(t *testing.T) { + t.Setenv("DATABASE_URL", "://invalid") + t.Setenv("VALKEY_SHARDS", "shard0=localhost:6379") + if err := run([]string{"migrate"}); err == nil { + t.Fatal("malformed database configuration accepted") + } +} diff --git a/docs/DEFENSE.md b/docs/DEFENSE.md index 97c16cc1..c0077ea7 100644 --- a/docs/DEFENSE.md +++ b/docs/DEFENSE.md @@ -1,89 +1,24 @@ -# План защиты лабораторной 2 — 9 минут 30 секунд +# Шпаргалка для защиты lab3 -Резерв до лимита 10 минут — 30 секунд. Рабочий каталог — корень репозитория lab2. Демонстрация относится к PostgreSQL, сессиям, Valkey и SQL-исследованию; HPA и балансировка lab3 сюда не входят. +Стенд: https://hl.agapov.space. Запрос проходит через Traefik Ingress, Service api, одну из API-реплик, общие PostgreSQL и Valkey. Обновлён существующий Helm release lab2, namespace highload-applications. -## Подготовить до защиты +Главное отличие lab3: API взаимозаменяемы. Сессия находится в PostgreSQL, ключ подписи cursor общий. X-Instance-Id показывает pod, обслуживший запрос. Sticky sessions не нужны. -- Открыть REPORT.md, ARCHITECTURE.md, этот план и два терминала. -- Выполнить `make chart-check`, `make test-faults`; сборка Docker и остановки зависимостей не должны съедать время защиты. -- Открыть сохранённые `evidence/fault-regression.txt`, `evidence/sql-research-domain.json`, `evidence/sql-research-helm.txt`. Это реальные предыдущие измерения с датами, а не результаты сегодняшнего стенда. -- В первом терминале запустить `make port-forward` (localhost:8080); во втором — `make ready` и `make test`. -- Если 8080 занят, использовать `LOCAL_PORT=18082 make port-forward`, а в проверках `BASE_URL=http://localhost:18082`. -- Для воспроизведения SQL-исследования заранее выполнить `make research`: отдельный временный Docker PostgreSQL, не база dev. На защите показывать готовые планы и результаты. +Клиент передаёт Idempotency-Key при отправке сообщения. Область ключа — пользователь и чат, срок 24 часа. Транзакция блокирует строку чата и записывает сообщение вместе с результатом операции. Повтор после timeout возвращает исходное сообщение; другой текст с тем же ключом даёт 409. Поэтому потерянный HTTP-ответ не приводит к дублю. -## 0:00–0:45 — задача и результат +Миграции выполняются отдельной командой server migrate в Job с advisory lock. API только проверяет версию. Миграция аддитивна, старые реплики продолжают работать при обновлении. -«Перенесён мессенджер из памяти в PostgreSQL. Подтверждённые сообщения и сессии переживают рестарт. Valkey используется для кэша профилей и распределённых ограничений. Цель — уровни 3 и 4 и трек “План запроса и восстановление”.» - -```sh -helm list --kube-context dev -n highload-applications -kubectl --context dev -n highload-applications get pods -l 'app in (api,postgres,valkey)' -``` - -Показать API, PostgreSQL, три Valkey. Kubernetes — выбранный способ развёртывания; формальное принятие замены Compose/Swarm преподавателем учитывается отдельно. - -## 0:45–1:45 — архитектура и авторизация - -Показать ARCHITECTURE.md и коротко объяснить: - -- Fiber controller принимает HTTP; service проверяет правила и доступ; store выполняет SQL. Реализации связываются через Fx, между слоями — интерфейсы. -- Пароль хранится как Argon2id hash. Basic применяется при входе, затем используется случайный opaque Bearer token. -- В PostgreSQL хранится digest токена и абсолютный срок действия. Сессия проверяется в источнике истины на каждом запросе, поэтому logout действует сразу. -- Valkey кэширует профиль, но не подменяет проверку сессии. Отказ зависимости не открывает анонимный доступ. - -## 1:45–3:00 — работа API +Readiness проверяет PostgreSQL и все Valkey. Kubernetes исключает неготовый endpoint; Traefik обновляет backend. PreStop ждёт 3 секунды, затем SIGTERM даёт приложению до 5 секунд на завершение запросов. Лимит pod termination — 20 секунд. Отказ процесса API не равен отказу узла с БД. +HPA смотрит CPU через metrics-server: минимум 2, максимум 4, целевая утилизация 60% от requests. Grafana нужна для визуализации, а не для работы HPA. + +Показать команды: ```sh +kubectl --context dev -n highload-applications get pods,hpa,ingress,certificate make test +make test-failover ACTION_SCRIPT=scripts/stop-one.sh ``` -Пояснить, что публичный smoke проверяет цепочку регистрации, входа, чатов и сообщений, авторизацию и пагинацию. Не выводить реальные токены. Пока работает тест, показать schema/migration и ограничения FK/unique. +Первый успешный failover: 48 записей, 0 ошибок, восстановление 0.801 секунды, сессия и сообщения сохранены. Актуальные другие результаты находятся в evidence/shared-*; не выдавать повтор с сетевым timeout за успешный. -## 3:00–4:30 — сохранность после рестарта - -```sh -make test-persistence ACTION_SCRIPT=scripts/restart.sh -``` - -«Тест создаёт сообщение и сессию, перезапускает API, PostgreSQL и Valkey через явно заданный hook. PVC не удаляются. Затем прежний токен читает прежнее подтверждённое сообщение без нового логина.» - -Дождаться PASS. Если инфраструктура задерживает рестарт, не выдавать сохранённый лог за текущий PASS: показать прошлый результат с его датой и продолжить по плану. - -## 4:30–5:45 — реальные отказы зависимостей - -```sh -rg 'PASS:' evidence/fault-regression.txt -``` - -«Команда воспроизведения — make test-faults. Отдельные Docker-контейнеры PostgreSQL и Valkey по очереди останавливаются и замораживаются. Во всех четырёх сценариях запрос истории с действующим токеном получает 503 unavailable. Проверяются readiness=503, liveness=200, отсутствие доступа без токена и по поддельной идентичности, затем восстановление с прежней сессией.» - -Уточнить исправление ревью: сетевые ошибки PostgreSQL классифицируются в store; неизвестная SQL-ошибка остаётся безопасным 500. В измеренном прогоне отказ отвечал за 0.002–0.508 с при timeout зависимости 500 мс. На dev для демонстрации ничего дополнительно останавливать не требуется. - -## 5:45–7:45 — исследовательский трек на 5 - -Гипотеза: индекс `(chat_id, created_at, id)` ускоряет позднюю страницу истории, поскольку соответствует фильтру, курсору и порядку сортировки. - -```sh -jq '[.variants[] | {name, read_ms:[.select_plans[][0]["Execution Time"]]}]' evidence/sql-research-domain.json -rg 'PASS: restore' evidence/sql-research-helm.txt -``` - -Объяснить метод: 100 000 синтетических сообщений, распределение 90/9/1% по чатам; сравнение индекса по chat_id с составным индексом; три повтора чтения и вставки 1000 строк с rollback; EXPLAIN ANALYZE BUFFERS. - -Результат исторического прогона 2026-10-07: чтение 7.646–8.604 мс против 0.055–0.136 мс. Показать в плане исчезновение лишней сортировки и уменьшение объёма обработки. Это эффект конкретного запроса и набора данных, не обещание такого ускорения всего API. По вставке диапазоны перекрываются: измеренного устойчивого штрафа не доказано. - -Backup/restore: логический dump восстановлен в новую БД, совпали 100 000 строк и checksum; приведены выборочные записи. Это не HA и не PITR. - -## 7:45–8:45 — дополнительные лимиты и шарды - -«В Valkey Lua атомарно проверяет rate и слоты одновременных запросов. Есть глобальный бюджет, группы auth/read/write и бюджет пользователя. 429 — превышение частоты, 503 — занятые слоты или недоступность обязательного backend.» - -«Пользовательские ключи распределяются consistent hashing с виртуальными узлами. Это три самостоятельных Valkey и клиентская маршрутизация, не Redis Cluster. Глобальные лимиты согласуются на shard0. Изменение кольца выполняется через остановку и drain API; глобальная координация остаётся точкой отказа.» - -Не запускать reshard в десятиминутной защите: команда намеренно ждёт истечения lease и вызывает простой. Показать `make reshard SHARDS=2` как документированный способ, а измерения — в REPORT. - -## 8:45–9:30 — проверки и ограничения - -Показать `evidence/fault-coverage-per-file.json`: каждый из 57 исполняемых Go-файлов имеет ≥90% statements. Упомянуть race, реальные PostgreSQL/Valkey integration, lint/vet и отдельный fault-сценарий в CI; запуск удалённого runner не подтверждён локальными проверками. - -Ограничения: PostgreSQL и координатор Valkey не реплицированы; hostpath PVC зависят от узла; cursor key lab2 локален процессу, старый cursor после рестарта может стать недействительным; исторические измерения отделены от свежих проверок. Оценку определяет преподаватель. +Ограничения: PostgreSQL и Valkey не реплицированы, hostpath PVC зависит от узла. Полный исследовательский трек на 5 ещё требует матрицы 1/2/4, доказанного насыщения и улучшения; один HPA его не заменяет. Kubernetes вместо Compose/Swarm требует принятия преподавателем. diff --git a/docs/PLAN.md b/docs/PLAN.md index ba717cdd..7d000e18 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -1,23 +1,11 @@ -# План лабораторной 2 +# План лабораторной 3 -| Задача | Требования | Результат и проверка | Статус | -| --- | --- | --- | --- | -| L2-T01 | L2-REQ-01,08 | Выборочный перенос, новая аутентификация; [smoke](../evidence/smoke.txt) | Выполнено локально | -| L2-T02 | L2-REQ-01,04,05 | PostgreSQL, миграции, rollback, гонки, keyset; [race/integration](../evidence/go-tests-coverage.txt) | Выполнено | -| L2-T03 | L2-REQ-02,03 | Argon2id, сессии, TTL/отзыв, профильный кэш; [fault tests](../evidence/dependencies.json) | Выполнено локально | -| L2-T04 | L2-REQ-06,07 | Группы и user/global budgets, Lua/lease, consistent hashing; unit/integration; [ring](../evidence/hashring.txt) | Выполнено; [расширение 2→3](../evidence/k8s-scale-shards.txt) и smoke прошли | -| L2-T05 | L2-REQ-09 | Helm install/upgrade/restart/reshard, PVC, локальный Docker [persistence](../evidence/persistence.txt) | Выполнено в dev / highload-applications; [smoke/persistence](../evidence/k8s-persistence-three-shards.txt); принятие преподавателем учитывается отдельно | -| L2-T06 | L2-REQ-05,10 | 100 000 сообщений, планы/вставки, backup/restore; [raw results](../evidence/sql-research-domain.json) | Выполнено локально | -| L2-T07 | L2-REQ-08 | DIP-аудит, fmt/lint/vet/race; [порог каждого файла](../evidence/coverage-per-file.json); CI workflow | Локально выполнено; удалённый CI не запускался | -| L2-T09 | L2-REQ-11 | Registry build/push, digest deployment, namespaced pull-secret | Выполнено; [build metadata](../evidence/image-build.json) | -| L2-T08 | Все | [REPORT](../REPORT.md), evidence и инструкция Helm | Выполнено; [итоговый Kubernetes snapshot](../evidence/k8s-deployment.json) | -| L2-T10 | L2-REQ-09,11,12 | Helm chart, values, adoption без потери данных, upgrade, reshard 3→2→3; [проверка](../evidence/helm-deployment.txt) | Выполнено в dev | -| L2-T11 | L2-REQ-08,10,12 | [Покрытие shell/awk](../evidence/helm-coverage-per-file.json), [SQL-эксперимент](../evidence/sql-research-helm.txt), сокращённый REPORT; собственные Python-скрипты удалены | Выполнено | +| Требования | Работа | Статус | +| --- | --- | --- | +| L3-01–04 | База lab2, идемпотентность, cursor, отдельная миграция | Реализовано; базовый коммит a57cbcf опубликован | +| L3-05–07,10 | Release lab2, Traefik hl.agapov.space, TLS, HPA | Применено; две реплики готовы, сертификат Ready; evidence/shared-state.txt | +| L3-09 | Go test/vet/lint, race/integration/coverage | test/vet/lint и race/integration/coverage прошли: 59 файлов, минимум 90% | +| L3-01,02,05 | Smoke, concurrent retry, failover, persistence, rolling update | Актуальные результаты в evidence/shared-* | +| L3-08 | Матрица, насыщение, подтверждённое улучшение | Полный трек не завершён | -Обязательные contracts и публичные tests сохранены. Lab1 и соседние реализации не изменялись. Контейнерный образ опубликован; решение находится в main и PR №52 (Агапов Владислав, БПИ2303). Результат защиты не зафиксирован. Код, локальные измерения, кластерная проверка и принятие работы учитываются отдельно. - -| Задача | Требования | Результат и проверка | Статус | -| --- | --- | --- | --- | -| L2-T12 | L2-REQ-13 | Перенесены 182 файла; module/imports обновлены; build, vet, race, lint, chart-check и неизменность публичных материалов проверены; [результаты](../evidence/gitea-transfer-tests.txt) | Перенос проверен; main опубликован, PR №52 открыт; без redeploy | -| L2-T13 | L2-REQ-03,04 | Классификация PostgreSQL, unit-регрессии, make test-faults: stop/pause обоих backend, запрет анонимного доступа, recovery; evidence/fault-regression.txt; race/coverage ≥90% по каждому файлу | Выполнено локально | -| L2-T14 | L2-REQ-09,11 | Переустановка lab2 в dev из Timeweb; PVC и данные сохранены, smoke/persistence PASS; docs/DEFENSE.md | Выполнено; evidence/timeweb-* | +Проверки: shared-smoke PASS, shared-failover-1 PASS, shared-persistence PASS, shared-dependency-faults PASS. Concurrent retry: 34/34 checks, один Message через две реплики. Два повторных внешних failover-прогона завершились timeout до action; последовательная остановка каждой исходной реплики ещё не подтверждена. diff --git a/docs/SPEC.md b/docs/SPEC.md index fb502d49..bf8c7a25 100644 --- a/docs/SPEC.md +++ b/docs/SPEC.md @@ -1,48 +1,18 @@ -# Спецификация лабораторной 2 +# Спецификация лабораторной 3 -Версия 4, локальная реализация и развёртывание в Kubernetes dev проверены. Цель: весь уровень 3 и 4, один исследовательский трек уровня 5; дополнительно распределённый admission и демонстрация шардирования. +Цель: уровни 3 и 4, полный трек 5.1 «Цена масштабирования». Основа — собственное решение lab2, контракт lab3 сохранён. Основной способ развёртывания — Kubernetes по требованию проекта; формальное принятие замены Compose/Swarm преподавателем не подтверждено. -Нормативные источники: [задание](../README.md), [курс](../COURSE.md), [контракт](../contracts/README.md), [OpenAPI](../contracts/openapi.json), [правила сдачи](../CONTRIBUTING.md). Обязательные контракты и публичные проверки сохраняются. +| ID | Требование и приёмка | +| --- | --- | +| L3-01 | Две и более API-реплики за LB; единая сессия, стабильный X-Instance-Id на всех ответах; smoke через LB | +| L3-02 | Идемпотентность сообщения на 24 часа: user/chat/key, валидный ASCII 1–128, 201 того же Message, 409 при другом body; конкурентные повторы и rollback в настоящей PostgreSQL | +| L3-03 | Общий ключ cursor, сессии и limiter; пагинация и повтор работают при смене реплики | +| L3-04 | Миграции отдельной командой/Job с advisory lock; API только проверяет версию схемы; повтор миграций безопасен | +| L3-05 | Readiness, SIGTERM/drain, LB health checks; остановка каждой реплики, восстановление <=10 секунд; rolling update под нагрузкой; сохранность после полного рестарта | +| L3-06 | Helm в dev / highload-applications, существующий release lab2; имена api/postgres/valkey и PVC сохраняются; Traefik Ingress hl.agapov.space, TLS letsencrypt-prod; CPU/RAM requests/limits, закрытые API-порты | +| L3-07 | HPA autoscaling/v2 по CPU metrics-server, min 2/max 4, стабилизация; /metrics и готовые настройки Prometheus/Grafana без установки Grafana | +| L3-08 | Трек 5.1: 1/2/4 реплики при фиксированном общем CPU/RAM и растущих ресурсах, одинаковый профиль, raw RPS/errors/latency/resource data, графики, измеренный предел и подтверждённое улучшение | +| L3-09 | Go conventions, DIP, gofmt/lint/vet/race, >=90% statements в каждом исполняемом файле, CI | +| L3-10 | Timeweb Cloud Registry: токен из локального файла, Docker login через stdin, Kubernetes imagePullSecret; секреты не попадают в Git или Helm values; образ фиксируется digest | -| ID | Требование | Критерий приёмки | -| --- | --- | --- | -| L2-REQ-01 | Перенести бизнес-возможности lab1, хранить пользователей, чаты, участников и сообщения в PostgreSQL | Публичный smoke; уникальность username; FK; атомарное создание чата; миграции с нуля и повторно | -| L2-REQ-02 | Пароль 12–128 Unicode code points, библиотечный KDF; Basic только при входе; случайная opaque Bearer-сессия | Неверный пароль, UTF-8, expiry, logout, игнорирование X-User-Id, WWW-Authenticate | -| L2-REQ-03 | PostgreSQL — источник истины для сессий; Redis/Valkey — осмысленный кэш | Сохранность после полного рестарта; TTL не продлевается; отзыв виден сразу; отказ кэша не предоставляет доступ | -| L2-REQ-04 | Ограниченные pool и timeout; ошибки зависимостей не раскрывают секреты | Изолированные проверки отказа PostgreSQL и Valkey; readiness | -| L2-REQ-05 | Keyset pagination, индекс истории, read-after-write | EXPLAIN ANALYZE BUFFERS на ≥10 000 сообщений; отсутствие повторов неизменной истории | -| L2-REQ-06 | Redis/Valkey admission: глобальные и пользовательские лимиты, группы auth/read/write | Конкурентные запросы не превышают лимит; освобождение lease и TTL при аварии; отказ хранилища закрывает admission | -| L2-REQ-07 | 2–3 шарда и клиентское consistent hashing | При добавлении третьего узла перемещается только часть ключей; сохранение лимитов при смене topology; явное описание SPOF | -| L2-REQ-08 | Проверить DIP и соглашения Go | Controller→service interface; service→store/client interfaces; gofmt, vet, lint, race; ≥90% statements в каждом исполняемом Go-файле, порог CI | -| L2-REQ-09 | Воспроизводимый стенд и restart hook | Bootstrap из отдельного clone, сохранённые volumes, публичный persistence | -| L2-REQ-10 | Полный исследовательский трек | Трек 2: ≥100 000 сообщений, ≥2 варианта запросов/индексов, стоимость записи, backup/restore и сверка; проверен в изолированном PostgreSQL | - -## Инварианты - -Авторизация остаётся в service. Store получает проверенные UUID и обеспечивает транзакции и ограничения. Сессии хранят hash токена; парольный hash никогда не попадает в HTTP User. Кэш не является основанием обойти проверку действительности сессии. Чужой чат возвращает 404. История читается из PostgreSQL для read-after-write. - -Глобальный лимит требует общего координатора: распределение пользовательских ключей по шардам само по себе не даёт атомарного общего лимита. Изменение topology выполняется управляемо; нельзя потерять активные счётчики и предоставить новый burst. - -## Открытые вопросы - -- Основной реализованный стенд — Kubernetes dev; формальное принятие преподавателем отдельно не подтверждено. Второй путь оркестрации не реализуется. -- Исследовательский трек 2 реализован; результаты и ограничения приведены в REPORT. -- Git-публикация и принятие преподавателем не выполнены; commit/push/PR не выполняются без поручения. - -## Развёртывание в dev - -L2-REQ-11: использовать существующий Yandex Container Registry `cr.yandex/crpv8disueqk68pv29jg`, отдельный image `mtusi2026lab2`, контекст `dev` и namespace `highload-applications`. Локальный service-account key читается из `~/key.json`, не копируется в Git и не выводится. Deployment закрепляется по опубликованному digest из build metadata; tag обозначает время сборки. Проверки: pull, rollout, smoke, полный persistence, расширение 2→3 shard и повторный smoke. Применение в dev разрешено; принятие Kubernetes преподавателем учитывается отдельно. - -## Упрощение стенда - -L2-REQ-12: единственный источник Kubernetes-ресурсов — Helm chart. Values задают образ, ресурсы и 2–3 шарда; одна лабораторная размещается в одном namespace. Повторный upgrade сохраняет PVC, секреты и данные. Изменение кольца требует остановки API и истечения lease. Python остаётся только в публичных проверках задания; собственная обвязка заменяется стандартными Helm/Docker/kubectl, shell, SQL и awk. REPORT содержит однозначные команды запуска, фактические проверки и ограничения. Приёмка: helm lint/template, adoption текущего стенда без замены PVC, повторный upgrade, smoke/persistence, проверка новых команд покрытия и SQL-эксперимента. - -## Перенос в Gitea - -L2-REQ-13: решение размещается в репозитории `ssh://git@gitea.privcloud.tech:2222/vlad_marlo/mtusi2026lab2.git`. Имя Go-модуля и внутренние imports соответствуют новому хосту. Задание, contracts и публичные tests нового репозитория сохраняются. Секреты, runtime-данные и история исходного `.git` не переносятся. Проверки: сборка, unit/race, vet, chart lint и неизменность публичных материалов. Измерения от 2026-10-07 остаются историческими и не подменяют проверки переноса. - -## Классификация отказов зависимостей - -Уточнение L2-REQ-04: потеря соединения, timeout и недоступность PostgreSQL возвращают HTTP 503 / `unavailable`, включая проверку действительной сессии. Ошибки SQL/неизвестные ошибки сохраняют безопасный 500. Воспроизводимый `make test-faults` создаёт изолированные Docker-зависимости, останавливает PostgreSQL и Valkey по очереди, проверяет историю с прежним токеном, отсутствие анонимного доступа, readiness/liveness и восстановление. Пользовательский кластер и данные не затрагиваются. - -Уточнение L2-REQ-11 от 2026-10-16: основной registry — `asisti.registry.twcstorage.ru`, локальный токен — `~/.secrets/twc-registry-token`. Helm использует `registry-pull` и опубликованный digest исправления 87e1e5d. Переустановка lab2 в dev сохраняет существующие PVC и Secret БД; соседние releases не изменяются. +Вне объёма: HA PostgreSQL и Valkey, отказ чужих узлов, развёртывание Grafana, реализация lab4+. Секреты не хранятся в Git. Эксперименты затрагивают учебный release lab2, обновлённый реализацией lab3. HPA отключается на время контролируемого сравнения реплик; после эксперимента возвращается. diff --git a/evidence/coverage-per-file.json b/evidence/coverage-per-file.json new file mode 100644 index 00000000..94549b6d --- /dev/null +++ b/evidence/coverage-per-file.json @@ -0,0 +1,75 @@ +{"threshold_per_file":90,"files":[ +{"file":"internal/service/cursor.go","statements":0,"covered":0,"percent":null,"sha256":"cba6026849467d3662994d59983dd0d6a5ffbe9d934ff539115fd2669b89013f"}, +{"file":"cmd/server/app.go","statements":9,"covered":9,"percent":100.00000000,"sha256":"447460bce6ad010ecc4f191873cad6980f6d7c2a7665eed756d85d40aa0fad70"}, +{"file":"internal/service/production/members.go","statements":19,"covered":19,"percent":100.00000000,"sha256":"578da47ba2567a4fc44de3e087b2e60a6da17e0585ca6215187d5aa5783bfdc7"}, +{"file":"internal/service/production/errors.go","statements":5,"covered":5,"percent":100.00000000,"sha256":"723b0824177b313746dd02fcc9809403b75be128d98520dd69b8fc7cb0244b72"}, +{"file":"internal/controller/interface.go","statements":0,"covered":0,"percent":null,"sha256":"24b6b06d6fab919cd2130697b44fd0d358265184dca0ca8362e0b4fcc2ae5a68"}, +{"file":"internal/service/interface.go","statements":0,"covered":0,"percent":null,"sha256":"1012793cc519112340ee14dac945597da411d5b9f78ce5da6a25dd73ea72d8f6"}, +{"file":"internal/admission/limiter.go","statements":16,"covered":16,"percent":100.00000000,"sha256":"a373c9539167a4b7c35d45334d35ffd4e9d124c1740c88c12094fededd9643b4"}, +{"file":"internal/service/production/service.go","statements":10,"covered":10,"percent":100.00000000,"sha256":"7b24930b8fd7342b0373d687bb775163c332e6620ccc893516f865c433b59056"}, +{"file":"internal/hashring/ring.go","statements":21,"covered":20,"percent":95.23809524,"sha256":"e205901cec2e66011ec764b70879b0eb0d28a78c4dea8913a9fb30c2d778fa8c"}, +{"file":"internal/cursor/codec.go","statements":39,"covered":37,"percent":94.87179487,"sha256":"678e197744fb2fc4b51715f51593b98761125bbaddbe4cb1b7032bd6b173ef04"}, +{"file":"internal/controller/http/fiber/headers.go","statements":0,"covered":0,"percent":null,"sha256":"d32a9a01a8b391f4d986e14947a25a0504f4363335ea1524df05e0dd8e9e61bd"}, +{"file":"internal/store/memory/capacity.go","statements":7,"covered":7,"percent":100.00000000,"sha256":"4dbced908f9d1e802ece79d2a436cbbaa2bff807a19a5fc4bc658eb3f361a5e7"}, +{"file":"cmd/server/persistence.go","statements":18,"covered":18,"percent":100.00000000,"sha256":"a9bfa3bcc68d1b045ec21c193118bb209dfd7bdcbee3cbd28efc5573dc6db3c8"}, +{"file":"internal/service/errors.go","statements":0,"covered":0,"percent":null,"sha256":"f7fd9ca5335f9119d5ed1714c39c3d19e840528a0248fda5d08f60a10d2060ac"}, +{"file":"cmd/server/main.go","statements":3,"covered":3,"percent":100.00000000,"sha256":"c22d8cdf4ce31fde29945e967d3f025e280a7dc4d2022329d51be972d2a0f495"}, +{"file":"internal/controller/http/fiber/routes.go","statements":60,"covered":60,"percent":100.00000000,"sha256":"455d0b2a3fe2f7de947d499e99e660360395338a87d9225b5f8ac525862434fe"}, +{"file":"internal/controller/http/fiber/health.go","statements":7,"covered":7,"percent":100.00000000,"sha256":"813db79a23f6b093ccc510444c883b53f7f98e7d26c927441089f57c73fea12d"}, +{"file":"internal/config/controller.go","statements":25,"covered":24,"percent":96.00000000,"sha256":"c2736f1438746ff293197e002e4352a316987fee9c1307c3cc4190120971098c"}, +{"file":"internal/controller/http/fiber/metrics.go","statements":20,"covered":18,"percent":90.00000000,"sha256":"54db82201697bdfcc65712afe61b650f8f0885fc65222dc4cc6d1c3bb07d82dd"}, +{"file":"internal/config/memory.go","statements":11,"covered":11,"percent":100.00000000,"sha256":"86cdf9e90b576f4484946bfd9605333fc52077f38d3a39c5d71ddca4cdeecda0"}, +{"file":"internal/service/production/creation.go","statements":19,"covered":19,"percent":100.00000000,"sha256":"766f920addddaccdec25fae78728af56a825ab8c57eae29cc8839d85ab5a648f"}, +{"file":"internal/controller/http/fiber/configure.go","statements":7,"covered":7,"percent":100.00000000,"sha256":"be356cf26c228958d51f5bafa4305d7325e81ab01065575acbc9b2d7a6ddd4bd"}, +{"file":"internal/service/production/pages.go","statements":17,"covered":16,"percent":94.11764706,"sha256":"d4db6f0ad1caabc66f8bbb365e56cc84930047b640619bbe5f4e58fce0644877"}, +{"file":"internal/service/authentication/service.go","statements":48,"covered":47,"percent":97.91666667,"sha256":"8300ff37fbce6ce2985375e8c42c6d1793017b36cec8f27b0c0dc80ef2671b85"}, +{"file":"internal/password/password.go","statements":18,"covered":17,"percent":94.44444444,"sha256":"fe2df6990331573bbf0202ebc81c58263a7c16a29b713eefa0f0e852e4ee4a76"}, +{"file":"internal/controller/http/fiber/lifecycle.go","statements":24,"covered":22,"percent":91.66666667,"sha256":"f39cf7a0049a2ed39d6cc1fcc66b44656d9d6120914d0e973b032e12f3d0de08"}, +{"file":"cmd/server/logger.go","statements":10,"covered":9,"percent":90.00000000,"sha256":"93cd37b8e2ec1e6088b82f348a59e6862951f8462df4cd5448562489b05dce1f"}, +{"file":"internal/valkey/client.go","statements":35,"covered":34,"percent":97.14285714,"sha256":"67f32fa5bda94388c0a5fef87e93680a77a513de3a3b7522a38659acde088357"}, +{"file":"internal/strictjson/decode.go","statements":37,"covered":36,"percent":97.29729730,"sha256":"ef9bfaf3bd684fded87c92a15b3e5c706a794caf04cc4ef711c4185e9c7fb12a"}, +{"file":"internal/store/memory/messages.go","statements":19,"covered":18,"percent":94.73684211,"sha256":"36328ae3809af4fd0d10f4ab892e32c4643ad0c6b062aa9924ffd9e51c767500"}, +{"file":"internal/service/production/messages.go","statements":18,"covered":18,"percent":100.00000000,"sha256":"f25725720d7035a688ae4c5aaad34c6e78f3336fd927469570dc8a9a262608cd"}, +{"file":"internal/service/production/pagination.go","statements":21,"covered":21,"percent":100.00000000,"sha256":"eac2861f1743b692f7a6910949dad933d52db9b0211f3422dce09b3c7de49a49"}, +{"file":"internal/store/postgres/idempotency.go","statements":21,"covered":19,"percent":90.47619048,"sha256":"24d463067d1b51eaad5f7b21013be2ab836dea78f7314469779e2336cf57cb9c"}, +{"file":"internal/store/postgres/chats.go","statements":26,"covered":24,"percent":92.30769231,"sha256":"f191cc4d00d13a1e9c46323d545f3310ac2e7d23bb93d76060e282d1fbd220f3"}, +{"file":"internal/service/production/validation.go","statements":13,"covered":13,"percent":100.00000000,"sha256":"33970978507498dbba8e599ac20f7139a10f82705f86a7e058e668742ebefba2"}, +{"file":"internal/service/production/chats.go","statements":22,"covered":22,"percent":100.00000000,"sha256":"a6fce9188c52032fbc035bb08fc06c23b59fabf1534dc0a26205de72609ffbb6"}, +{"file":"internal/config/config.go","statements":17,"covered":17,"percent":100.00000000,"sha256":"8cb675a0bef8b1645071e4cb85b79a467620e99b375db5d8d3e16a54b4c5b5fa"}, +{"file":"cmd/server/commands.go","statements":16,"covered":16,"percent":100.00000000,"sha256":"2631df45b82c7cf99626ae6fe6c5b05ef18254b487d034ad98af26792e569bc8"}, +{"file":"internal/config/environment.go","statements":14,"covered":14,"percent":100.00000000,"sha256":"027761b059b76898a84318ec1a8b43158d8bafd6e0b15b52efbe902b4d8c5ea3"}, +{"file":"internal/valkey/cache.go","statements":19,"covered":18,"percent":94.73684211,"sha256":"25d3a4a4b47fbfedb5c9b31541f8818c7cee46407ba58d1068bdcd4590e72f12"}, +{"file":"internal/service/auth.go","statements":0,"covered":0,"percent":null,"sha256":"a6b0eb6d5759bf87bb2737ae07c9c916c749a107e6acb3542b63461363eb892f"}, +{"file":"internal/valkey/admission.go","statements":45,"covered":45,"percent":100.00000000,"sha256":"d2a4a93a0cffaadb18e94292f67a20e1d5113654e2f5ad55dae5d0009d74f4bb"}, +{"file":"internal/controller/http/fiber/auth.go","statements":29,"covered":29,"percent":100.00000000,"sha256":"8a7687d7ee133290f2bbead47796830caad1439990b60e940b625fede74a6837"}, +{"file":"cmd/server/healthcheck.go","statements":19,"covered":18,"percent":94.73684211,"sha256":"c62b7a6897b300e25fdcfd6650cd256f008207146f1a45c00d77f0db1ab01575"}, +{"file":"internal/store/memory/ordering.go","statements":6,"covered":6,"percent":100.00000000,"sha256":"93ce30f07bb6f056c9a355831b0e0ae7ec5a2cb0fa817bddeb17727c96edb491"}, +{"file":"internal/service/cache.go","statements":0,"covered":0,"percent":null,"sha256":"70bcf36246dc5cff0e3a726f20859dbab85d346dc35664c9f4ae125c23d8bfc9"}, +{"file":"internal/store/memory/chats.go","statements":31,"covered":31,"percent":100.00000000,"sha256":"9404b9576e041ad1d6fa4d297245c5224b7cc6f70272b7c99e9d531e7450519a"}, +{"file":"internal/controller/http/fiber/decode.go","statements":6,"covered":6,"percent":100.00000000,"sha256":"b02e9a9118e9ad0458ae98e79d6bc4d9a65f885bc4f6734a5a84d0cd9fa954f1"}, +{"file":"internal/controller/http/fiber/controller.go","statements":13,"covered":13,"percent":100.00000000,"sha256":"e6cba36cd5cb84e0f9b5dd2f1607704d3556f12c6a9cc92caa515e6d146338a3"}, +{"file":"internal/controller/http/fiber/public_errors.go","statements":13,"covered":12,"percent":92.30769231,"sha256":"18e1bbaa5ac64311e208c23ca3eca3fc543b48f5187b22313735b7df83603ce3"}, +{"file":"internal/controller/http/fiber/handlers.go","statements":37,"covered":36,"percent":97.29729730,"sha256":"0bdd0cfe8578e0e163cfe8945c57615b91d1990770a4d46a03c88c94996a0083"}, +{"file":"internal/store/postgres/sessions.go","statements":13,"covered":13,"percent":100.00000000,"sha256":"889a63b51b29012f4ae5499d1c0577fe29f2f2959b05629f8e123715cfc1f75f"}, +{"file":"internal/admission/distributed.go","statements":0,"covered":0,"percent":null,"sha256":"41ef40897886c0878cbfe52f6716bdcb8433fb7eaddcfff298e1d54c55db423d"}, +{"file":"internal/store/interface.go","statements":0,"covered":0,"percent":null,"sha256":"15ada2fcbbb06ce210e1978b0c2aa4316e9786c6b0252ceec80e169ae08c0fe9"}, +{"file":"internal/controller/http/fiber/middleware.go","statements":39,"covered":38,"percent":97.43589744,"sha256":"af6796f95b1e89cb053d2440b803d66d1a722280b8c46dc1a99a99fa92ac824a"}, +{"file":"internal/config/logger.go","statements":7,"covered":7,"percent":100.00000000,"sha256":"3a69e20a00fa2ed816f344a990e9e0ef0077e1607d4207858b4b00e4ff5d1988"}, +{"file":"internal/controller/http/fiber/errors.go","statements":28,"covered":28,"percent":100.00000000,"sha256":"08358be6beb258bf493def317d98597997fe059afc1fa24594dd1dfd540ac253"}, +{"file":"internal/controller/http/fiber/error_codes.go","statements":0,"covered":0,"percent":null,"sha256":"3351a019c43d0360ee0fd68afabb5200422d065ae7bd908b1c0a5c02a0c1ad41"}, +{"file":"internal/store/postgres/store.go","statements":61,"covered":56,"percent":91.80327869,"sha256":"f50dbf2409c511f3b4b3cc72555a80e621e1ca1e4e314112ead35e1a34623de1"}, +{"file":"internal/store/postgres/users.go","statements":21,"covered":20,"percent":95.23809524,"sha256":"8c77a2ebc8e7cdf4bcaad173feb413fcfe2691e50bc61b0e70a5e8748f167ce6"}, +{"file":"internal/service/production/users.go","statements":19,"covered":19,"percent":100.00000000,"sha256":"b61747c3e5d7bee523ba82817a6a450e7f978fda4df10b8870d53a01bc4742d9"}, +{"file":"internal/model/http/models.go","statements":0,"covered":0,"percent":null,"sha256":"8c183b065bc3ab4cad20570eab79f334ca75a3309186fdf832fb1aa598894465"}, +{"file":"internal/model/dto/models.go","statements":0,"covered":0,"percent":null,"sha256":"23c3b9cf3de49c015a0eac85e19fb287ffdd3133de16035f74db34ec9a6df220"}, +{"file":"internal/config/persistence.go","statements":15,"covered":15,"percent":100.00000000,"sha256":"28c61d23db4ca2ef7ed952451f465318865076d2393eaa94ff5d7bb339c4c06b"}, +{"file":"internal/store/postgres/messages.go","statements":29,"covered":27,"percent":93.10344828,"sha256":"114f7f6dd12feb80e709e704a83f59d8c7f33fbd62e3a137f53219fa5f03d046"}, +{"file":"internal/model/dto/session.go","statements":0,"covered":0,"percent":null,"sha256":"896a694b0c217240343077d4287f4a6e447338c38571abbebcb3d16a519137fb"}, +{"file":"internal/controller/http/fiber/dependencies.go","statements":0,"covered":0,"percent":null,"sha256":"6ee07f110bdb29d8d2191ab8889ba60474b33a5b225739875c8a57d8434be15d"}, +{"file":"internal/store/memory/store.go","statements":3,"covered":3,"percent":100.00000000,"sha256":"973e451d35a79af4614a8727439bfdf5c72b55e03d904b59cb3f39ce0edcb83b"}, +{"file":"internal/service/production/access.go","statements":27,"covered":27,"percent":100.00000000,"sha256":"260f7c77bdbcb1913ebd487e531aa6bb1621d10cd1c4cad91ab34d11cd4fec16"}, +{"file":"internal/controller/fx.go","statements":1,"covered":1,"percent":100.00000000,"sha256":"af72da25fea9811c13a50c8133e9e8b35e070c5295069c40c0ae89cdc0aff19a"}, +{"file":"internal/store/memory/users.go","statements":22,"covered":21,"percent":95.45454545,"sha256":"494a5c8dda4d6a158bc3629f735c12cef36abfb19353d65380e0e4696de9284a"}, +{"file":"internal/controller/http/fiber/mapping.go","statements":19,"covered":19,"percent":100.00000000,"sha256":"cd79419f940868066dffbcc3cd8a024d4e0c9113785f89d7a3f2d6ff57223597"}, +{"file":"internal/controller/http/fiber/error_registry.go","statements":2,"covered":2,"percent":100.00000000,"sha256":"9d5da8d98ece2706e324cb2deca915e0811b6ad98f7aaac5805ca0f3cc0a1f9a"} +],"passed":true} diff --git a/evidence/coverage.txt b/evidence/coverage.txt new file mode 100644 index 00000000..3cf36ade --- /dev/null +++ b/evidence/coverage.txt @@ -0,0 +1,95 @@ +GO="go" scripts/coverage.sh +warning: GOCOVERDIR not set, no coverage data emitted +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/cmd/server 1.948s coverage: 32.4% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/admission (cached) coverage: 1.3% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config 1.115s coverage: 7.0% of statements in ./... + gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/controller coverage: 0.0% of statements +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/controller/http/fiber 1.559s coverage: 53.8% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor (cached) coverage: 3.1% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/hashring (cached) coverage: 1.7% of statements in ./... +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto [no test files] +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/http [no test files] +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/password (cached) coverage: 1.4% of statements in ./... +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service [no test files] +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service/authentication (cached) coverage: 4.5% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service/production (cached) coverage: 18.1% of statements in ./... +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store [no test files] +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/memory (cached) coverage: 7.7% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/postgres 1.959s coverage: 13.3% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/strictjson (cached) coverage: 3.0% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/valkey 1.246s coverage: 9.7% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/student-tests 1.207s coverage: 0.0% of statements in ./... +PASS: lab3 public API scenario; infrastructure and grading evidence remain separate. + N/A internal/service/cursor.go + 100.00% cmd/server/app.go + 100.00% internal/service/production/members.go + 100.00% internal/service/production/errors.go + N/A internal/controller/interface.go + N/A internal/service/interface.go + 100.00% internal/admission/limiter.go + 100.00% internal/service/production/service.go + 95.24% internal/hashring/ring.go + 94.87% internal/cursor/codec.go + N/A internal/controller/http/fiber/headers.go + 100.00% internal/store/memory/capacity.go + 100.00% cmd/server/persistence.go + N/A internal/service/errors.go + 100.00% cmd/server/main.go + 100.00% internal/controller/http/fiber/routes.go + 100.00% internal/controller/http/fiber/health.go + 96.00% internal/config/controller.go + 90.00% internal/controller/http/fiber/metrics.go + 100.00% internal/config/memory.go + 100.00% internal/service/production/creation.go + 100.00% internal/controller/http/fiber/configure.go + 94.12% internal/service/production/pages.go + 97.92% internal/service/authentication/service.go + 94.44% internal/password/password.go + 91.67% internal/controller/http/fiber/lifecycle.go + 90.00% cmd/server/logger.go + 97.14% internal/valkey/client.go + 97.30% internal/strictjson/decode.go + 94.74% internal/store/memory/messages.go + 100.00% internal/service/production/messages.go + 100.00% internal/service/production/pagination.go + 90.48% internal/store/postgres/idempotency.go + 92.31% internal/store/postgres/chats.go + 100.00% internal/service/production/validation.go + 100.00% internal/service/production/chats.go + 100.00% internal/config/config.go + 100.00% cmd/server/commands.go + 100.00% internal/config/environment.go + 94.74% internal/valkey/cache.go + N/A internal/service/auth.go + 100.00% internal/valkey/admission.go + 100.00% internal/controller/http/fiber/auth.go + 94.74% cmd/server/healthcheck.go + 100.00% internal/store/memory/ordering.go + N/A internal/service/cache.go + 100.00% internal/store/memory/chats.go + 100.00% internal/controller/http/fiber/decode.go + 100.00% internal/controller/http/fiber/controller.go + 92.31% internal/controller/http/fiber/public_errors.go + 97.30% internal/controller/http/fiber/handlers.go + 100.00% internal/store/postgres/sessions.go + N/A internal/admission/distributed.go + N/A internal/store/interface.go + 97.44% internal/controller/http/fiber/middleware.go + 100.00% internal/config/logger.go + 100.00% internal/controller/http/fiber/errors.go + N/A internal/controller/http/fiber/error_codes.go + 91.80% internal/store/postgres/store.go + 95.24% internal/store/postgres/users.go + 100.00% internal/service/production/users.go + N/A internal/model/http/models.go + N/A internal/model/dto/models.go + 100.00% internal/config/persistence.go + 93.10% internal/store/postgres/messages.go + N/A internal/model/dto/session.go + N/A internal/controller/http/fiber/dependencies.go + 100.00% internal/store/memory/store.go + 100.00% internal/service/production/access.go + 100.00% internal/controller/fx.go + 95.45% internal/store/memory/users.go + 100.00% internal/controller/http/fiber/mapping.go + 100.00% internal/controller/http/fiber/error_registry.go diff --git a/evidence/failover-targets.txt b/evidence/failover-targets.txt new file mode 100644 index 00000000..3aee4c8a --- /dev/null +++ b/evidence/failover-targets.txt @@ -0,0 +1 @@ +2026-10-16T08:46:57Z target=api-647dcfd499-fwtds diff --git a/evidence/load-idempotency-20261016084724.txt b/evidence/load-idempotency-20261016084724.txt new file mode 100644 index 00000000..86726224 --- /dev/null +++ b/evidence/load-idempotency-20261016084724.txt @@ -0,0 +1,68 @@ +time="2026-10-16T08:47:26Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-6lh86, status=201" source=console +time="2026-10-16T08:47:27Z" level=info msg="instance=api-647dcfd499-vrnnv, status=201" source=console + + + █ THRESHOLDS + + checks + ✓ 'rate==1' rate=100.00% + + + █ TOTAL RESULTS + + checks_total.......: 34 19.886583/s + checks_succeeded...: 100.00% 34 out of 34 + checks_failed......: 0.00% 0 out of 34 + + ✓ concurrent retry succeeds + ✓ exactly one stored message + ✓ different body conflicts + + HTTP + http_req_duration..............: avg=49.18ms min=16.29ms med=45.78ms max=119.2ms p(90)=68.32ms p(95)=103.99ms + { expected_response:true }...: avg=52.33ms min=22.83ms med=46.25ms max=119.2ms p(90)=75.9ms p(95)=107.41ms + http_req_failed................: 12.19% 5 out of 41 + http_reqs......................: 41 23.980879/s + + EXECUTION + iteration_duration.............: avg=72.16ms min=30.32ms med=50.96ms max=220.71ms p(90)=144.08ms p(95)=171.58ms + iterations.....................: 32 18.716784/s + vus............................: 0 min=0 max=0 + vus_max........................: 8 min=8 max=8 + + NETWORK + data_received..................: 61 kB 35 kB/s + data_sent......................: 11 kB 6.2 kB/s + + + diff --git a/evidence/resources-idempotency-20261016084724.txt b/evidence/resources-idempotency-20261016084724.txt new file mode 100644 index 00000000..a60dce59 --- /dev/null +++ b/evidence/resources-idempotency-20261016084724.txt @@ -0,0 +1,20 @@ +UTC 2026-10-16T08:47:24Z +NAME CPU(cores) MEMORY(bytes) +api-647dcfd499-6lh86 18m 59Mi +api-647dcfd499-vrnnv 10m 23Mi +postgres-0 15m 27Mi +valkey-0 18m 3Mi +valkey-1 5m 3Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|3 +UTC 2026-10-16T08:47:30Z +NAME CPU(cores) MEMORY(bytes) +api-647dcfd499-6lh86 9m 59Mi +api-647dcfd499-vrnnv 3m 23Mi +postgres-0 5m 27Mi +valkey-0 12m 3Mi +valkey-1 5m 3Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|6 diff --git a/evidence/restart-after.txt b/evidence/restart-after.txt new file mode 100644 index 00000000..44ace47b --- /dev/null +++ b/evidence/restart-after.txt @@ -0,0 +1,7 @@ +NAME UID +api-647dcfd499-ksc82 91cdb519-3f11-4824-ba5e-3013a0a4e27e +api-647dcfd499-tz465 baec4045-bd34-44d2-88ac-3789f92a7be8 +postgres-0 03c4f32c-b0b0-46af-bf8b-4466a7ffeddf +valkey-0 bd0c9b06-7b2b-409c-9210-47fe4a5a4716 +valkey-1 899391b6-0120-489e-b766-38a00b500f68 +valkey-2 bf1f5110-6de8-46b4-9ffe-98f554df8fc5 diff --git a/evidence/restart-before.txt b/evidence/restart-before.txt new file mode 100644 index 00000000..83033747 --- /dev/null +++ b/evidence/restart-before.txt @@ -0,0 +1,7 @@ +NAME UID +api-647dcfd499-6lh86 7b711baf-e2ba-4b23-93eb-07ca8f7db918 +api-647dcfd499-vrnnv ce8f8307-4d12-4e03-8354-157e262c4e48 +postgres-0 1f6ebfb6-7a2a-43b7-a61b-c887f5b2e235 +valkey-0 d0d2a5ac-4fad-47e9-ab50-5169d09ecec5 +valkey-1 fbd7523d-2088-4c52-b455-72b92910ef06 +valkey-2 a6681afc-3adb-4f40-8842-d32b5a7a583b diff --git a/evidence/shared-contract.txt b/evidence/shared-contract.txt new file mode 100644 index 00000000..9a553306 --- /dev/null +++ b/evidence/shared-contract.txt @@ -0,0 +1,2 @@ +python3 scripts/check_contract.py +PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. diff --git a/evidence/shared-dependency-faults.txt b/evidence/shared-dependency-faults.txt new file mode 100644 index 00000000..01e8d3b7 --- /dev/null +++ b/evidence/shared-dependency-faults.txt @@ -0,0 +1,28 @@ +UTC 2026-10-16T08:49:24Z +a57cbcf3292d91164abc24ed101e9712a93b835d +f191cc4d00d13a1e9c46323d545f3310ac2e7d23bb93d76060e282d1fbd220f3 internal/store/postgres/chats.go +a8fa0da216b564121068bb44ee0f6e1daa7aa64ba54c301d0888db00f57596da internal/store/postgres/errors_test.go +24d463067d1b51eaad5f7b21013be2ab836dea78f7314469779e2336cf57cb9c internal/store/postgres/idempotency.go +30578fb46580b52acbb449615463f2f761571ff8cc86702b69f3fbd5af951b97 internal/store/postgres/idempotency_test.go +114f7f6dd12feb80e709e704a83f59d8c7f33fbd62e3a137f53219fa5f03d046 internal/store/postgres/messages.go +889a63b51b29012f4ae5499d1c0577fe29f2f2959b05629f8e123715cfc1f75f internal/store/postgres/sessions.go +f50dbf2409c511f3b4b3cc72555a80e621e1ca1e4e314112ead35e1a34623de1 internal/store/postgres/store.go +9bc4948a301a171c2dbf57264a9aee27bfc543536b93a7c540b359ed7721816e internal/store/postgres/store_test.go +8c77a2ebc8e7cdf4bcaad173feb413fcfe2691e50bc61b0e70a5e8748f167ce6 internal/store/postgres/users.go +f7fd9ca5335f9119d5ed1714c39c3d19e840528a0248fda5d08f60a10d2060ac internal/service/errors.go +15ada2fcbbb06ce210e1978b0c2aa4316e9786c6b0252ceec80e169ae08c0fe9 internal/store/interface.go +18e1bbaa5ac64311e208c23ca3eca3fc543b48f5187b22313735b7df83603ce3 internal/controller/http/fiber/public_errors.go +0570f1d2ed6082580c5a7a6133477d6eac47baf76781250d496669bab86e8cf6 scripts/test-faults.sh +PASS: postgres stop authenticated history => 503 unavailable (0.001602s) +PASS: postgres stop rejects anonymous/spoofed/malformed/unknown identity; liveness=200 readiness=503 +PASS: postgres stop recovery preserves the original session and message +PASS: postgres pause authenticated history => 503 unavailable (0.508766s) +PASS: postgres pause rejects anonymous/spoofed/malformed/unknown identity; liveness=200 readiness=503 +PASS: postgres pause recovery preserves the original session and message +PASS: valkey stop authenticated history => 503 unavailable (0.502885s) +PASS: valkey stop rejects anonymous/spoofed/malformed/unknown identity; liveness=200 readiness=503 +PASS: valkey stop recovery preserves the original session and message +PASS: valkey pause authenticated history => 503 unavailable (0.508144s) +PASS: valkey pause rejects anonymous/spoofed/malformed/unknown identity; liveness=200 readiness=503 +PASS: valkey pause recovery preserves the original session and message +PASS: real dependency fault scenarios completed diff --git a/evidence/shared-deploy.txt b/evidence/shared-deploy.txt new file mode 100644 index 00000000..1dfaed65 --- /dev/null +++ b/evidence/shared-deploy.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Fri Oct 16 11:44:51 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 2 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/shared-failover-1.txt b/evidence/shared-failover-1.txt new file mode 100644 index 00000000..c352c5c5 --- /dev/null +++ b/evidence/shared-failover-1.txt @@ -0,0 +1,4 @@ +python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "https://hl.agapov.space" +Executing explicit failover hook; hook output suppressed to avoid leaking secrets. +{"observed_instances_before": 2, "successful_writes": 48, "failed_attempts": 0, "first_recovery_seconds": 0.801} +PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. diff --git a/evidence/shared-failover-2-retry.txt b/evidence/shared-failover-2-retry.txt new file mode 100644 index 00000000..d405b60f --- /dev/null +++ b/evidence/shared-failover-2-retry.txt @@ -0,0 +1,3 @@ +python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "https://hl.agapov.space" +FAIL: GET /api/v1/users/me: connection/TLS failure (TimeoutError) +make: *** [test-failover] Error 1 diff --git a/evidence/shared-failover-2.txt b/evidence/shared-failover-2.txt new file mode 100644 index 00000000..d405b60f --- /dev/null +++ b/evidence/shared-failover-2.txt @@ -0,0 +1,3 @@ +python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "https://hl.agapov.space" +FAIL: GET /api/v1/users/me: connection/TLS failure (TimeoutError) +make: *** [test-failover] Error 1 diff --git a/evidence/shared-go-tests.txt b/evidence/shared-go-tests.txt new file mode 100644 index 00000000..1e97b36b --- /dev/null +++ b/evidence/shared-go-tests.txt @@ -0,0 +1,19 @@ +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/cmd/server 0.429s +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/admission (cached) +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config (cached) +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/controller [no test files] +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/controller/http/fiber 0.389s +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor (cached) +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/hashring (cached) +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto [no test files] +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/http [no test files] +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/password (cached) +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service [no test files] +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service/authentication 0.283s +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service/production 0.292s +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store [no test files] +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/memory (cached) +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/postgres 0.331s +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/strictjson (cached) +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/valkey (cached) +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/student-tests 0.299s diff --git a/evidence/shared-helm.txt b/evidence/shared-helm.txt new file mode 100644 index 00000000..ddb771d3 --- /dev/null +++ b/evidence/shared-helm.txt @@ -0,0 +1,6 @@ +helm lint charts/messenger -f "charts/messenger/values.yaml" +==> Linting charts/messenger +[INFO] Chart.yaml: icon is recommended + +1 chart(s) linted, 0 chart(s) failed +helm template "lab2" charts/messenger -n "highload-applications" -f "charts/messenger/values.yaml" > /dev/null diff --git a/evidence/shared-idempotency.txt b/evidence/shared-idempotency.txt new file mode 100644 index 00000000..01cf76c2 --- /dev/null +++ b/evidence/shared-idempotency.txt @@ -0,0 +1,3 @@ +RUN="idempotency-$(date -u +%Y%m%d%H%M%S)" LOAD_SCRIPT=idempotency.js scripts/run-load.sh +configmap/load-scripts created +job.batch/load-idempotency-20261016084724 created diff --git a/evidence/shared-image-build.txt b/evidence/shared-image-build.txt new file mode 100644 index 00000000..6c47902f --- /dev/null +++ b/evidence/shared-image-build.txt @@ -0,0 +1,69 @@ +#0 building with "asisti-builder" instance using docker-container driver + +#1 [internal] load build definition from Dockerfile +#1 transferring dockerfile: 583B done +#1 DONE 0.0s + +#2 [internal] load metadata for docker.io/library/golang:1.26.1-alpine3.23 +#2 DONE 2.4s + +#3 [internal] load .dockerignore +#3 transferring context: 145B done +#3 DONE 0.0s + +#4 [build 1/7] FROM docker.io/library/golang:1.26.1-alpine3.23@sha256:2389ebfa5b7f43eeafbd6be0c3700cc46690ef842ad962f6c5bd6be49ed82039 +#4 resolve docker.io/library/golang:1.26.1-alpine3.23@sha256:2389ebfa5b7f43eeafbd6be0c3700cc46690ef842ad962f6c5bd6be49ed82039 done +#4 DONE 0.0s + +#5 [internal] load build context +#5 transferring context: 327.16kB 0.0s done +#5 DONE 0.0s + +#6 [build 2/7] WORKDIR /src +#6 CACHED + +#7 [build 3/7] COPY go.mod go.sum ./ +#7 CACHED + +#8 [build 4/7] RUN go mod download +#8 CACHED + +#9 [build 5/7] COPY cmd/ ./cmd/ +#9 CACHED + +#10 [build 6/7] COPY internal/ ./internal/ +#10 DONE 0.1s + +#11 [build 7/7] RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/server ./cmd/server +#11 DONE 60.5s + +#12 [runtime 1/1] COPY --from=build /out/server /server +#12 DONE 0.1s + +#13 exporting to image +#13 exporting layers +#13 exporting layers 0.8s done +#13 exporting manifest sha256:797eb64e6c596d1b0be84484b7e304ae93907134dad5d29b6946ef0a331647e4 +#13 exporting manifest sha256:797eb64e6c596d1b0be84484b7e304ae93907134dad5d29b6946ef0a331647e4 done +#13 exporting config sha256:a3db374ae207a2072c13c15e4d1510d8d512c5b52e451b0cb965a326c75683fe 0.0s done +#13 exporting attestation manifest sha256:71b5c81e64cd4b587a4a90a68fc94403d32e6358a5d6c29de0c3f932478bf32b 0.0s done +#13 exporting manifest list sha256:a73799010550ab2008b984ed9d0bfa8dfdd9bb963cb948bc91713748b24c3889 done +#13 DONE 0.9s + +#13 exporting to image +#13 pushing layers +#13 ... + +#14 [auth] mtusi2026lab3:pull,push token for asisti.registry.twcstorage.ru +#14 DONE 0.0s + +#13 exporting to image +#13 pushing layers 3.0s done +#13 pushing manifest for asisti.registry.twcstorage.ru/mtusi2026lab3:shared-release-20261016@sha256:a73799010550ab2008b984ed9d0bfa8dfdd9bb963cb948bc91713748b24c3889 +#13 pushing manifest for asisti.registry.twcstorage.ru/mtusi2026lab3:shared-release-20261016@sha256:a73799010550ab2008b984ed9d0bfa8dfdd9bb963cb948bc91713748b24c3889 1.2s done +#13 DONE 5.2s + +#15 resolving provenance for metadata file +#15 DONE 0.0s + +View build details: docker-desktop://dashboard/build/asisti-builder/asisti-builder0/sewpq07wbv5yc2egvuscmyjuk diff --git a/evidence/shared-persistence.txt b/evidence/shared-persistence.txt new file mode 100644 index 00000000..156dfca2 --- /dev/null +++ b/evidence/shared-persistence.txt @@ -0,0 +1,3 @@ +python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "https://hl.agapov.space" +Executing explicit persistence hook; hook output suppressed to avoid leaking secrets. +PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence. diff --git a/evidence/shared-pvc-after.txt b/evidence/shared-pvc-after.txt new file mode 100644 index 00000000..dcc7de1a --- /dev/null +++ b/evidence/shared-pvc-after.txt @@ -0,0 +1,8 @@ +NAME UID +data-lab3-postgres-0 feec6037-1856-4548-a23c-e756d7465c6a +data-lab3-valkey-0 220d6ffd-beeb-4330-b96d-35bf741ff4d5 +data-lab3-valkey-1 b54ff66a-7edd-43c7-b622-88cf3ca7c4a1 +data-postgres-0 b592cc47-82be-4635-afa4-d65e3246e82a +data-valkey-0 fafeeae5-f6f6-487d-ba50-15d50f9678c7 +data-valkey-1 a39c3e41-fae2-4096-b83f-807aada803e9 +data-valkey-2 ad5c9d15-ae01-409e-ad11-7f7f7b42e7fe diff --git a/evidence/shared-pvc-before.txt b/evidence/shared-pvc-before.txt new file mode 100644 index 00000000..dcc7de1a --- /dev/null +++ b/evidence/shared-pvc-before.txt @@ -0,0 +1,8 @@ +NAME UID +data-lab3-postgres-0 feec6037-1856-4548-a23c-e756d7465c6a +data-lab3-valkey-0 220d6ffd-beeb-4330-b96d-35bf741ff4d5 +data-lab3-valkey-1 b54ff66a-7edd-43c7-b622-88cf3ca7c4a1 +data-postgres-0 b592cc47-82be-4635-afa4-d65e3246e82a +data-valkey-0 fafeeae5-f6f6-487d-ba50-15d50f9678c7 +data-valkey-1 a39c3e41-fae2-4096-b83f-807aada803e9 +data-valkey-2 ad5c9d15-ae01-409e-ad11-7f7f7b42e7fe diff --git a/evidence/shared-ready.json b/evidence/shared-ready.json new file mode 100644 index 00000000..1a36cf5f --- /dev/null +++ b/evidence/shared-ready.json @@ -0,0 +1 @@ +{"status":"ok"} \ No newline at end of file diff --git a/evidence/shared-releases.txt b/evidence/shared-releases.txt new file mode 100644 index 00000000..543dfcfe --- /dev/null +++ b/evidence/shared-releases.txt @@ -0,0 +1,2 @@ +NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION +lab2 highload-applications 2 2026-10-16 11:44:51.753981 +0300 MSK deployed messenger-0.1.0 lab3 diff --git a/evidence/shared-rolling.txt b/evidence/shared-rolling.txt new file mode 100644 index 00000000..95608497 --- /dev/null +++ b/evidence/shared-rolling.txt @@ -0,0 +1,2 @@ +configmap/load-scripts configured +job.batch/load-rolling-20261016 created diff --git a/evidence/shared-rollout.txt b/evidence/shared-rollout.txt new file mode 100644 index 00000000..35f0316d --- /dev/null +++ b/evidence/shared-rollout.txt @@ -0,0 +1 @@ +deployment "api" successfully rolled out diff --git a/evidence/shared-smoke.txt b/evidence/shared-smoke.txt new file mode 100644 index 00000000..4fe323c6 --- /dev/null +++ b/evidence/shared-smoke.txt @@ -0,0 +1,2 @@ +python3 tests/smoke.py --base-url "https://hl.agapov.space" +PASS: lab3 public API scenario; infrastructure and grading evidence remain separate. diff --git a/evidence/shared-source-snapshot.txt b/evidence/shared-source-snapshot.txt new file mode 100644 index 00000000..fa276188 --- /dev/null +++ b/evidence/shared-source-snapshot.txt @@ -0,0 +1,19 @@ +447460bce6ad010ecc4f191873cad6980f6d7c2a7665eed756d85d40aa0fad70 cmd/server/app.go +11113c1772bb6d76c8be9f06415ec431404479ac52e3c950cf851d3beffbef49 cmd/server/app_test.go +2631df45b82c7cf99626ae6fe6c5b05ef18254b487d034ad98af26792e569bc8 cmd/server/commands.go +c62b7a6897b300e25fdcfd6650cd256f008207146f1a45c00d77f0db1ab01575 cmd/server/healthcheck.go +dd07b30c1e4c7b25253be83f1e9dea3c12829ca071176529b6772fd4564057eb cmd/server/healthcheck_test.go +93cd37b8e2ec1e6088b82f348a59e6862951f8462df4cd5448562489b05dce1f cmd/server/logger.go +c22d8cdf4ce31fde29945e967d3f025e280a7dc4d2022329d51be972d2a0f495 cmd/server/main.go +a9bfa3bcc68d1b045ec21c193118bb209dfd7bdcbee3cbd28efc5573dc6db3c8 cmd/server/persistence.go +b337101e2112a1710509d1dc24f8f4b558983a2dcc0719ee001605a2232524cd cmd/server/persistence_test.go +f191cc4d00d13a1e9c46323d545f3310ac2e7d23bb93d76060e282d1fbd220f3 internal/store/postgres/chats.go +a8fa0da216b564121068bb44ee0f6e1daa7aa64ba54c301d0888db00f57596da internal/store/postgres/errors_test.go +24d463067d1b51eaad5f7b21013be2ab836dea78f7314469779e2336cf57cb9c internal/store/postgres/idempotency.go +30578fb46580b52acbb449615463f2f761571ff8cc86702b69f3fbd5af951b97 internal/store/postgres/idempotency_test.go +114f7f6dd12feb80e709e704a83f59d8c7f33fbd62e3a137f53219fa5f03d046 internal/store/postgres/messages.go +889a63b51b29012f4ae5499d1c0577fe29f2f2959b05629f8e123715cfc1f75f internal/store/postgres/sessions.go +f50dbf2409c511f3b4b3cc72555a80e621e1ca1e4e314112ead35e1a34623de1 internal/store/postgres/store.go +9bc4948a301a171c2dbf57264a9aee27bfc543536b93a7c540b359ed7721816e internal/store/postgres/store_test.go +8c77a2ebc8e7cdf4bcaad173feb413fcfe2691e50bc61b0e70a5e8748f167ce6 internal/store/postgres/users.go +f9cb55f2ea75799e6bf438aef7c7cd760b33d997ef75888feda2e6358622d5e9 charts/messenger/values.yaml diff --git a/evidence/shared-state.txt b/evidence/shared-state.txt new file mode 100644 index 00000000..530bdf37 --- /dev/null +++ b/evidence/shared-state.txt @@ -0,0 +1,20 @@ +NAME READY STATUS RESTARTS AGE +pod/api-56cdb6bc9b-fkkmp 1/1 Running 0 27s +pod/api-56cdb6bc9b-rsrlb 1/1 Running 0 30s +pod/load-idempotency-20261016084724-ph422 0/1 Completed 0 3m43s +pod/load-rolling-20261016-fznwl 0/1 Completed 0 53s +pod/metrics-server-db8d46c89-92mbs 1/1 Running 0 18h +pod/migrate-2-c56fc 0/1 Completed 0 6m13s +pod/postgres-0 1/1 Running 0 108s +pod/valkey-0 1/1 Running 0 102s +pod/valkey-1 1/1 Running 0 105s +pod/valkey-2 1/1 Running 0 108s + +NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE +horizontalpodautoscaler.autoscaling/api Deployment/api cpu: /60% 2 4 2 6m13s + +NAME CLASS HOSTS ADDRESS PORTS AGE +ingress.networking.k8s.io/messenger traefik hl.agapov.space 80, 443 6m13s + +NAME READY SECRET AGE +certificate.cert-manager.io/messenger-tls True messenger-tls 6m13s diff --git a/evidence/shared-static.txt b/evidence/shared-static.txt new file mode 100644 index 00000000..3a23d6ec --- /dev/null +++ b/evidence/shared-static.txt @@ -0,0 +1,2 @@ +go vet ./...: PASS +golangci-lint run ./...: 0 issues diff --git a/go.mod b/go.mod index 388ca407..e00553e2 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/gofiber/fiber/v2 v2.52.12 github.com/google/uuid v1.6.0 github.com/jackc/pgx/v5 v5.9.1 + github.com/prometheus/client_golang v1.23.2 github.com/redis/go-redis/v9 v9.17.2 github.com/valyala/fasthttp v1.51.0 go.lab260.ru/fielderr v0.0.0-20260609150058-2f9540b99e41 @@ -16,21 +17,28 @@ require ( require ( github.com/andybalholm/brotli v1.1.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect - github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/compress v1.18.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.66.1 // indirect + github.com/prometheus/procfs v0.16.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect go.uber.org/dig v1.19.0 // indirect go.uber.org/multierr v1.10.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.42.0 // indirect golang.org/x/text v0.35.0 // indirect + google.golang.org/protobuf v1.36.8 // indirect ) diff --git a/go.sum b/go.sum index 3bca56bd..dac9b09e 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= @@ -13,6 +15,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/gofiber/fiber/v2 v2.52.12 h1:0LdToKclcPOj8PktUdIKo9BUohjjwfnQl42Dhw8/WUw= github.com/gofiber/fiber/v2 v2.52.12/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= @@ -23,8 +27,14 @@ github.com/jackc/pgx/v5 v5.9.1 h1:uwrxJXBnx76nyISkhr33kQLlUqjv7et7b9FjCen/tdc= github.com/jackc/pgx/v5 v5.9.1/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -32,12 +42,24 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/redis/go-redis/v9 v9.17.2 h1:P2EGsA4qVIM3Pp+aPocCJ7DguDHhqrXNhVcEp4ViluI= github.com/redis/go-redis/v9 v9.17.2/go.mod h1:u410H11HMLoB+TP67dz8rL9s6QW2j76l0//kSOd3370= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -61,6 +83,8 @@ go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= @@ -71,7 +95,11 @@ golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/infra/metrics-server/components.yaml b/infra/metrics-server/components.yaml new file mode 100644 index 00000000..54d5bee5 --- /dev/null +++ b/infra/metrics-server/components.yaml @@ -0,0 +1,203 @@ +# Source: metrics-server v0.8.1/components.yaml; workload namespace adapted to highload-applications. +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + k8s-app: metrics-server + name: metrics-server + namespace: highload-applications +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + k8s-app: metrics-server + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" + rbac.authorization.k8s.io/aggregate-to-view: "true" + name: system:aggregated-metrics-reader +rules: +- apiGroups: + - metrics.k8s.io + resources: + - pods + - nodes + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + k8s-app: metrics-server + name: system:metrics-server +rules: +- apiGroups: + - "" + resources: + - nodes/metrics + verbs: + - get +- apiGroups: + - "" + resources: + - pods + - nodes + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + k8s-app: metrics-server + name: metrics-server-auth-reader + namespace: kube-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: extension-apiserver-authentication-reader +subjects: +- kind: ServiceAccount + name: metrics-server + namespace: highload-applications +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + k8s-app: metrics-server + name: metrics-server:system:auth-delegator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:auth-delegator +subjects: +- kind: ServiceAccount + name: metrics-server + namespace: highload-applications +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + k8s-app: metrics-server + name: system:metrics-server +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:metrics-server +subjects: +- kind: ServiceAccount + name: metrics-server + namespace: highload-applications +--- +apiVersion: v1 +kind: Service +metadata: + labels: + k8s-app: metrics-server + name: metrics-server + namespace: highload-applications +spec: + ports: + - appProtocol: https + name: https + port: 443 + protocol: TCP + targetPort: https + selector: + k8s-app: metrics-server +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + k8s-app: metrics-server + name: metrics-server + namespace: highload-applications +spec: + selector: + matchLabels: + k8s-app: metrics-server + strategy: + rollingUpdate: + maxUnavailable: 0 + template: + metadata: + labels: + k8s-app: metrics-server + spec: + containers: + - args: + - --cert-dir=/tmp + - --secure-port=10250 + - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname + - --kubelet-use-node-status-port + - --metric-resolution=15s + image: registry.k8s.io/metrics-server/metrics-server:v0.8.1 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /livez + port: https + scheme: HTTPS + periodSeconds: 10 + name: metrics-server + ports: + - containerPort: 10250 + name: https + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /readyz + port: https + scheme: HTTPS + initialDelaySeconds: 20 + periodSeconds: 10 + resources: + requests: + cpu: 100m + memory: 200Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + seccompProfile: + type: RuntimeDefault + volumeMounts: + - mountPath: /tmp + name: tmp-dir + nodeSelector: + kubernetes.io/os: linux + priorityClassName: system-cluster-critical + serviceAccountName: metrics-server + volumes: + - emptyDir: {} + name: tmp-dir +--- +apiVersion: apiregistration.k8s.io/v1 +kind: APIService +metadata: + labels: + k8s-app: metrics-server + name: v1beta1.metrics.k8s.io +spec: + group: metrics.k8s.io + groupPriorityMinimum: 100 + insecureSkipTLSVerify: true + service: + name: metrics-server + namespace: highload-applications + version: v1beta1 + versionPriority: 100 diff --git a/infra/metrics-server/kustomization.yaml b/infra/metrics-server/kustomization.yaml new file mode 100644 index 00000000..9a0b325f --- /dev/null +++ b/infra/metrics-server/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - components.yaml +patches: + - target: + kind: Deployment + name: metrics-server + patch: |- + - op: add + path: /spec/template/spec/containers/0/args/- + value: --kubelet-certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt diff --git a/infra/monitoring/grafana-dashboard.json b/infra/monitoring/grafana-dashboard.json new file mode 100644 index 00000000..7b9caa4a --- /dev/null +++ b/infra/monitoring/grafana-dashboard.json @@ -0,0 +1,106 @@ +{ + "title": "Lab 3 — API scaling", + "uid": "highload-lab3", + "schemaVersion": 39, + "version": 1, + "refresh": "15s", + "time": { + "from": "now-30m", + "to": "now" + }, + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "panels": [ + { + "id": 1, + "type": "timeseries", + "title": "HTTP requests/s", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "gridPos": { + "x": 0, + "y": 0, + "w": 12, + "h": 8 + }, + "targets": [ + { + "refId": "A", + "expr": "sum(rate(messenger_http_requests_total[2m])) by (status_class)" + } + ] + }, + { + "id": 2, + "type": "timeseries", + "title": "Latency p95, seconds", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "gridPos": { + "x": 12, + "y": 0, + "w": 12, + "h": 8 + }, + "targets": [ + { + "refId": "A", + "expr": "histogram_quantile(0.95, sum(rate(messenger_http_duration_seconds_bucket[2m])) by (le))" + } + ] + }, + { + "id": 3, + "type": "timeseries", + "title": "In-flight requests", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "gridPos": { + "x": 0, + "y": 8, + "w": 12, + "h": 8 + }, + "targets": [ + { + "refId": "A", + "expr": "sum(messenger_http_in_flight) by (pod)" + } + ] + }, + { + "id": 4, + "type": "timeseries", + "title": "API replicas", + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "gridPos": { + "x": 12, + "y": 8, + "w": 12, + "h": 8 + }, + "targets": [ + { + "refId": "A", + "expr": "kube_deployment_status_replicas_available{namespace=\"highload-applications\",deployment=\"api\"}" + } + ] + } + ] +} diff --git a/infra/monitoring/prometheus-scrape.yaml b/infra/monitoring/prometheus-scrape.yaml new file mode 100644 index 00000000..fcb47ab9 --- /dev/null +++ b/infra/monitoring/prometheus-scrape.yaml @@ -0,0 +1,19 @@ +# Add this job to an existing Prometheus in namespace monitoring. +# Its service account needs Kubernetes service/endpoints/pod discovery permissions. +scrape_configs: + - job_name: api + scrape_interval: 15s + scrape_timeout: 3s + kubernetes_sd_configs: + - role: endpoints + namespaces: + names: [highload-applications] + relabel_configs: + - source_labels: [__meta_kubernetes_service_name] + regex: api + action: keep + - source_labels: [__meta_kubernetes_endpoint_port_name] + regex: http + action: keep + - source_labels: [__meta_kubernetes_pod_name] + target_label: pod diff --git a/internal/config/controller.go b/internal/config/controller.go index 5fe1f9ca..865663b6 100644 --- a/internal/config/controller.go +++ b/internal/config/controller.go @@ -16,6 +16,8 @@ const ( // Controller contains settings owned exclusively by the HTTP transport. type Controller struct { + // InstanceID identifies this API process to the load balancer diagnostics. + InstanceID string // Host is the IP address on which the listener binds. Host string // Port is the TCP port, in the range 1..65535. @@ -85,6 +87,7 @@ func defaultController() *Controller { // loadEnvironment applies environment overrides to this configuration section. func (cfg *Controller) loadEnvironment() error { + cfg.InstanceID = os.Getenv("INSTANCE_ID") if host, exists := os.LookupEnv("APP_HOST"); exists { cfg.Host = host } diff --git a/internal/config/persistence.go b/internal/config/persistence.go index 97142002..6950d4d2 100644 --- a/internal/config/persistence.go +++ b/internal/config/persistence.go @@ -8,6 +8,8 @@ import ( // Persistence contains database, cache and session settings. type Persistence struct { + // CursorKey is the shared base64 signing key supplied through a secret. + CursorKey string // DatabaseURL identifies the PostgreSQL database. DatabaseURL string // Shards maps stable identities to Valkey addresses. @@ -25,6 +27,7 @@ type Persistence struct { // NewPersistence loads dependency settings separately from HTTP configuration. func NewPersistence() (*Persistence, error) { cfg := &Persistence{ + CursorKey: os.Getenv("CURSOR_SIGNING_KEY"), DatabaseURL: os.Getenv("DATABASE_URL"), Coordinator: os.Getenv("VALKEY_COORDINATOR"), Shards: make(map[string]string), diff --git a/internal/controller/http/fiber/controller.go b/internal/controller/http/fiber/controller.go index a541ae39..8946c275 100644 --- a/internal/controller/http/fiber/controller.go +++ b/internal/controller/http/fiber/controller.go @@ -6,6 +6,7 @@ import ( "sync/atomic" "github.com/gofiber/fiber/v2" + "github.com/google/uuid" "go.lab260.ru/fielderr" "go.uber.org/zap" @@ -19,6 +20,7 @@ import ( // Its configuration is copied at construction and must not change during serving. // Fx manages its listener through Start and Stop. type Controller struct { + metrics *httpMetrics log *zap.Logger cfg config.Controller service service.Service @@ -28,6 +30,7 @@ type Controller struct { auth service.Authentication readiness Readiness stopping atomic.Bool + instanceID string serveDone chan error } @@ -43,6 +46,7 @@ func New(log *zap.Logger, cfg *config.Controller, svc service.Service, registry return nil, fmt.Errorf("HTTP logger, service, error registry and admission limiter are required") } ctrl := &Controller{ + metrics: newHTTPMetrics(), log: log.Named("controller.http.fiber"), cfg: *cfg, service: svc, @@ -52,6 +56,10 @@ func New(log *zap.Logger, cfg *config.Controller, svc service.Service, registry readiness: readiness, serveDone: make(chan error, 1), } + ctrl.instanceID = cfg.InstanceID + if ctrl.instanceID == "" { + ctrl.instanceID = uuid.NewString() + } ctrl.configure() return ctrl, nil } diff --git a/internal/controller/http/fiber/controller_test.go b/internal/controller/http/fiber/controller_test.go index 09a1ea4e..c4c20369 100644 --- a/internal/controller/http/fiber/controller_test.go +++ b/internal/controller/http/fiber/controller_test.go @@ -66,6 +66,7 @@ func testController(t *testing.T, change func(*config.Config)) *Controller { // request sends a raw test request and decodes its response. func request(ctrl *Controller, method, path, actor string, body []byte) (int, map[string]any, error) { req := httptest.NewRequest(method, path, bytes.NewReader(body)) + req.Header.Set("Idempotency-Key", uuid.NewString()) if body != nil { req.Header.Set("Content-Type", "application/json") } diff --git a/internal/controller/http/fiber/handlers.go b/internal/controller/http/fiber/handlers.go index e5b5c4e6..bb48549d 100644 --- a/internal/controller/http/fiber/handlers.go +++ b/internal/controller/http/fiber/handlers.go @@ -76,9 +76,10 @@ func (ctrl *Controller) HandleMessagesCreate(ctx *fiber.Ctx) error { return err } message, err := ctrl.service.MessagesCreate(ctx.UserContext(), dto.MessagesCreateRequestDTO{ - UserID: identity(ctx), - ChatID: ctx.Params("chat_id"), - Text: request.Text, + IdempotencyKey: ctx.Get("Idempotency-Key"), + UserID: identity(ctx), + ChatID: ctx.Params("chat_id"), + Text: request.Text, }) if err != nil { return err diff --git a/internal/controller/http/fiber/metrics.go b/internal/controller/http/fiber/metrics.go new file mode 100644 index 00000000..448b7f76 --- /dev/null +++ b/internal/controller/http/fiber/metrics.go @@ -0,0 +1,61 @@ +package fiber + +import ( + "net/http" + "time" + + "github.com/gofiber/fiber/v2" + "github.com/gofiber/fiber/v2/middleware/adaptor" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" +) + +// httpMetrics owns a per-server registry with bounded labels and no user identifiers. +type httpMetrics struct { + registry *prometheus.Registry + requests *prometheus.CounterVec + duration *prometheus.HistogramVec + active prometheus.Gauge +} + +// newHTTPMetrics creates independent collectors so multiple test servers do not share state. +func newHTTPMetrics() *httpMetrics { + metrics := &httpMetrics{ + registry: prometheus.NewRegistry(), + requests: prometheus.NewCounterVec(prometheus.CounterOpts{Name: "messenger_http_requests_total", Help: "Completed requests by route, method and status class."}, []string{"route", "method", "status_class"}), + duration: prometheus.NewHistogramVec(prometheus.HistogramOpts{Name: "messenger_http_duration_seconds", Help: "Completed request latency.", Buckets: prometheus.DefBuckets}, []string{"route", "method"}), + active: prometheus.NewGauge(prometheus.GaugeOpts{Name: "messenger_http_in_flight", Help: "Currently executing HTTP requests."}), + } + metrics.registry.MustRegister(metrics.requests, metrics.duration, metrics.active) + return metrics +} + +// observe records bounded route patterns, methods and status classes after error handling. +func (m *httpMetrics) observe(ctx *fiber.Ctx, elapsed time.Duration) { + route := "unmatched" + if ctx.Route() != nil && ctx.Route().Path != "/" { + route = ctx.Route().Path + } + method := ctx.Method() + switch method { + case http.MethodGet, http.MethodPost, http.MethodDelete, http.MethodHead, http.MethodOptions: + default: + method = "other" + } + status := "5xx" + switch ctx.Response().StatusCode() / 100 { + case 2: + status = "2xx" + case 3: + status = "3xx" + case 4: + status = "4xx" + } + m.requests.WithLabelValues(route, method, status).Inc() + m.duration.WithLabelValues(route, method).Observe(elapsed.Seconds()) +} + +// handleMetrics exposes this process's Prometheus registry without external backend calls. +func (ctrl *Controller) handleMetrics(ctx *fiber.Ctx) error { + return adaptor.HTTPHandler(promhttp.HandlerFor(ctrl.metrics.registry, promhttp.HandlerOpts{}))(ctx) +} diff --git a/internal/controller/http/fiber/metrics_test.go b/internal/controller/http/fiber/metrics_test.go new file mode 100644 index 00000000..9f2d4e96 --- /dev/null +++ b/internal/controller/http/fiber/metrics_test.go @@ -0,0 +1,73 @@ +package fiber + +import ( + "io" + "net/http" + "net/http/httptest" + "strings" + "testing" +) + +// TestMetricsEndpoint exposes completed requests without token or user labels. +func TestMetricsEndpoint(t *testing.T) { + ctrl := testController(t, nil) + call(t, ctrl, http.MethodGet, "/health/live", "", nil, http.StatusOK) + resp, err := ctrl.server.Test(httptest.NewRequest(http.MethodGet, "/metrics", nil)) + if err != nil { + t.Fatal(err) + } + defer func() { + _ = resp.Body.Close() + }() + body, err := io.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + if resp.StatusCode != http.StatusOK || !strings.Contains(string(body), "messenger_http_requests_total") || !strings.Contains(string(body), "messenger_http_duration_seconds_bucket") { + t.Fatalf("invalid metrics response: status %d", resp.StatusCode) + } + if resp.Header.Get("X-Instance-Id") == "" { + t.Fatal("metrics response lacks instance ID") + } +} + +// TestInstanceIdentityRemainsStable verifies errors and successes identify the same process. +func TestInstanceIdentityRemainsStable(t *testing.T) { + ctrl := testController(t, nil) + var instance string + for _, path := range []string{"/health/live", "/unknown"} { + resp, err := ctrl.server.Test(httptest.NewRequest(http.MethodGet, path, nil)) + if err != nil { + t.Fatal(err) + } + if instance == "" { + instance = resp.Header.Get("X-Instance-Id") + } + if instance == "" || resp.Header.Get("X-Instance-Id") != instance { + t.Fatal("unstable instance identity") + } + if err := resp.Body.Close(); err != nil { + t.Fatal(err) + } + } +} + +// TestMissingIdempotencyHeader rejects an otherwise valid authenticated write. +func TestMissingIdempotencyHeader(t *testing.T) { + ctrl := testController(t, nil) + caller := user(t, ctrl) + room := chat(t, ctrl, caller) + req := httptest.NewRequest(http.MethodPost, "/api/v1/chats/"+room+"/messages", strings.NewReader(`{"text":"valid"}`)) + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Authorization", "Bearer "+caller) + resp, err := ctrl.server.Test(req) + if err != nil { + t.Fatal(err) + } + defer func() { + _ = resp.Body.Close() + }() + if resp.StatusCode != http.StatusBadRequest { + t.Fatalf("missing key accepted: %d", resp.StatusCode) + } +} diff --git a/internal/controller/http/fiber/middleware.go b/internal/controller/http/fiber/middleware.go index 4bd2f817..0e79d61e 100644 --- a/internal/controller/http/fiber/middleware.go +++ b/internal/controller/http/fiber/middleware.go @@ -16,12 +16,18 @@ import ( // request assigns a request identifier, handles errors and logs the completed request. func (ctrl *Controller) request(ctx *fiber.Ctx) error { ctx.Set(headerRequestID, uuid.NewString()) + ctx.Set("X-Instance-Id", ctrl.instanceID) started := time.Now() + ctrl.metrics.active.Inc() + defer ctrl.metrics.active.Dec() err := ctx.Next() if err != nil { err = ctrl.handleErr(ctx, err) } ctrl.logRequest(ctx, time.Since(started)) + if ctx.Path() != "/metrics" { + ctrl.metrics.observe(ctx, time.Since(started)) + } return err } diff --git a/internal/controller/http/fiber/routes.go b/internal/controller/http/fiber/routes.go index 1438d60c..d2e160f7 100644 --- a/internal/controller/http/fiber/routes.go +++ b/internal/controller/http/fiber/routes.go @@ -2,6 +2,7 @@ package fiber // initRoutes registers health endpoints and authenticated application routes. func (ctrl *Controller) initRoutes() { + ctrl.server.Get("/metrics", ctrl.handleMetrics) ctrl.server.Get("/health/live", ctrl.handleLive) ctrl.server.Get("/health/ready", ctrl.handleReady) ctrl.server.Use(ctrl.admit) diff --git a/internal/cursor/codec.go b/internal/cursor/codec.go index 92789f50..6f4cd94b 100644 --- a/internal/cursor/codec.go +++ b/internal/cursor/codec.go @@ -106,3 +106,14 @@ func decodeCursorPosition(payload []byte, resource string) (Position, error) { } return Position{CreatedAt: cursor.Time, ID: cursor.ID}, nil } + +// NewShared creates a codec from the common 256-bit key provisioned to every replica. +func NewShared(encoded string) (*Codec, error) { + key, err := base64.StdEncoding.DecodeString(encoded) + if err != nil || len(key) != cursorSigningKeyBytes { + return nil, fmt.Errorf("CURSOR_SIGNING_KEY must encode exactly 32 bytes as base64") + } + codec := &Codec{} + copy(codec.key[:], key) + return codec, nil +} diff --git a/internal/cursor/codec_test.go b/internal/cursor/codec_test.go index 56832367..441e5305 100644 --- a/internal/cursor/codec_test.go +++ b/internal/cursor/codec_test.go @@ -177,3 +177,36 @@ func encodeFixture(t *testing.T, codec *Codec, resource string) string { } return token } + +// TestSharedCodec verifies a second process can verify the first process's cursor. +func TestSharedCodec(t *testing.T) { + key := base64.StdEncoding.EncodeToString(make([]byte, 32)) + first, err := NewShared(key) + if err != nil { + t.Fatal(err) + } + second, err := NewShared(key) + if err != nil { + t.Fatal(err) + } + position := Position{CreatedAt: time.Now().UTC(), ID: uuid.New()} + encoded, err := first.Encode("chat", position) + if err != nil { + t.Fatal(err) + } + result, err := second.Decode(encoded, "chat") + if err != nil || result != position { + t.Fatalf("cross-replica cursor: %v", err) + } +} + +// TestSharedCodecRejectsInvalidKey requires a full 256-bit decoded secret. +func TestSharedCodecRejectsInvalidKey(t *testing.T) { + for _, key := range []string{"", "broken!", base64.StdEncoding.EncodeToString([]byte("short"))} { + t.Run(key, func(t *testing.T) { + if _, err := NewShared(key); err == nil { + t.Fatal("invalid key accepted") + } + }) + } +} diff --git a/internal/model/dto/models.go b/internal/model/dto/models.go index 78aea0b1..53fa649f 100644 --- a/internal/model/dto/models.go +++ b/internal/model/dto/models.go @@ -33,6 +33,8 @@ type ChatDTO struct { // MessageDTO is an immutable message stored in a chat. type MessageDTO struct { + // IdempotencyKey identifies a validated retry within the sender and chat scope. + IdempotencyKey string // ID is the server-generated message identifier. ID uuid.UUID // ChatID identifies the owning chat. @@ -65,6 +67,8 @@ type ChatsCreateRequestDTO struct { // MessagesCreateRequestDTO carries untrusted message creation input. type MessagesCreateRequestDTO struct { + // IdempotencyKey identifies a validated retry within the sender and chat scope. + IdempotencyKey string // UserID is the authenticated caller identifier, never a supplied sender field. UserID string // ChatID is the raw chat UUID from the route. diff --git a/internal/service/production/creation.go b/internal/service/production/creation.go index 772e7226..0942d6cb 100644 --- a/internal/service/production/creation.go +++ b/internal/service/production/creation.go @@ -37,13 +37,28 @@ func prepareChat(request dto.ChatsCreateRequestDTO, caller uuid.UUID) (dto.ChatD // prepareMessage validates text and creates a record for the authorized sender and chat. func prepareMessage(request dto.MessagesCreateRequestDTO, sender, chatID uuid.UUID) (dto.MessageDTO, error) { - if !validText(request.Text, maxMessageRunes) { + if !validText(request.Text, maxMessageRunes) || !validIdempotencyKey(request.IdempotencyKey) { return dto.MessageDTO{}, service.ErrInvalid } return dto.MessageDTO{ - ID: uuid.New(), - ChatID: chatID, - SenderID: sender, - Text: request.Text, + ID: uuid.New(), + ChatID: chatID, + SenderID: sender, + Text: request.Text, + IdempotencyKey: request.IdempotencyKey, }, nil } + +// validIdempotencyKey accepts only the bounded ASCII alphabet from the contract. +func validIdempotencyKey(key string) bool { + if len(key) < 1 || len(key) > 128 { + return false + } + for _, c := range key { + if c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c == '.' || c == '_' || c == ':' || c == '-' { + continue + } + return false + } + return true +} diff --git a/internal/service/production/messages_test.go b/internal/service/production/messages_test.go index 24eaf706..94f2dd2a 100644 --- a/internal/service/production/messages_test.go +++ b/internal/service/production/messages_test.go @@ -29,7 +29,7 @@ func TestService_MessagesCreate(t *testing.T) { return input, nil } svc := newStubService(t, repo) - input := dto.MessagesCreateRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Text: " Original 👋 "} + input := dto.MessagesCreateRequestDTO{IdempotencyKey: "fixture-key", UserID: actor.String(), ChatID: chat.ID.String(), Text: " Original 👋 "} // Act. got, err := svc.MessagesCreate(t.Context(), input) @@ -53,7 +53,7 @@ func TestService_MessagesCreate(t *testing.T) { chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{uuid.New()}} allowChatAccess(repo, actor, chat) svc := newStubService(t, repo) - input := dto.MessagesCreateRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Text: "Valid text"} + input := dto.MessagesCreateRequestDTO{IdempotencyKey: "fixture-key", UserID: actor.String(), ChatID: chat.ID.String(), Text: "Valid text"} // Act. got, err := svc.MessagesCreate(t.Context(), input) @@ -67,7 +67,7 @@ func TestService_MessagesCreate(t *testing.T) { t.Run("Negative: malformed identity skips storage", func(t *testing.T) { // Arrange. svc := newStubService(t, newStoreStub(t)) - input := dto.MessagesCreateRequestDTO{UserID: "invalid", ChatID: uuid.NewString(), Text: "text"} + input := dto.MessagesCreateRequestDTO{IdempotencyKey: "fixture-key", UserID: "invalid", ChatID: uuid.NewString(), Text: "text"} // Act. got, err := svc.MessagesCreate(t.Context(), input) @@ -97,7 +97,7 @@ func TestService_MessagesCreate_InvalidText(t *testing.T) { chat := dto.ChatDTO{ID: uuid.New(), MemberIDs: []uuid.UUID{actor}} allowChatAccess(repo, actor, chat) svc := newStubService(t, repo) - input := dto.MessagesCreateRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Text: tc.text} + input := dto.MessagesCreateRequestDTO{IdempotencyKey: "fixture-key", UserID: actor.String(), ChatID: chat.ID.String(), Text: tc.text} // Act. got, err := svc.MessagesCreate(t.Context(), input) @@ -133,7 +133,7 @@ func TestService_MessagesCreate_StoreErrors(t *testing.T) { return dto.MessageDTO{}, tc.cause } svc := newStubService(t, repo) - input := dto.MessagesCreateRequestDTO{UserID: actor.String(), ChatID: chat.ID.String(), Text: "Valid text"} + input := dto.MessagesCreateRequestDTO{IdempotencyKey: "fixture-key", UserID: actor.String(), ChatID: chat.ID.String(), Text: "Valid text"} // Act. got, err := svc.MessagesCreate(t.Context(), input) @@ -145,3 +145,25 @@ func TestService_MessagesCreate_StoreErrors(t *testing.T) { }) } } + +// TestIdempotencyKeyValidation checks the exact contract alphabet and length independently. +func TestIdempotencyKeyValidation(t *testing.T) { + for _, test := range []struct { + name string + key string + want bool + }{ + {name: "missing", key: "", want: false}, + {name: "allowed alphabet", key: "aZ09._:-", want: true}, + {name: "space", key: "a b", want: false}, + {name: "unicode", key: "ключ", want: false}, + {name: "maximum", key: strings.Repeat("a", 128), want: true}, + {name: "too long", key: strings.Repeat("a", 129), want: false}, + } { + t.Run(test.name, func(t *testing.T) { + if got := validIdempotencyKey(test.key); got != test.want { + t.Fatalf("valid=%v want=%v", got, test.want) + } + }) + } +} diff --git a/internal/store/postgres/idempotency.go b/internal/store/postgres/idempotency.go new file mode 100644 index 00000000..eb2b2e5a --- /dev/null +++ b/internal/store/postgres/idempotency.go @@ -0,0 +1,51 @@ +package postgres + +import ( + "context" + "errors" + + "github.com/jackc/pgx/v5" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// replayMessage serializes one chat and returns an unexpired original response. +func replayMessage(ctx context.Context, tx pgx.Tx, message dto.MessageDTO) (dto.MessageDTO, bool, error) { + var locked string + if err := tx.QueryRow(ctx, "SELECT id FROM chats WHERE id=@chat FOR UPDATE", pgx.StrictNamedArgs{"chat": message.ChatID}).Scan(&locked); err != nil { + return dto.MessageDTO{}, false, err + } + if message.IdempotencyKey == "" { + return dto.MessageDTO{}, false, nil + } + args := pgx.StrictNamedArgs{"user": message.SenderID, "chat": message.ChatID, "key": message.IdempotencyKey} + if _, err := tx.Exec(ctx, `DELETE FROM message_idempotency WHERE user_id=@user AND chat_id=@chat AND key=@key AND expires_at<=clock_timestamp()`, args); err != nil { + return dto.MessageDTO{}, false, err + } + var original dto.MessageDTO + err := tx.QueryRow(ctx, `SELECT m.id,m.chat_id,m.sender_id,m.text,m.created_at FROM message_idempotency i JOIN messages m ON m.id=i.message_id + WHERE i.user_id=@user AND i.chat_id=@chat AND i.key=@key`, args).Scan(&original.ID, &original.ChatID, &original.SenderID, &original.Text, &original.CreatedAt) + if errors.Is(err, pgx.ErrNoRows) { + return dto.MessageDTO{}, false, nil + } + if err != nil { + return dto.MessageDTO{}, false, err + } + if original.Text != message.Text { + return dto.MessageDTO{}, false, store.ErrConflict + } + return original, true, nil +} + +// rememberMessage stores the result in the same transaction as the message insert. +func rememberMessage(ctx context.Context, tx pgx.Tx, message dto.MessageDTO) error { + if message.IdempotencyKey == "" { + return nil + } + _, err := tx.Exec(ctx, `INSERT INTO message_idempotency(user_id,chat_id,key,message_id,expires_at) + VALUES(@user,@chat,@key,@id,clock_timestamp()+interval '24 hours')`, pgx.StrictNamedArgs{ + "user": message.SenderID, "chat": message.ChatID, "key": message.IdempotencyKey, "id": message.ID, + }) + return err +} diff --git a/internal/store/postgres/idempotency_test.go b/internal/store/postgres/idempotency_test.go new file mode 100644 index 00000000..66871664 --- /dev/null +++ b/internal/store/postgres/idempotency_test.go @@ -0,0 +1,139 @@ +package postgres + +import ( + "errors" + "sync" + "testing" + + "github.com/google/uuid" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto" + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store" +) + +// TestMessageRetryRace verifies concurrent attempts commit exactly one message and replay its response. +func TestMessageRetryRace(t *testing.T) { + s := testStore(t) + user := fixtureUser(t, s) + chat := fixtureChat(t, s, user) + var wg sync.WaitGroup + outcomes := make(chan dto.MessageDTO, 12) + failures := make(chan error, 12) + for range 12 { + wg.Go(func() { + message, err := s.CreateMessage(t.Context(), dto.MessageDTO{ID: uuid.New(), ChatID: chat.ID, SenderID: user.ID, Text: "same", IdempotencyKey: "retry"}) + if err != nil { + failures <- err + return + } + outcomes <- message + }) + } + wg.Wait() + close(failures) + close(outcomes) + for err := range failures { + t.Error(err) + } + var original dto.MessageDTO + for m := range outcomes { + if original.ID == uuid.Nil { + original = m + } + if m.ID != original.ID || m.Text != original.Text || !m.CreatedAt.Equal(original.CreatedAt) { + t.Fatal("retry returned a different result") + } + } + messages, err := s.Messages(t.Context(), chat.ID, dto.PositionDTO{}, 100) + if err != nil || len(messages) != 1 { + t.Fatalf("messages=%d error=%v", len(messages), err) + } +} + +// TestMessageRetryConflict rejects a different body without publishing a second message. +func TestMessageRetryConflict(t *testing.T) { + s := testStore(t) + user := fixtureUser(t, s) + chat := fixtureChat(t, s, user) + message := dto.MessageDTO{ID: uuid.New(), ChatID: chat.ID, SenderID: user.ID, Text: "first", IdempotencyKey: "retry"} + if _, err := s.CreateMessage(t.Context(), message); err != nil { + t.Fatal(err) + } + message.ID = uuid.New() + message.Text = "different" + if _, err := s.CreateMessage(t.Context(), message); !errors.Is(err, store.ErrConflict) { + t.Fatalf("expected conflict: %v", err) + } +} + +// TestMessageRetryExpiry permits reuse after the original retention window ends. +func TestMessageRetryExpiry(t *testing.T) { + s := testStore(t) + user := fixtureUser(t, s) + chat := fixtureChat(t, s, user) + message := dto.MessageDTO{ID: uuid.New(), ChatID: chat.ID, SenderID: user.ID, Text: "first", IdempotencyKey: "retry"} + if _, err := s.CreateMessage(t.Context(), message); err != nil { + t.Fatal(err) + } + if _, err := s.pool.Exec(t.Context(), "UPDATE message_idempotency SET expires_at=clock_timestamp()-interval '1 second'"); err != nil { + t.Fatal(err) + } + message.ID = uuid.New() + message.Text = "new" + if result, err := s.CreateMessage(t.Context(), message); err != nil || result.ID != message.ID { + t.Fatalf("expired result reused: %v", err) + } +} + +// TestMessageRetryRollback proves failed inserts leave no poisoned idempotency result. +func TestMessageRetryRollback(t *testing.T) { + s := testStore(t) + user := fixtureUser(t, s) + chat := fixtureChat(t, s, user) + message := dto.MessageDTO{ID: uuid.New(), ChatID: chat.ID, SenderID: uuid.New(), Text: "first", IdempotencyKey: "retry"} + if _, err := s.CreateMessage(t.Context(), message); err == nil { + t.Fatal("missing sender accepted") + } + var count int + if err := s.pool.QueryRow(t.Context(), "SELECT count(*) FROM message_idempotency").Scan(&count); err != nil || count != 0 { + t.Fatalf("failed write stored a result: %d %v", count, err) + } + message.SenderID = user.ID + if _, err := s.CreateMessage(t.Context(), message); err != nil { + t.Fatal(err) + } +} + +// TestSchemaCheck verifies API schema checks neither create nor upgrade tables. +func TestSchemaCheck(t *testing.T) { + s := testStore(t) + if err := s.CheckSchema(t.Context()); err != nil { + t.Fatal(err) + } + if _, err := s.pool.Exec(t.Context(), "DELETE FROM schema_migrations WHERE version=2"); err != nil { + t.Fatal(err) + } + if err := s.CheckSchema(t.Context()); err == nil { + t.Fatal("outdated schema accepted") + } + s.Close() + if err := s.CheckSchema(t.Context()); err == nil { + t.Fatal("closed connection accepted") + } +} + +// TestIdempotencyMigrationFailureRollsBackVersion keeps an unsuccessful DDL change out of migration history. +func TestIdempotencyMigrationFailureRollsBackVersion(t *testing.T) { + s := testStore(t) + if _, err := s.pool.Exec(t.Context(), "DELETE FROM schema_migrations WHERE version=2"); err != nil { + t.Fatal(err) + } + // The existing table deliberately conflicts with the pending migration. + if err := s.Start(t.Context()); err == nil { + t.Fatal("conflicting DDL reported success") + } + var applied bool + if err := s.pool.QueryRow(t.Context(), "SELECT EXISTS(SELECT 1 FROM schema_migrations WHERE version=2)").Scan(&applied); err != nil || applied { + t.Fatalf("failed migration marked applied: %v", err) + } +} diff --git a/internal/store/postgres/messages.go b/internal/store/postgres/messages.go index 1b7ba212..88e03187 100644 --- a/internal/store/postgres/messages.go +++ b/internal/store/postgres/messages.go @@ -14,14 +14,25 @@ func (s *Store) CreateMessage(ctx context.Context, message dto.MessageDTO) (dto. ctx, cancel := context.WithTimeout(ctx, s.timeout) defer cancel() err := pgx.BeginFunc(ctx, s.pool, func(tx pgx.Tx) error { + original, found, err := replayMessage(ctx, tx, message) + if err != nil { + return err + } + if found { + message = original + return nil + } if err := tx.QueryRow(ctx, `UPDATE chats SET last_message_at=GREATEST(clock_timestamp(),last_message_at+interval '1 microsecond') WHERE id=@chat RETURNING last_message_at`, pgx.StrictNamedArgs{"chat": message.ChatID}).Scan(&message.CreatedAt); err != nil { return err } - _, err := tx.Exec(ctx, `INSERT INTO messages(id,chat_id,sender_id,text,created_at) VALUES(@id,@chat,@sender,@text,@time)`, pgx.StrictNamedArgs{ + _, err = tx.Exec(ctx, `INSERT INTO messages(id,chat_id,sender_id,text,created_at) VALUES(@id,@chat,@sender,@text,@time)`, pgx.StrictNamedArgs{ "id": message.ID, "chat": message.ChatID, "sender": message.SenderID, "text": message.Text, "time": message.CreatedAt, }) - return err + if err != nil { + return err + } + return rememberMessage(ctx, tx, message) }) return message, normalize(err) } diff --git a/internal/store/postgres/migrations/002_idempotency.sql b/internal/store/postgres/migrations/002_idempotency.sql new file mode 100644 index 00000000..d34a519b --- /dev/null +++ b/internal/store/postgres/migrations/002_idempotency.sql @@ -0,0 +1,9 @@ +CREATE TABLE message_idempotency ( + user_id uuid NOT NULL REFERENCES users(id), + chat_id uuid NOT NULL REFERENCES chats(id), + key text NOT NULL, + message_id uuid NOT NULL REFERENCES messages(id), + expires_at timestamptz NOT NULL, + PRIMARY KEY (user_id,chat_id,key) +); +CREATE INDEX message_idempotency_expiry ON message_idempotency(expires_at); diff --git a/internal/store/postgres/store.go b/internal/store/postgres/store.go index 12968062..2db2ae15 100644 --- a/internal/store/postgres/store.go +++ b/internal/store/postgres/store.go @@ -22,6 +22,9 @@ import ( //go:embed migrations/001_initial.sql var initialMigration string +//go:embed migrations/002_idempotency.sql +var idempotencyMigration string + const migrationLockID = 202602 // Options bounds database resource use. @@ -79,14 +82,24 @@ func (s *Store) Start(ctx context.Context) error { if err := tx.QueryRow(ctx, "SELECT EXISTS(SELECT 1 FROM schema_migrations WHERE version=1)").Scan(&exists); err != nil { return err } + if !exists { + if _, err := tx.Exec(ctx, initialMigration); err != nil { + return err + } + if _, err := tx.Exec(ctx, "INSERT INTO schema_migrations(version) VALUES(1)"); err != nil { + return err + } + } + if err := tx.QueryRow(ctx, "SELECT EXISTS(SELECT 1 FROM schema_migrations WHERE version=2)").Scan(&exists); err != nil { + return err + } if exists { return nil } - - if _, err := tx.Exec(ctx, initialMigration); err != nil { + if _, err := tx.Exec(ctx, idempotencyMigration); err != nil { return err } - _, err := tx.Exec(ctx, "INSERT INTO schema_migrations(version) VALUES(1)") + _, err := tx.Exec(ctx, "INSERT INTO schema_migrations(version) VALUES(2)") return err }) } @@ -125,3 +138,17 @@ func normalize(err error) error { } return err } + +// CheckSchema verifies readiness without allowing API replicas to run DDL. +func (s *Store) CheckSchema(ctx context.Context) error { + ctx, cancel := context.WithTimeout(ctx, s.timeout) + defer cancel() + var version int + if err := s.pool.QueryRow(ctx, "SELECT COALESCE(max(version),0) FROM schema_migrations").Scan(&version); err != nil { + return err + } + if version != 2 { + return fmt.Errorf("database schema version %d; run server migrate", version) + } + return nil +} diff --git a/scripts/coverage.sh b/scripts/coverage.sh index 56210675..cfc5cb9f 100755 --- a/scripts/coverage.sh +++ b/scripts/coverage.sh @@ -7,6 +7,7 @@ GO=${GO:-go} : "${TEST_DATABASE_URL:?Use an isolated test database}" "${TEST_VALKEY_ADDRESS:?Use a test shard}" export APP_PORT=${COVERAGE_PORT:-18080} export LOG_LEVEL=error +export CURSOR_SIGNING_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= server_pid= watchdog_pid= mkdir -p coverage @@ -22,6 +23,7 @@ trap 'exit 130' INT trap 'exit 143' TERM mkdir "$run_dir/process" "$GO" build -race -cover -covermode=atomic -coverpkg=./... -o "$run_dir/server" ./cmd/server +"$run_dir/server" migrate "$GO" test -race -coverpkg=./... -coverprofile="$run_dir/unit.out" ./... export GOCOVERDIR="$run_dir/process" if "$run_dir/server" unknown >"$run_dir/server-invalid.log" 2>&1; then @@ -40,6 +42,7 @@ for attempt in $(seq 1 60); do done $ready || { cat "$run_dir/server.log"; exit 1; } "$run_dir/server" healthcheck +"$run_dir/server" migrate "${PYTHON:-python3}" tests/smoke.py --base-url "http://localhost:$APP_PORT" kill -TERM "$server_pid" # Bound the real-process shutdown check; a forced kill makes wait fail. diff --git a/scripts/experiment.sh b/scripts/experiment.sh index 31554c23..f75e1f75 100755 --- a/scripts/experiment.sh +++ b/scripts/experiment.sh @@ -2,7 +2,7 @@ # Compare controlled replica/resource budgets, then restore the normal HPA configuration. set -eu cd "$(dirname "$0")/.." -: "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" "${RELEASE:=lab3}" +: "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" "${RELEASE:=lab2}" : "${DURATION:=30}" "${VUS:=32}" run_id=$(date -u +%Y%m%d%H%M%S) export KUBE_CONTEXT NAMESPACE DURATION VUS diff --git a/scripts/init-secrets.sh b/scripts/init-secrets.sh index af9529b1..2fa990a2 100755 --- a/scripts/init-secrets.sh +++ b/scripts/init-secrets.sh @@ -12,8 +12,16 @@ kubectl --context "$KUBE_CONTEXT" create namespace "$NAMESPACE" --dry-run=client if ! kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get secret messenger-secrets >/dev/null 2>&1; then openssl rand -hex 32 | tr -d '\n' > "$work/postgres-password" printf 'postgres://messenger:%s@postgres:5432/messenger?sslmode=disable' "$(cat "$work/postgres-password")" > "$work/database-url" - kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" create secret generic messenger-secrets --from-file="$work/postgres-password" --from-file="$work/database-url" + openssl rand -base64 32 | tr -d '\n' > "$work/cursor-key" + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" create secret generic messenger-secrets --from-file="$work/postgres-password" --from-file="$work/database-url" --from-file="$work/cursor-key" fi +# Add the shared cursor key to an existing lab2 secret without replacing database credentials. +if ! kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get secret messenger-secrets -o json | jq -e '.data["cursor-key"] | length > 0' >/dev/null; then + openssl rand -base64 32 | tr -d '\n' > "$work/cursor-key" + jq -n --rawfile key "$work/cursor-key" '{stringData:{"cursor-key":$key}}' > "$work/patch.json" + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" patch secret messenger-secrets --type merge --patch-file "$work/patch.json" +fi +# Build a portable Docker config; macOS credential-helper references cannot be used by kubelet. jq -n --arg registry "$REGISTRY" --arg user "$REGISTRY_USER" --rawfile token "$REGISTRY_TOKEN_FILE" \ '{auths:{($registry):{auth:(($user+":"+($token | sub("[\\r\\n]+$"; "")))|@base64)}}}' > "$work/config.json" kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" create secret generic registry-pull \ diff --git a/scripts/port-forward.sh b/scripts/port-forward.sh index 84dfa080..e8d7d132 100755 --- a/scripts/port-forward.sh +++ b/scripts/port-forward.sh @@ -2,7 +2,7 @@ # Reconnect the loopback tunnel after the API pod is replaced during restart tests. set -eu : "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" -LOCAL_PORT=${LOCAL_PORT:-8080} +LOCAL_PORT=${LOCAL_PORT:-8083} child= cleanup() { if [ -n "$child" ]; then @@ -13,7 +13,7 @@ cleanup() { } trap cleanup INT TERM while :; do - kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" port-forward service/api "$LOCAL_PORT:8080" --address 127.0.0.1 & + kubectl --context "$KUBE_CONTEXT" -n traefik port-forward service/traefik "$LOCAL_PORT:80" --address 127.0.0.1 & child=$! wait "$child" || true child= diff --git a/scripts/restart.sh b/scripts/restart.sh index 6a56d3da..5b5a9a3b 100755 --- a/scripts/restart.sh +++ b/scripts/restart.sh @@ -3,6 +3,8 @@ set -eu : "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" replicas=$(kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get deployment api -o jsonpath='{.spec.replicas}') +mkdir -p evidence +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pods -l 'app in (api,postgres,valkey)' -o custom-columns=NAME:.metadata.name,UID:.metadata.uid > evidence/restart-before.txt kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" scale deployment/api --replicas=0 kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" wait --for=delete pod -l app=api --timeout=60s kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" rollout restart statefulset/postgres statefulset/valkey @@ -10,3 +12,4 @@ kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" rollout status statefulset/pos kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" rollout status statefulset/valkey --timeout=120s kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" scale deployment/api --replicas="$replicas" kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" rollout status deployment/api --timeout=120s +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pods -l 'app in (api,postgres,valkey)' -o custom-columns=NAME:.metadata.name,UID:.metadata.uid > evidence/restart-after.txt diff --git a/scripts/run-load.sh b/scripts/run-load.sh index 49286023..4ed3caaf 100755 --- a/scripts/run-load.sh +++ b/scripts/run-load.sh @@ -13,26 +13,26 @@ cleanup() { rm -f "$manifest" } trap cleanup EXIT -kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" create configmap lab3-load-scripts --from-file=student-tests/load/ --dry-run=client -o yaml | kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" apply -f - -helm template lab3 charts/messenger -n "$NAMESPACE" -s templates/load.yaml --set load.enabled=true --set-string "load.run=$RUN" --set-string "load.script=$LOAD_SCRIPT" --set "load.duration=$DURATION" --set "load.vus=$VUS" > "$manifest" +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" create configmap load-scripts --from-file=student-tests/load/ --dry-run=client -o yaml | kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" apply -f - +helm template lab2 charts/messenger -n "$NAMESPACE" -s templates/load.yaml --set load.enabled=true --set-string "load.run=$RUN" --set-string "load.script=$LOAD_SCRIPT" --set "load.duration=$DURATION" --set "load.vus=$VUS" > "$manifest" kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" apply -f "$manifest" ( while :; do date -u '+UTC %Y-%m-%dT%H:%M:%SZ' - kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" top pods -l 'app in (lab3-api,lab3-lb,lab3-postgres,lab3-valkey,lab3-load)' || true - kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" exec lab3-postgres-0 -- psql -U messenger -d messenger -Atc "SELECT state,wait_event_type,wait_event,count(*) FROM pg_stat_activity WHERE datname='messenger' GROUP BY state,wait_event_type,wait_event" || true + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" top pods -l 'app in (api,lb,postgres,valkey,load)' || true + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" exec postgres-0 -- psql -U messenger -d messenger -Atc "SELECT state,wait_event_type,wait_event,count(*) FROM pg_stat_activity WHERE datname='messenger' GROUP BY state,wait_event_type,wait_event" || true sleep 5 done ) > "evidence/resources-$RUN.txt" 2>&1 & sampler=$! complete=false for attempt in $(seq 1 140); do - state=$(kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get "job/lab3-load-$RUN" -o json) + state=$(kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get "job/load-$RUN" -o json) if printf '%s' "$state" | jq -e '.status.succeeded > 0' >/dev/null; then complete=true; break; fi if printf '%s' "$state" | jq -e '.status.failed > 0' >/dev/null; then break; fi sleep 2 done -kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" logs "job/lab3-load-$RUN" > "evidence/load-$RUN.txt" +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" logs "job/load-$RUN" > "evidence/load-$RUN.txt" $complete || { echo "Load failed; inspect evidence/load-$RUN.txt" >&2; exit 1; } if [ "$LOAD_SCRIPT" = scaling.js ]; then jq -R 'fromjson? | select(has("profile"))' "evidence/load-$RUN.txt" > "evidence/load-$RUN.json" diff --git a/scripts/scale-shards.sh b/scripts/scale-shards.sh index 8cdbbe8c..7e62c1dc 100755 --- a/scripts/scale-shards.sh +++ b/scripts/scale-shards.sh @@ -6,12 +6,12 @@ cd "$(dirname "$0")/.." : "${SHARDS:?Set SHARDS=2 or SHARDS=3}" case "$SHARDS" in 2|3) ;; *) echo 'SHARDS must be 2 or 3' >&2; exit 2 ;; esac # Keep the desired replica count explicit so an interrupted run can resume from zero. -: "${API_REPLICAS:=1}" -helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set api.replicas=0 --wait --timeout 180s +: "${API_REPLICAS:=2}" +helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set autoscaling.enabled=false --set api.replicas=0 --wait --timeout 180s kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" wait --for=delete pod -l app=api --timeout=60s # Maximum lease is 30 seconds; the rate window is one second. sleep 31 -helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set api.replicas=0 --set "valkey.shards=$SHARDS" --wait --timeout 180s +helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set autoscaling.enabled=false --set api.replicas=0 --set "valkey.shards=$SHARDS" --wait --timeout 180s kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" exec valkey-0 -- valkey-cli DEL admission:topology -helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set "api.replicas=$API_REPLICAS" --wait --timeout 180s +helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set autoscaling.enabled=true --set "api.replicas=$API_REPLICAS" --wait --timeout 180s printf 'Ring updated. Set valkey.shards=%s in your values file before the next make deploy.\n' "$SHARDS" diff --git a/scripts/stop-one.sh b/scripts/stop-one.sh index adfe8665..b06f8230 100755 --- a/scripts/stop-one.sh +++ b/scripts/stop-one.sh @@ -2,9 +2,9 @@ # Terminate the exact observed API pod; its replacement receives a different instance ID. set -eu : "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" "${TARGET_INSTANCE_ID:?Expected API pod name}" -case "$TARGET_INSTANCE_ID" in lab3-api-*) ;; *) echo 'Target is not a lab3 API pod' >&2; exit 2 ;; esac +case "$TARGET_INSTANCE_ID" in api-*) ;; *) echo 'Target is not a lab3 API pod' >&2; exit 2 ;; esac label=$(kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pod "$TARGET_INSTANCE_ID" -o jsonpath='{.metadata.labels.app}') -test "$label" = lab3-api +test "$label" = api mkdir -p evidence printf '%s target=%s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$TARGET_INSTANCE_ID" >> evidence/failover-targets.txt kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" delete pod "$TARGET_INSTANCE_ID" --wait=false diff --git a/scripts/test-faults.sh b/scripts/test-faults.sh index b80a7e0c..868cf1d5 100755 --- a/scripts/test-faults.sh +++ b/scripts/test-faults.sh @@ -4,7 +4,7 @@ set -eu cd "$(dirname "$0")/.." umask 077 work=$(mktemp -d) -name="lab2-fault-$(basename "$work" | tr '[:upper:].' '[:lower:]-')" +name="lab3-fault-$(basename "$work" | tr '[:upper:].' '[:lower:]-')" containers= cleanup() { for container in $containers; do @@ -32,10 +32,11 @@ for attempt in $(seq 1 60); do if docker exec "$pg" pg_isready -U postgres >/dev/null 2>&1; then break; fi sleep 1 done +docker run --rm --network "$name" -e DATABASE_URL=postgres://postgres:synthetic-fault-password@postgres:5432/messenger?sslmode=disable -e VALKEY_SHARDS=shard0=valkey:6379 -e CURSOR_SIGNING_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= "$name" migrate api=$(docker run -d --network "$name" -p 127.0.0.1::8080 \ -e DATABASE_URL=postgres://postgres:synthetic-fault-password@postgres:5432/messenger?sslmode=disable \ -e VALKEY_SHARDS=shard0=valkey:6379 -e VALKEY_COORDINATOR=shard0 \ - -e DEPENDENCY_TIMEOUT_MS=500 -e LOG_LEVEL=error "$name") + -e CURSOR_SIGNING_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= -e DEPENDENCY_TIMEOUT_MS=500 -e LOG_LEVEL=error "$name") containers="$containers $api" base="http://$(docker port "$api" 8080/tcp)" : > "$work/anonymous" @@ -80,7 +81,7 @@ printf 'header = "Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA request POST /api/v1/chats 201 bearer --data "{\"title\":\"Synthetic fault chat\",\"member_ids\":[\"$user\"]}" chat=$(jq -er .id "$work/response") history="/api/v1/chats/$chat/messages" -request POST "$history" 201 bearer --data '{"text":"confirmed before outage"}' +request POST "$history" 201 bearer -H "Idempotency-Key: fault-message" --data '{"text":"confirmed before outage"}' cp "$work/response" "$work/message" request GET "$history" 200 bearer for dependency in "$pg" "$cache"; do diff --git a/student-tests/README.md b/student-tests/README.md index a477fa34..cb58150b 100644 --- a/student-tests/README.md +++ b/student-tests/README.md @@ -1,13 +1,7 @@ -# Собственные проверки +# Проверки лабораторной 3 -Go-тесты расположены рядом с кодом. `quality_test.go` проверяет документацию объявлений и направление импортов. PostgreSQL-тесты используют реальные запросы и изолированные схемы; Valkey-тесты проверяют атомарные бюджеты, группы, cache hit/miss и topology mismatch. +Go-тесты рядом с кодом проверяют контракт, авторизацию, идемпотентность, SQL-транзакции, shared cursor, admission, lifecycle и метрики. PostgreSQL/Valkey integration требуют изолированных зависимостей; `make coverage` запускает race и настоящий процесс и проверяет 90% statements каждого исполняемого файла. -Для unit tests: `make test-student`. Для всех интеграционных проверок задать переменные из [REPORT](../REPORT.md). `make coverage` запускает race detector и настоящий инструментированный процесс, проверяет публичный HTTP smoke и SIGTERM, затем применяет порог ≥90% statements отдельно к каждому Go-файлу. +`load/scaling.js` — одинаковый профиль k6 для сравнения реплик: 16 пользователей/чатов, 32 VU, запись + чтение, каждый десятый повтор возвращает прежний результат. Публикуются реальные success/error/latency metrics; bootstrap не содержит пользовательских данных. `load/idempotency.js` проверяет общий ключ через разные API, ровно одно сообщение и конфликт body. `load/hpa.js` нагружает Argon2id для проверки реальной реакции HPA по CPU. Все пользователи синтетические, токены не выводятся. -Тестовые controller fixtures заменяют только Authentication/Admission/Readiness: fixture Bearer равен UUID для изоляции бизнес-сценариев. Production Authentication всегда использует случайный токен и PostgreSQL; это отдельно проверяют unit tests authentication и настоящие HTTP smoke/expiry/persistence. Fixture токены не являются доступным режимом приложения. - -`make research` запускает SQL из `research.sql` и `plans.sql` в новом временном контейнере, с ограничениями 1 CPU и 512 MiB. Исследуемые запросы находятся непосредственно в SQL, shell отвечает только за запуск PostgreSQL и dump/restore. - -`make test-faults` — воспроизводимый HTTP-сценарий реальных отказов PostgreSQL и Valkey. Нужны Docker, curl, jq, rg, OpenSSL и shasum. Скрипт собирает текущий код в локальный образ, создаёт отдельную Docker-сеть и временные контейнеры. Каждый backend по очереди останавливается и приостанавливается (`stop`/`pause`). Проверяются 503/unavailable с действительным токеном, ограничение ожидания 3 секундами при timeout зависимости 500 мс, readiness=503, liveness=200, отсутствие доступа без токена, по X-User-Id, с повреждённым и неизвестным Bearer. После каждого восстановления прежняя сессия читает подтверждённое сообщение без повторного входа. Секреты находятся только во временных файлах; вывод не содержит токенов или тел сообщений. Ресурсы удаляются через trap, dev-кластер не используется. - -Свежий результат: [fault-regression.txt](../evidence/fault-regression.txt). Старые проверки в [dependencies.json](../evidence/dependencies.json) остаются историческими измерениями; текущий сценарий не зависит от удалённой Python-обвязки. TTL отдельно проверяется Go-тестами. +`make research` сравнивает 1/2/4 реплики при фиксированном суммарном бюджете 1 CPU/512 MiB, затем при фиксированном бюджете одной реплики 250m/128 MiB. Во время измерений HPA выключен. Raw k6 summary и выборки CPU/RAM/PG wait events сохраняются в evidence. После эксперимента обычные Helm values восстанавливаются. diff --git a/student-tests/load/hpa.js b/student-tests/load/hpa.js new file mode 100644 index 00000000..97c915ce --- /dev/null +++ b/student-tests/load/hpa.js @@ -0,0 +1,18 @@ +import http from 'k6/http'; +import encoding from 'k6/encoding'; +import { check, sleep } from 'k6'; +export const options = { vus: 2, duration: '90s', thresholds: { checks: ['rate>0.95'] } }; +const base = __ENV.BASE_URL || 'https://hl.agapov.space'; +export function setup() { + const username = `hpa_${Date.now()}`; + const password = 'synthetic-autoscaling-password'; + const response = http.post(`${base}/api/v1/users`, JSON.stringify({ username, display_name: 'HPA CPU test', password }), { headers: { 'Content-Type': 'application/json' } }); + if (response.status !== 201) throw new Error(`registration: ${response.status}`); + return { authorization: `Basic ${encoding.b64encode(`${username}:${password}`)}` }; +} +export default function (data) { + const response = http.post(`${base}/api/v1/auth/sessions`, null, { headers: { Authorization: data.authorization } }); + check(response, { 'authenticated login': r => r.status === 201 }); + // Keep one account below its 20 requests/s auth budget. + sleep(0.1); +} diff --git a/student-tests/load/idempotency.js b/student-tests/load/idempotency.js new file mode 100644 index 00000000..6097e4c3 --- /dev/null +++ b/student-tests/load/idempotency.js @@ -0,0 +1,34 @@ +import http from 'k6/http'; +import encoding from 'k6/encoding'; +import { check, sleep } from 'k6'; +export const options = { vus: 8, iterations: 32, thresholds: { checks: ['rate==1'] } }; +const base = __ENV.BASE_URL || 'https://hl.agapov.space'; +export function setup() { + const username = `idem_${Date.now()}`; + const password = 'synthetic-idempotency-password'; + const registered = http.post(`${base}/api/v1/users`, JSON.stringify({ username, display_name: 'Idempotency', password }), { headers: { 'Content-Type': 'application/json' } }); + if (registered.status !== 201) throw new Error(`registration ${registered.status}`); + const session = http.post(`${base}/api/v1/auth/sessions`, null, { headers: { Authorization: `Basic ${encoding.b64encode(`${username}:${password}`)}` } }); + if (session.status !== 201) throw new Error(`login ${session.status}`); + const headers = { Authorization: `Bearer ${session.json().token}`, 'Content-Type': 'application/json', 'Idempotency-Key': 'shared-key' }; + const chat = http.post(`${base}/api/v1/chats`, JSON.stringify({ title: 'Retry race', member_ids: [registered.json().id] }), { headers }); + if (chat.status !== 201) throw new Error(`chat ${chat.status}`); + return { headers, path: `${base}/api/v1/chats/${chat.json().id}/messages` }; +} +export default function (data) { + // Eight writers share four user slots. Retry admission failures with the same key/body. + let response; + for (let attempt = 0; attempt < 20; attempt++) { + response = http.post(data.path, JSON.stringify({ text: 'one logical message' }), { headers: data.headers }); + if (response.status !== 503 && response.status !== 429) break; + sleep(0.1); + } + check(response, { 'concurrent retry succeeds': r => r.status === 201 }); + console.log(`instance=${response.headers['X-Instance-Id']}, status=${response.status}`); +} +export function teardown(data) { + const history = http.get(`${data.path}?limit=100`, { headers: data.headers }); + check(history, { 'exactly one stored message': r => r.status === 200 && r.json().items.length === 1 }); + const conflict = http.post(data.path, JSON.stringify({ text: 'different message' }), { headers: data.headers }); + check(conflict, { 'different body conflicts': r => r.status === 409 }); +} diff --git a/student-tests/load/scaling.js b/student-tests/load/scaling.js new file mode 100644 index 00000000..d0f4bcbf --- /dev/null +++ b/student-tests/load/scaling.js @@ -0,0 +1,62 @@ +import http from 'k6/http'; +import encoding from 'k6/encoding'; +import execution from 'k6/execution'; +import { check } from 'k6'; +import { Counter, Trend } from 'k6/metrics'; + +const base = __ENV.BASE_URL || 'https://hl.agapov.space'; +const seconds = Number(__ENV.DURATION || 30); +const users = Number(__ENV.USERS || 16); +const writes = new Counter('confirmed_messages'); +const attempts = new Counter('attempted_messages'); +const failures = new Counter('application_errors'); +const latency = new Trend('message_latency_ms', true); +export const options = { + scenarios: { + warmup: { executor: 'constant-vus', vus: 4, duration: '5s' }, + measured: { executor: 'constant-vus', vus: Number(__ENV.VUS || 32), duration: `${seconds}s`, startTime: '5s' }, + }, + setupTimeout: '120s', + summaryTrendStats: ['avg', 'p(50)', 'p(95)', 'p(99)', 'max'], +}; + +export function setup() { + const actors = []; + const prefix = `bench_${Date.now()}`; + for (let i = 0; i < users; i++) { + const username = `${prefix}_${i}`; + const password = 'synthetic-benchmark-password'; + let response = http.post(`${base}/api/v1/users`, JSON.stringify({ username, display_name: 'Synthetic', password }), { headers: { 'Content-Type': 'application/json' }, tags: { phase: 'setup' } }); + if (response.status !== 201) throw new Error(`registration: ${response.status}`); + const user = response.json(); + response = http.post(`${base}/api/v1/auth/sessions`, null, { headers: { Authorization: `Basic ${encoding.b64encode(`${username}:${password}`)}` }, tags: { phase: 'setup' } }); + if (response.status !== 201) throw new Error(`login: ${response.status}`); + const token = response.json().token; + response = http.post(`${base}/api/v1/chats`, JSON.stringify({ title: 'Synthetic benchmark', member_ids: [user.id] }), { headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' }, tags: { phase: 'setup' } }); + if (response.status !== 201) throw new Error(`chat: ${response.status}`); + actors.push({ token, chat: response.json().id }); + } + return actors; +} + +export default function (actors) { + const measured = execution.scenario.name === 'measured'; + const actor = actors[(__VU - 1) % actors.length]; + const headers = { Authorization: `Bearer ${actor.token}`, 'Content-Type': 'application/json', 'Idempotency-Key': `${execution.scenario.name}:${__VU}:${__ITER}` }; + const path = `${base}/api/v1/chats/${actor.chat}/messages`; + const payload = JSON.stringify({ text: `synthetic message ${__VU}:${__ITER}` }); + const response = http.post(path, payload, { headers, tags: { phase: 'load' } }); + if (measured) { latency.add(response.timings.duration); attempts.add(1); } + if (check(response, { 'message confirmed': r => r.status === 201 })) { if (measured) writes.add(1); } + else if (measured) failures.add(1, { status: String(response.status) }); + if (response.status === 201 && __ITER % 10 === 0) { + const repeated = http.post(path, payload, { headers, tags: { phase: 'load' } }); + if (!check(repeated, { 'retry returns original': r => r.status === 201 && r.json().id === response.json().id })) { if (measured) failures.add(1, { status: String(repeated.status) }); } + } + const read = http.get(`${path}?limit=10`, { headers, tags: { phase: 'load' } }); + if (!check(read, { 'history readable': r => r.status === 200 })) { if (measured) failures.add(1, { status: String(read.status) }); } +} + +export function handleSummary(data) { + return { stdout: JSON.stringify({ profile: { vus: Number(__ENV.VUS || 32), seconds, warmup_seconds: 5, users }, summary: data }) + '\n' }; +} -- 2.54.0 From 7b7e23fd029beea47e6f625a96cb98d2fe04bafb Mon Sep 17 00:00:00 2001 From: Vladislav Agapov Date: Fri, 16 Oct 2026 11:51:57 +0300 Subject: [PATCH 3/4] =?UTF-8?q?=D0=97=D0=B0=D1=84=D0=B8=D0=BA=D1=81=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20rolling=20update=20?= =?UTF-8?q?=D0=B8=20=D0=BE=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B8=D1=81=D1=81=D0=BB=D0=B5=D0=B4=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- REPORT.md | 2 + docs/PLAN.md | 1 + evidence/load-rolling-20261016.json | 325 ++++++++++++++++++++++++ evidence/load-rolling-20261016.txt | 1 + evidence/resources-rolling-20261016.txt | 63 +++++ evidence/shared-state.txt | 26 +- 6 files changed, 405 insertions(+), 13 deletions(-) create mode 100644 evidence/load-rolling-20261016.json create mode 100644 evidence/load-rolling-20261016.txt create mode 100644 evidence/resources-rolling-20261016.txt diff --git a/REPORT.md b/REPORT.md index f6c202a5..5786df16 100644 --- a/REPORT.md +++ b/REPORT.md @@ -51,3 +51,5 @@ make coverage выполняется с изолированными PostgreSQL/ Свежий прогон 16.10.2026: Go test/vet/lint прошли; race/integration/coverage — 59 файлов, минимум 90%. Публичный HTTPS smoke прошёл. Первый failover: 48 записей, 0 неудачных попыток, восстановление 0.801 с. Повторный запуск получил внешний connection/TLS timeout до остановки pod; сохранён отдельно, не считается PASS. Конкурентная идемпотентность через HTTPS: 8 VU / 32 операции, 34/34 checks, ровно одно сообщение, другой body — конфликт. В процессе были 5 транзиентных неуспешных HTTP из 41; повторы выполнялись с исходным ключом. Полный рестарт API/PostgreSQL/Valkey прошёл: исходная сессия и сообщение сохранились, PVC неизменны. Реальные stop/pause PostgreSQL и Valkey на одноразовом стенде прошли: 503, отсутствие анонимного доступа, восстановление прежней сессии и сообщения. + +Rolling update проверен под нагрузкой 4 VU, 5 с прогрева и 20 с измерения. Deployment заменён успешно; 308 подтверждённых сообщений из 317 попыток записи (15.4 подтверждения/с в измеряемые 20 с). Всего 17 ошибок операций, включая чтения/повторы; 1040 из 1057 checks успешны, p95 записи 107.5 мс, p99 3036.5 мс. Это проверка с измеренными краткими ошибками, а не бесшовное обновление без ошибок. Raw: evidence/load-rolling-20261016.json, выборки: evidence/resources-rolling-20261016.txt. Сценарий не доказывает полную сохранность каждой записи после rolling update; она отдельно проверена persistence/failover-тестами. diff --git a/docs/PLAN.md b/docs/PLAN.md index 7d000e18..b2850db8 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -9,3 +9,4 @@ | L3-08 | Матрица, насыщение, подтверждённое улучшение | Полный трек не завершён | Проверки: shared-smoke PASS, shared-failover-1 PASS, shared-persistence PASS, shared-dependency-faults PASS. Concurrent retry: 34/34 checks, один Message через две реплики. Два повторных внешних failover-прогона завершились timeout до action; последовательная остановка каждой исходной реплики ещё не подтверждена. +Rolling update выполнен под короткой нагрузкой: 308 подтверждённых сообщений, 17 ошибок операций, обновление завершилось; raw в evidence/load-rolling-20261016.json. Полный исследовательский трек остаётся незавершённым. diff --git a/evidence/load-rolling-20261016.json b/evidence/load-rolling-20261016.json new file mode 100644 index 00000000..a9da72eb --- /dev/null +++ b/evidence/load-rolling-20261016.json @@ -0,0 +1,325 @@ +{ + "profile": { + "vus": 4, + "seconds": 20, + "warmup_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 493, + "fails": 9, + "name": "message confirmed" + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 53, + "fails": 0 + }, + { + "passes": 494, + "fails": 8, + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8" + } + ], + "name": "", + "path": "" + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 35896.458568 + }, + "metrics": { + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 104799, + "rate": 2919.4801989025004 + } + }, + "confirmed_messages": { + "contains": "default", + "values": { + "count": 308, + "rate": 8.580233602056985 + }, + "type": "counter" + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 107.14148209411755, + "p(50)": 45.745154, + "p(95)": 99.8943652, + "p(99)": 2032.5897884800002, + "max": 7206.858645 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0.000965, + "p(95)": 0.001395, + "p(99)": 0.0038502800000000718, + "max": 606.843456, + "avg": 0.6654776325791854 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 502, + "rate": 13.984666455300673 + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "max": 4069.037767, + "avg": 141.1973867507886, + "p(50)": 60.784952, + "p(95)": 107.54482639999999, + "p(99)": 3036.45417512 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 1105, + "rate": 30.782980942444706 + } + }, + "http_req_receiving": { + "contains": "time", + "values": { + "p(95)": 0.5982831999999998, + "p(99)": 1.129207840000003, + "max": 9.195694, + "avg": 0.26215743348416304, + "p(50)": 0.166438 + }, + "type": "trend" + }, + "vus": { + "values": { + "value": 1, + "min": 0, + "max": 4 + }, + "type": "gauge", + "contains": "default" + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 102.933588, + "p(95)": 219.91099354999994, + "p(99)": 5047.706061420009, + "max": 9095.88069, + "avg": 230.09780262549805 + } + }, + "http_req_sending": { + "contains": "time", + "values": { + "p(99)": 0.41411440000000055, + "max": 3.329727, + "avg": 0.1880026678733031, + "p(50)": 0.173364, + "p(95)": 0.30632359999999986 + }, + "type": "trend" + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 17, + "rate": 0.473584322191457 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.02591960814479638, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 3.756808 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 317, + "rate": 8.830954713805404 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "avg": 60.055339191176486, + "p(50)": 45.278537, + "p(95)": 95.53229384999999, + "p(99)": 123.21868363999846, + "max": 3151.644601 + } + }, + "http_req_tls_handshaking": { + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 17.520916, + "avg": 0.10471677647058822 + }, + "type": "trend" + }, + "http_req_failed": { + "contains": "default", + "values": { + "fails": 1088, + "rate": 0.015384615384615385, + "passes": 17 + }, + "type": "rate" + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 1392518, + "rate": 38792.629009964905 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "max": 7206.407109, + "avg": 106.69132199276018, + "p(50)": 45.315886, + "p(95)": 99.57287799999999, + "p(99)": 2031.2303810800001 + } + }, + "vus_max": { + "values": { + "max": 8, + "value": 8, + "min": 8 + }, + "type": "gauge", + "contains": "default" + }, + "checks": { + "contains": "default", + "values": { + "fails": 17, + "rate": 0.9839167455061495, + "passes": 1040 + }, + "type": "rate" + } + }, + "setup_data": [ + { + "token": "RMDAkY-Aed_W_tTOaJA5wu6TnOlN7m1UPrKAWMbtFQQ", + "chat": "715f2535-708a-4348-b154-9d85f0598fdf" + }, + { + "chat": "239e6262-5e95-4f65-8966-b389662c6101", + "token": "AmAOis6KfQyhlSistPhJOQM4XD3dFYobzU1Ct470qsY" + }, + { + "chat": "13e6a4d9-ca96-4c51-9eba-6e68b723e91c", + "token": "axqVVcp2Wlp5WLwq8t0YiGTYMye0XNRyvgMV-nzkPbQ" + }, + { + "chat": "c5c5c8b6-4602-4bb8-a659-b591715ab74b", + "token": "lo_zOOHgOq-xIgabAdaaGaFDLXASBkp8XAnr_Rwthao" + }, + { + "chat": "84f42d37-b65e-45b8-a736-dcdabb8d245e", + "token": "xkMKAehhhWMil8LSXF_DaVgQmAQCWFmCOWZvHmguIIY" + }, + { + "chat": "eaf3db13-97f1-4f96-a4db-f1197325497b", + "token": "AZDSshpwx1yn7DFeJlSyRpUaufvbLINW8bb-00Wt7ss" + }, + { + "chat": "b4ad2b36-b7ec-4605-8683-de83557f1cf5", + "token": "vs5w_-eg733XSvMyyziV6-7q47xZEQ372V5X_FsCGIA" + }, + { + "chat": "48e63e65-b90f-41c1-8bbc-6b60ebcabedc", + "token": "CQ8XeGorK0HomebCx_nUQijxGBG4MU0_eEtwwFWIW6Y" + }, + { + "token": "TZcYWe9cmOef_hrmozp1IOJSc9OSLTA04MxtGlkJ8XU", + "chat": "bbcecdd1-0cbc-4493-99a8-cbe9caba54f9" + }, + { + "token": "zCtwwuQh5gdcAnJUcRY9P-ktFEDHIV2rGSDVEQL-5bc", + "chat": "68dee914-40c9-4188-9d90-b7b9d44b8543" + }, + { + "chat": "89642210-6535-48be-a46c-8c19cdf9efac", + "token": "zqOhFtYQDONavNIIDMy6bwCFETNTd_tsWIU9X0D40G0" + }, + { + "chat": "73f0e9e1-f170-400c-9cfd-d90e473a19e2", + "token": "k8FRCbioLnN4MFvLrdyQ9dhwvYZUVV-O_ecyoq9VbOM" + }, + { + "chat": "fff6d4a8-515f-44ba-ba78-10297a58859d", + "token": "LxB3akwYgrEG0LLY9zeVRBCtTCwFCarK4SpPqANtOs4" + }, + { + "chat": "dbe76193-9952-4ebd-aad6-1cea59f0b4ce", + "token": "IykVKbHSToSG176w5aMJueQReRHXAvQAG8keTET7txc" + }, + { + "chat": "44bf5586-1443-44f3-aef4-f35f26b8ca36", + "token": "4zP8j_2J9UtJktGE6_isyb3rvHqB6LcKyMUfBuqSXJU" + }, + { + "chat": "5464947f-701d-43d3-887e-54a1df125654", + "token": "Vg-TqjU86Al7Isbs-el_AD9aB_gK15cEhLeP4jzHrpk" + } + ] + } +} diff --git a/evidence/load-rolling-20261016.txt b/evidence/load-rolling-20261016.txt new file mode 100644 index 00000000..35b6eaf5 --- /dev/null +++ b/evidence/load-rolling-20261016.txt @@ -0,0 +1 @@ +{"profile":{"vus":4,"seconds":20,"warmup_seconds":5,"users":16},"summary":{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":493,"fails":9,"name":"message confirmed"},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":53,"fails":0},{"passes":494,"fails":8,"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8"}],"name":"","path":""},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":35896.458568},"metrics":{"data_sent":{"type":"counter","contains":"data","values":{"count":104799,"rate":2919.4801989025004}},"confirmed_messages":{"contains":"default","values":{"count":308,"rate":8.580233602056985},"type":"counter"},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":107.14148209411755,"p(50)":45.745154,"p(95)":99.8943652,"p(99)":2032.5897884800002,"max":7206.858645}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.000965,"p(95)":0.001395,"p(99)":0.0038502800000000718,"max":606.843456,"avg":0.6654776325791854}},"iterations":{"type":"counter","contains":"default","values":{"count":502,"rate":13.984666455300673}},"message_latency_ms":{"type":"trend","contains":"time","values":{"max":4069.037767,"avg":141.1973867507886,"p(50)":60.784952,"p(95)":107.54482639999999,"p(99)":3036.45417512}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1105,"rate":30.782980942444706}},"http_req_receiving":{"contains":"time","values":{"p(95)":0.5982831999999998,"p(99)":1.129207840000003,"max":9.195694,"avg":0.26215743348416304,"p(50)":0.166438},"type":"trend"},"vus":{"values":{"value":1,"min":0,"max":4},"type":"gauge","contains":"default"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":102.933588,"p(95)":219.91099354999994,"p(99)":5047.706061420009,"max":9095.88069,"avg":230.09780262549805}},"http_req_sending":{"contains":"time","values":{"p(99)":0.41411440000000055,"max":3.329727,"avg":0.1880026678733031,"p(50)":0.173364,"p(95)":0.30632359999999986},"type":"trend"},"application_errors":{"type":"counter","contains":"default","values":{"count":17,"rate":0.473584322191457}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.02591960814479638,"p(50)":0,"p(95)":0,"p(99)":0,"max":3.756808}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":317,"rate":8.830954713805404}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":60.055339191176486,"p(50)":45.278537,"p(95)":95.53229384999999,"p(99)":123.21868363999846,"max":3151.644601}},"http_req_tls_handshaking":{"contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":17.520916,"avg":0.10471677647058822},"type":"trend"},"http_req_failed":{"contains":"default","values":{"fails":1088,"rate":0.015384615384615385,"passes":17},"type":"rate"},"data_received":{"type":"counter","contains":"data","values":{"count":1392518,"rate":38792.629009964905}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":7206.407109,"avg":106.69132199276018,"p(50)":45.315886,"p(95)":99.57287799999999,"p(99)":2031.2303810800001}},"vus_max":{"values":{"max":8,"value":8,"min":8},"type":"gauge","contains":"default"},"checks":{"contains":"default","values":{"fails":17,"rate":0.9839167455061495,"passes":1040},"type":"rate"}},"setup_data":[{"token":"RMDAkY-Aed_W_tTOaJA5wu6TnOlN7m1UPrKAWMbtFQQ","chat":"715f2535-708a-4348-b154-9d85f0598fdf"},{"chat":"239e6262-5e95-4f65-8966-b389662c6101","token":"AmAOis6KfQyhlSistPhJOQM4XD3dFYobzU1Ct470qsY"},{"chat":"13e6a4d9-ca96-4c51-9eba-6e68b723e91c","token":"axqVVcp2Wlp5WLwq8t0YiGTYMye0XNRyvgMV-nzkPbQ"},{"chat":"c5c5c8b6-4602-4bb8-a659-b591715ab74b","token":"lo_zOOHgOq-xIgabAdaaGaFDLXASBkp8XAnr_Rwthao"},{"chat":"84f42d37-b65e-45b8-a736-dcdabb8d245e","token":"xkMKAehhhWMil8LSXF_DaVgQmAQCWFmCOWZvHmguIIY"},{"chat":"eaf3db13-97f1-4f96-a4db-f1197325497b","token":"AZDSshpwx1yn7DFeJlSyRpUaufvbLINW8bb-00Wt7ss"},{"chat":"b4ad2b36-b7ec-4605-8683-de83557f1cf5","token":"vs5w_-eg733XSvMyyziV6-7q47xZEQ372V5X_FsCGIA"},{"chat":"48e63e65-b90f-41c1-8bbc-6b60ebcabedc","token":"CQ8XeGorK0HomebCx_nUQijxGBG4MU0_eEtwwFWIW6Y"},{"token":"TZcYWe9cmOef_hrmozp1IOJSc9OSLTA04MxtGlkJ8XU","chat":"bbcecdd1-0cbc-4493-99a8-cbe9caba54f9"},{"token":"zCtwwuQh5gdcAnJUcRY9P-ktFEDHIV2rGSDVEQL-5bc","chat":"68dee914-40c9-4188-9d90-b7b9d44b8543"},{"chat":"89642210-6535-48be-a46c-8c19cdf9efac","token":"zqOhFtYQDONavNIIDMy6bwCFETNTd_tsWIU9X0D40G0"},{"chat":"73f0e9e1-f170-400c-9cfd-d90e473a19e2","token":"k8FRCbioLnN4MFvLrdyQ9dhwvYZUVV-O_ecyoq9VbOM"},{"chat":"fff6d4a8-515f-44ba-ba78-10297a58859d","token":"LxB3akwYgrEG0LLY9zeVRBCtTCwFCarK4SpPqANtOs4"},{"chat":"dbe76193-9952-4ebd-aad6-1cea59f0b4ce","token":"IykVKbHSToSG176w5aMJueQReRHXAvQAG8keTET7txc"},{"chat":"44bf5586-1443-44f3-aef4-f35f26b8ca36","token":"4zP8j_2J9UtJktGE6_isyb3rvHqB6LcKyMUfBuqSXJU"},{"chat":"5464947f-701d-43d3-887e-54a1df125654","token":"Vg-TqjU86Al7Isbs-el_AD9aB_gK15cEhLeP4jzHrpk"}]}} diff --git a/evidence/resources-rolling-20261016.txt b/evidence/resources-rolling-20261016.txt new file mode 100644 index 00000000..278f6635 --- /dev/null +++ b/evidence/resources-rolling-20261016.txt @@ -0,0 +1,63 @@ +UTC 2026-10-16T08:50:15Z +NAME CPU(cores) MEMORY(bytes) +api-647dcfd499-ksc82 2m 22Mi +api-647dcfd499-tz465 2m 22Mi +postgres-0 5m 28Mi +valkey-0 7m 5Mi +valkey-1 5m 3Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|2 +UTC 2026-10-16T08:50:20Z +NAME CPU(cores) MEMORY(bytes) +api-647dcfd499-ksc82 2m 22Mi +api-647dcfd499-tz465 2m 22Mi +postgres-0 5m 28Mi +valkey-0 7m 5Mi +valkey-1 5m 3Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|5 +UTC 2026-10-16T08:50:27Z +NAME CPU(cores) MEMORY(bytes) +api-647dcfd499-ksc82 86m 9Mi +api-647dcfd499-tz465 67m 7Mi +load-rolling-20261016-fznwl 68m 14Mi +postgres-0 94m 38Mi +valkey-0 34m 5Mi +valkey-1 5m 3Mi +valkey-2 21m 3Mi +active|||1 +idle|Client|ClientRead|3 +UTC 2026-10-16T08:50:38Z +NAME CPU(cores) MEMORY(bytes) +api-647dcfd499-ksc82 86m 9Mi +api-647dcfd499-tz465 67m 7Mi +load-rolling-20261016-fznwl 68m 14Mi +postgres-0 94m 38Mi +valkey-0 34m 5Mi +valkey-1 5m 3Mi +valkey-2 21m 3Mi +active|||1 +idle|Client|ClientRead|7 +UTC 2026-10-16T08:50:44Z +NAME CPU(cores) MEMORY(bytes) +api-647dcfd499-ksc82 68m 10Mi +api-647dcfd499-tz465 68m 7Mi +load-rolling-20261016-fznwl 55m 16Mi +postgres-0 77m 40Mi +valkey-0 60m 6Mi +valkey-1 13m 3Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|6 +UTC 2026-10-16T08:50:52Z +NAME CPU(cores) MEMORY(bytes) +api-647dcfd499-tz465 68m 7Mi +load-rolling-20261016-fznwl 55m 16Mi +postgres-0 77m 40Mi +valkey-0 60m 6Mi +valkey-1 13m 3Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|4 diff --git a/evidence/shared-state.txt b/evidence/shared-state.txt index 530bdf37..ee5f6c6b 100644 --- a/evidence/shared-state.txt +++ b/evidence/shared-state.txt @@ -1,20 +1,20 @@ NAME READY STATUS RESTARTS AGE -pod/api-56cdb6bc9b-fkkmp 1/1 Running 0 27s -pod/api-56cdb6bc9b-rsrlb 1/1 Running 0 30s -pod/load-idempotency-20261016084724-ph422 0/1 Completed 0 3m43s -pod/load-rolling-20261016-fznwl 0/1 Completed 0 53s +pod/api-56cdb6bc9b-fkkmp 1/1 Running 0 76s +pod/api-56cdb6bc9b-rsrlb 1/1 Running 0 79s +pod/load-idempotency-20261016084724-ph422 0/1 Completed 0 4m32s +pod/load-rolling-20261016-fznwl 0/1 Completed 0 102s pod/metrics-server-db8d46c89-92mbs 1/1 Running 0 18h -pod/migrate-2-c56fc 0/1 Completed 0 6m13s -pod/postgres-0 1/1 Running 0 108s -pod/valkey-0 1/1 Running 0 102s -pod/valkey-1 1/1 Running 0 105s -pod/valkey-2 1/1 Running 0 108s +pod/migrate-2-c56fc 0/1 Completed 0 7m2s +pod/postgres-0 1/1 Running 0 2m37s +pod/valkey-0 1/1 Running 0 2m31s +pod/valkey-1 1/1 Running 0 2m34s +pod/valkey-2 1/1 Running 0 2m37s -NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE -horizontalpodautoscaler.autoscaling/api Deployment/api cpu: /60% 2 4 2 6m13s +NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE +horizontalpodautoscaler.autoscaling/api Deployment/api cpu: 1%/60% 2 4 2 7m2s NAME CLASS HOSTS ADDRESS PORTS AGE -ingress.networking.k8s.io/messenger traefik hl.agapov.space 80, 443 6m13s +ingress.networking.k8s.io/messenger traefik hl.agapov.space 80, 443 7m2s NAME READY SECRET AGE -certificate.cert-manager.io/messenger-tls True messenger-tls 6m13s +certificate.cert-manager.io/messenger-tls True messenger-tls 7m2s -- 2.54.0 From f4ec74b78ba4c8da2bfcee6e5d343ddfbc36039f Mon Sep 17 00:00:00 2001 From: Vladislav Agapov Date: Thu, 29 Oct 2026 15:25:37 +0300 Subject: [PATCH 4/4] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=B7=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BE?= =?UTF-8?q?=D0=BA=20413=20=D0=B8=20=D0=B4=D0=BE=D0=BF=D0=BE=D0=BB=D0=BD?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D1=83=20=D0=BE=D1=82=D0=BA=D0=B0=D0=B7=D0=BE=D0=B2=20=D0=B8=20?= =?UTF-8?q?=D0=BC=D0=B0=D1=81=D1=88=D1=82=D0=B0=D0=B1=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20lab3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ARCHITECTURE.md | 4 + REPORT.md | 25 +- charts/messenger/templates/api.yaml | 8 +- charts/messenger/templates/load.yaml | 2 + charts/messenger/values.yaml | 5 +- docs/DEFENSE.md | 6 +- docs/PLAN.md | 14 +- docs/RESEARCH.md | 77 + docs/SPEC.md | 18 + evidence/research-20261029-budget/README.md | 7 + .../base-revision.txt | 1 + evidence/research-20261029-budget/date.txt | 1 + .../deployment-growing1-20261029115804.json | 217 ++ ...oyment-resource-high-a-20261029121644.json | 217 ++ ...oyment-resource-high-b-20261029122017.json | 217 ++ ...loyment-resource-low-a-20261029121455.json | 217 ++ ...loyment-resource-low-b-20261029121833.json | 217 ++ ...deployment-saturation8-20261029121309.json | 217 ++ .../research-20261029-budget/disable-hpa.txt | 8 + .../load-growing1-20261029115804.json | 381 ++ .../load-growing1-20261029115804.txt | 1 + .../load-resource-high-a-20261029121644.json | 381 ++ .../load-resource-high-a-20261029121644.txt | 4 + .../load-resource-high-b-20261029122017.json | 373 ++ .../load-resource-high-b-20261029122017.txt | 1 + .../load-resource-low-a-20261029121455.json | 381 ++ .../load-resource-low-a-20261029121455.txt | 1 + .../load-resource-low-b-20261029121833.json | 381 ++ .../load-resource-low-b-20261029121833.txt | 1 + .../load-saturation8-20261029121309.json | 373 ++ .../load-saturation8-20261029121309.txt | 3 + evidence/research-20261029-budget/nodes.txt | 4 + .../pods-growing1-20261029115804.txt | 2 + .../pods-resource-high-a-20261029121644.txt | 3 + .../pods-resource-high-b-20261029122017.txt | 3 + .../pods-resource-low-a-20261029121455.txt | 3 + .../pods-resource-low-b-20261029121833.txt | 3 + .../pods-saturation8-20261029121309.txt | 2 + .../research-20261029-budget/profiles.csv | 7 + .../resources-growing1-20261029115804.txt | 107 + ...sources-resource-high-a-20261029121644.txt | 112 + ...sources-resource-high-b-20261029122017.txt | 97 + ...esources-resource-low-a-20261029121455.txt | 92 + ...esources-resource-low-b-20261029121833.txt | 82 + .../resources-saturation8-20261029121309.txt | 115 + .../restore-values.yaml | 61 + evidence/research-20261029-budget/restore.txt | 8 + .../rollout-growing1.txt | 8 + .../rollout-resource-high-a.txt | 8 + .../rollout-resource-high-b.txt | 8 + .../rollout-resource-low-a.txt | 8 + .../rollout-resource-low-b.txt | 8 + .../rollout-saturation8.txt | 8 + .../research-20261029-budget/source.sha256 | 3 + .../values-growing1-20261029115804.json | 1 + ...values-resource-high-a-20261029121644.json | 1 + ...values-resource-high-b-20261029122017.json | 1 + .../values-resource-low-a-20261029121455.json | 1 + .../values-resource-low-b-20261029121833.json | 1 + .../values-saturation8-20261029121309.json | 1 + .../README.md | 5 + .../base-revision.txt | 1 + .../date.txt | 1 + .../deployment-growing1-20261029112219.json | 217 ++ .../load-growing1-20261029112219.json | 373 ++ .../load-growing1-20261029112219.txt | 1 + .../nodes.txt | 4 + .../pods-growing1-20261029112219.txt | 3 + .../profiles.csv | 2 + .../resources-growing1-20261029112219.txt | 85 + .../restore-values.yaml | 61 + .../restore.txt | 8 + .../rollout-growing1.txt | 8 + .../rollout-saturation8.txt | 0 .../source.sha256 | 3 + .../research-20261029-controlled/README.md | 3 + .../base-revision.txt | 1 + .../research-20261029-controlled/date.txt | 1 + .../deployment-growing1-20261029111920.json | 217 ++ .../research-20261029-controlled/nodes.txt | 4 + .../pods-growing1-20261029111920.txt | 2 + .../research-20261029-controlled/profiles.csv | 2 + .../resources-growing1-20261029111920.txt | 51 + .../restore-values.yaml | 61 + .../research-20261029-controlled/restore.txt | 8 + .../rollout-growing1.txt | 8 + .../source.sha256 | 3 + .../research-20261029-final/base-revision.txt | 1 + .../cpu-quota-config.json | 4 + evidence/research-20261029-final/date.txt | 1 + .../deployment-fixed1-20261029110437.json | 214 ++ .../deployment-fixed2-20261029110639.json | 214 ++ .../deployment-fixed4-20261029110815.json | 214 ++ .../deployment-growing1-20261029111013.json | 214 ++ .../deployment-growing2-20261029111200.json | 214 ++ .../deployment-growing4-20261029111342.json | 214 ++ ...deployment-saturation8-20261029111530.json | 214 ++ evidence/research-20261029-final/events.json | 2590 +++++++++++++ .../research-20261029-final/excluded.json | 6 + .../invalid-growing1-log.txt | 1 + .../invalid-growing1.md | 3 + .../load-fixed1-20261029110437.json | 373 ++ .../load-fixed1-20261029110437.txt | 3 + .../load-fixed2-20261029110639.json | 381 ++ .../load-fixed2-20261029110639.txt | 1 + .../load-fixed4-20261029110815.json | 381 ++ .../load-fixed4-20261029110815.txt | 1 + .../load-growing2-20261029111200.json | 381 ++ .../load-growing2-20261029111200.txt | 1 + .../load-growing4-20261029111342.json | 373 ++ .../load-growing4-20261029111342.txt | 1 + .../load-saturation8-20261029111530.txt | 7 + evidence/research-20261029-final/matrix.png | Bin 0 -> 82178 bytes evidence/research-20261029-final/matrix.svg | 1667 ++++++++ .../node-capacity.json | 95 + evidence/research-20261029-final/nodes.txt | 4 + .../pods-growing2-20261029111200.txt | 3 + .../pods-growing4-20261029111342.txt | 5 + .../pods-saturation8-20261029111530.txt | 2 + evidence/research-20261029-final/profiles.csv | 8 + .../resources-fixed1-20261029110437.txt | 97 + .../resources-fixed2-20261029110639.txt | 99 + .../resources-fixed4-20261029110815.txt | 131 + .../resources-growing1-20261029111013.txt | 96 + .../resources-growing2-20261029111200.txt | 105 + .../resources-growing4-20261029111342.txt | 128 + .../resources-saturation8-20261029111530.txt | 40 + .../restore-values.yaml | 61 + evidence/research-20261029-final/restore.txt | 8 + evidence/research-20261029-final/results.png | Bin 0 -> 186508 bytes evidence/research-20261029-final/results.svg | 3372 +++++++++++++++++ .../rollout-fixed1.txt | 8 + .../rollout-fixed2.txt | 8 + .../rollout-fixed4.txt | 8 + .../rollout-growing1.txt | 8 + .../rollout-growing2.txt | 8 + .../rollout-growing4.txt | 8 + .../rollout-saturation8.txt | 8 + .../research-20261029-final/source.sha256 | 3 + evidence/research-20261029-final/summary.csv | 20 + evidence/research-20261029-pool/README.md | 7 + .../admission-samples.txt | 540 +++ .../research-20261029-pool/base-revision.txt | 1 + evidence/research-20261029-pool/date.txt | 1 + ...eployment-saturation64-20261029112756.json | 217 ++ ...deployment-saturation8-20261029112615.json | 217 ++ .../deployment-single32a-20261029113131.json | 217 ++ .../deployment-single32b-20261029113452.json | 217 ++ .../deployment-single8a-20261029112953.json | 217 ++ .../deployment-single8b-20261029113315.json | 217 ++ .../load-saturation64-20261029112756.json | 381 ++ .../load-saturation64-20261029112756.txt | 2 + .../load-saturation8-20261029112615.json | 381 ++ .../load-saturation8-20261029112615.txt | 1 + .../load-single32a-20261029113131.json | 381 ++ .../load-single32a-20261029113131.txt | 1 + .../load-single32b-20261029113452.json | 373 ++ .../load-single32b-20261029113452.txt | 1 + .../load-single8a-20261029112953.json | 381 ++ .../load-single8a-20261029112953.txt | 1 + .../load-single8b-20261029113315.json | 381 ++ .../load-single8b-20261029113315.txt | 1 + evidence/research-20261029-pool/nodes.txt | 4 + .../pods-saturation64-20261029112756.txt | 2 + .../pods-saturation8-20261029112615.txt | 3 + .../pods-single32a-20261029113131.txt | 2 + .../pods-single32b-20261029113452.txt | 2 + .../pods-single8a-20261029112953.txt | 2 + .../pods-single8b-20261029113315.txt | 2 + evidence/research-20261029-pool/profiles.csv | 7 + .../readiness-events.json | 207 + .../resources-saturation64-20261029112756.txt | 82 + .../resources-saturation8-20261029112615.txt | 85 + .../resources-single32a-20261029113131.txt | 64 + .../resources-single32b-20261029113452.txt | 80 + .../resources-single8a-20261029112953.txt | 64 + .../resources-single8b-20261029113315.txt | 62 + .../restore-values.yaml | 61 + evidence/research-20261029-pool/restore.txt | 8 + .../rollout-saturation64.txt | 8 + .../rollout-saturation8.txt | 8 + .../rollout-single32a.txt | 8 + .../rollout-single32b.txt | 8 + .../rollout-single8a.txt | 8 + .../rollout-single8b.txt | 8 + evidence/research-20261029-pool/source.sha256 | 3 + .../research-20261029-readiness/README.md | 5 + .../base-revision.txt | 1 + evidence/research-20261029-readiness/date.txt | 1 + .../deployment-probe2a-20261029113757.json | 217 ++ .../deployment-probe2b-20261029114146.json | 217 ++ .../deployment-probe5a-20261029113950.json | 217 ++ .../deployment-probe5b-20261029114403.json | 217 ++ .../load-probe2a-20261029113757.json | 373 ++ .../load-probe2a-20261029113757.txt | 1 + .../load-probe2b-20261029114146.json | 373 ++ .../load-probe2b-20261029114146.txt | 4 + .../load-probe5a-20261029113950.json | 373 ++ .../load-probe5a-20261029113950.txt | 4 + .../load-probe5b-20261029114403.json | 381 ++ .../load-probe5b-20261029114403.txt | 1 + .../research-20261029-readiness/nodes.txt | 4 + .../pods-probe2a-20261029113757.txt | 3 + .../pods-probe2b-20261029114146.txt | 2 + .../pods-probe5a-20261029113950.txt | 2 + .../pods-probe5b-20261029114403.txt | 2 + .../research-20261029-readiness/profiles.csv | 5 + .../resources-probe2a-20261029113757.txt | 59 + .../resources-probe2b-20261029114146.txt | 48 + .../resources-probe5a-20261029113950.txt | 101 + .../resources-probe5b-20261029114403.txt | 89 + .../restore-values.yaml | 61 + .../research-20261029-readiness/restore.txt | 8 + .../rollout-probe2a.txt | 8 + .../rollout-probe2b.txt | 8 + .../rollout-probe5a.txt | 8 + .../rollout-probe5b.txt | 8 + .../research-20261029-readiness/source.sha256 | 3 + .../values-probe5b-20261029114403.json | 1 + evidence/research-20261029/README.md | 5 + evidence/research-20261029/base-revision.txt | 1 + evidence/research-20261029/dataset-during.txt | 3 + evidence/research-20261029/date.txt | 1 + .../research-20261029/deployment-fixed4.json | 214 ++ .../load-fixed1-20261029105633.json | 381 ++ .../load-fixed1-20261029105633.txt | 1 + .../load-fixed2-20261029105833.json | 373 ++ .../load-fixed2-20261029105833.txt | 1 + .../load-fixed4-20261029110021.txt | 2 + evidence/research-20261029/nodes.txt | 4 + evidence/research-20261029/profiles.csv | 4 + .../research-20261029/readiness-events.json | 372 ++ .../resources-fixed1-20261029105633.txt | 79 + .../resources-fixed2-20261029105833.txt | 109 + .../resources-fixed4-20261029110021.txt | 47 + .../research-20261029/restore-values.yaml | 61 + evidence/research-20261029/restore.txt | 8 + evidence/research-20261029/rollout-fixed1.txt | 8 + evidence/research-20261029/rollout-fixed2.txt | 8 + evidence/research-20261029/rollout-fixed4.txt | 8 + evidence/research-20261029/source.sha256 | 3 + evidence/research-20261029/values-fixed1.json | 1 + evidence/research-20261029/values-fixed2.json | 1 + evidence/review-20261029/413-body.json | 1 + evidence/review-20261029/413-headers.txt | 7 + evidence/review-20261029/README.md | 20 + evidence/review-20261029/body-limit.txt | 1 + evidence/review-20261029/both-replicas.txt | 3 + evidence/review-20261029/build.txt | 65 + evidence/review-20261029/contract.txt | 2 + .../review-20261029/coverage-per-file.json | 75 + evidence/review-20261029/coverage.txt | 95 + evidence/review-20261029/deploy.txt | 8 + .../failover-1-20261029105415-delete.txt | 1 + .../failover-1-20261029105415-run.txt | 2 + .../failover-1-20261029105415-stop-epoch.txt | 1 + .../failover-1-20261029105415-summary.json | 10 + .../failover-1-20261029105415-target.json | 329 ++ .../failover-2-20261029105524-delete.txt | 1 + .../failover-2-20261029105524-restored.txt | 1 + .../failover-2-20261029105524-run.txt | 2 + .../failover-2-20261029105524-stop-epoch.txt | 1 + .../failover-2-20261029105524-summary.json | 10 + .../failover-2-20261029105524-target.json | 329 ++ .../review-20261029/final-deployment.json | 214 ++ evidence/review-20261029/final-rollout.txt | 1 + .../review-20261029/final-smoke-retry.txt | 3 + evidence/review-20261029/final-smoke.txt | 3 + evidence/review-20261029/go-version.txt | 1 + evidence/review-20261029/helm-lint.txt | 4 + evidence/review-20261029/helm-version.txt | 1 + evidence/review-20261029/image.json | 20 + evidence/review-20261029/initial-api.json | 667 ++++ .../review-20261029/kubernetes-version.json | 29 + evidence/review-20261029/lint.txt | 1 + .../load-failover-1-20261029105415.txt | 29 + .../load-failover-2-20261029105524.txt | 31 + .../resources-failover-1-20261029105415.txt | 50 + .../resources-failover-2-20261029105524.txt | 39 + evidence/review-20261029/smoke-after.txt | 2 + evidence/review-20261029/smoke.txt | 3 + evidence/review-20261029/targets.txt | 2 + evidence/review-20261029/vet.txt | 0 .../controller/http/fiber/body_limit_test.go | 68 + internal/controller/http/fiber/errors.go | 2 + scripts/experiment.sh | 55 +- scripts/plot-research.py | 119 + scripts/run-load.sh | 34 +- scripts/sample-admission.sh | 8 + scripts/summarize-failover.rb | 21 + scripts/test-both-replicas.sh | 33 + student-tests/README.md | 4 + student-tests/load/failover.js | 61 + student-tests/load/scaling.js | 37 +- 294 files changed, 29530 insertions(+), 57 deletions(-) create mode 100644 docs/RESEARCH.md create mode 100644 evidence/research-20261029-budget/README.md create mode 100644 evidence/research-20261029-budget/base-revision.txt create mode 100644 evidence/research-20261029-budget/date.txt create mode 100644 evidence/research-20261029-budget/deployment-growing1-20261029115804.json create mode 100644 evidence/research-20261029-budget/deployment-resource-high-a-20261029121644.json create mode 100644 evidence/research-20261029-budget/deployment-resource-high-b-20261029122017.json create mode 100644 evidence/research-20261029-budget/deployment-resource-low-a-20261029121455.json create mode 100644 evidence/research-20261029-budget/deployment-resource-low-b-20261029121833.json create mode 100644 evidence/research-20261029-budget/deployment-saturation8-20261029121309.json create mode 100644 evidence/research-20261029-budget/disable-hpa.txt create mode 100644 evidence/research-20261029-budget/load-growing1-20261029115804.json create mode 100644 evidence/research-20261029-budget/load-growing1-20261029115804.txt create mode 100644 evidence/research-20261029-budget/load-resource-high-a-20261029121644.json create mode 100644 evidence/research-20261029-budget/load-resource-high-a-20261029121644.txt create mode 100644 evidence/research-20261029-budget/load-resource-high-b-20261029122017.json create mode 100644 evidence/research-20261029-budget/load-resource-high-b-20261029122017.txt create mode 100644 evidence/research-20261029-budget/load-resource-low-a-20261029121455.json create mode 100644 evidence/research-20261029-budget/load-resource-low-a-20261029121455.txt create mode 100644 evidence/research-20261029-budget/load-resource-low-b-20261029121833.json create mode 100644 evidence/research-20261029-budget/load-resource-low-b-20261029121833.txt create mode 100644 evidence/research-20261029-budget/load-saturation8-20261029121309.json create mode 100644 evidence/research-20261029-budget/load-saturation8-20261029121309.txt create mode 100644 evidence/research-20261029-budget/nodes.txt create mode 100644 evidence/research-20261029-budget/pods-growing1-20261029115804.txt create mode 100644 evidence/research-20261029-budget/pods-resource-high-a-20261029121644.txt create mode 100644 evidence/research-20261029-budget/pods-resource-high-b-20261029122017.txt create mode 100644 evidence/research-20261029-budget/pods-resource-low-a-20261029121455.txt create mode 100644 evidence/research-20261029-budget/pods-resource-low-b-20261029121833.txt create mode 100644 evidence/research-20261029-budget/pods-saturation8-20261029121309.txt create mode 100644 evidence/research-20261029-budget/profiles.csv create mode 100644 evidence/research-20261029-budget/resources-growing1-20261029115804.txt create mode 100644 evidence/research-20261029-budget/resources-resource-high-a-20261029121644.txt create mode 100644 evidence/research-20261029-budget/resources-resource-high-b-20261029122017.txt create mode 100644 evidence/research-20261029-budget/resources-resource-low-a-20261029121455.txt create mode 100644 evidence/research-20261029-budget/resources-resource-low-b-20261029121833.txt create mode 100644 evidence/research-20261029-budget/resources-saturation8-20261029121309.txt create mode 100644 evidence/research-20261029-budget/restore-values.yaml create mode 100644 evidence/research-20261029-budget/restore.txt create mode 100644 evidence/research-20261029-budget/rollout-growing1.txt create mode 100644 evidence/research-20261029-budget/rollout-resource-high-a.txt create mode 100644 evidence/research-20261029-budget/rollout-resource-high-b.txt create mode 100644 evidence/research-20261029-budget/rollout-resource-low-a.txt create mode 100644 evidence/research-20261029-budget/rollout-resource-low-b.txt create mode 100644 evidence/research-20261029-budget/rollout-saturation8.txt create mode 100644 evidence/research-20261029-budget/source.sha256 create mode 100644 evidence/research-20261029-budget/values-growing1-20261029115804.json create mode 100644 evidence/research-20261029-budget/values-resource-high-a-20261029121644.json create mode 100644 evidence/research-20261029-budget/values-resource-high-b-20261029122017.json create mode 100644 evidence/research-20261029-budget/values-resource-low-a-20261029121455.json create mode 100644 evidence/research-20261029-budget/values-resource-low-b-20261029121833.json create mode 100644 evidence/research-20261029-budget/values-saturation8-20261029121309.json create mode 100644 evidence/research-20261029-controlled-final/README.md create mode 100644 evidence/research-20261029-controlled-final/base-revision.txt create mode 100644 evidence/research-20261029-controlled-final/date.txt create mode 100644 evidence/research-20261029-controlled-final/deployment-growing1-20261029112219.json create mode 100644 evidence/research-20261029-controlled-final/load-growing1-20261029112219.json create mode 100644 evidence/research-20261029-controlled-final/load-growing1-20261029112219.txt create mode 100644 evidence/research-20261029-controlled-final/nodes.txt create mode 100644 evidence/research-20261029-controlled-final/pods-growing1-20261029112219.txt create mode 100644 evidence/research-20261029-controlled-final/profiles.csv create mode 100644 evidence/research-20261029-controlled-final/resources-growing1-20261029112219.txt create mode 100644 evidence/research-20261029-controlled-final/restore-values.yaml create mode 100644 evidence/research-20261029-controlled-final/restore.txt create mode 100644 evidence/research-20261029-controlled-final/rollout-growing1.txt create mode 100644 evidence/research-20261029-controlled-final/rollout-saturation8.txt create mode 100644 evidence/research-20261029-controlled-final/source.sha256 create mode 100644 evidence/research-20261029-controlled/README.md create mode 100644 evidence/research-20261029-controlled/base-revision.txt create mode 100644 evidence/research-20261029-controlled/date.txt create mode 100644 evidence/research-20261029-controlled/deployment-growing1-20261029111920.json create mode 100644 evidence/research-20261029-controlled/nodes.txt create mode 100644 evidence/research-20261029-controlled/pods-growing1-20261029111920.txt create mode 100644 evidence/research-20261029-controlled/profiles.csv create mode 100644 evidence/research-20261029-controlled/resources-growing1-20261029111920.txt create mode 100644 evidence/research-20261029-controlled/restore-values.yaml create mode 100644 evidence/research-20261029-controlled/restore.txt create mode 100644 evidence/research-20261029-controlled/rollout-growing1.txt create mode 100644 evidence/research-20261029-controlled/source.sha256 create mode 100644 evidence/research-20261029-final/base-revision.txt create mode 100644 evidence/research-20261029-final/cpu-quota-config.json create mode 100644 evidence/research-20261029-final/date.txt create mode 100644 evidence/research-20261029-final/deployment-fixed1-20261029110437.json create mode 100644 evidence/research-20261029-final/deployment-fixed2-20261029110639.json create mode 100644 evidence/research-20261029-final/deployment-fixed4-20261029110815.json create mode 100644 evidence/research-20261029-final/deployment-growing1-20261029111013.json create mode 100644 evidence/research-20261029-final/deployment-growing2-20261029111200.json create mode 100644 evidence/research-20261029-final/deployment-growing4-20261029111342.json create mode 100644 evidence/research-20261029-final/deployment-saturation8-20261029111530.json create mode 100644 evidence/research-20261029-final/events.json create mode 100644 evidence/research-20261029-final/excluded.json create mode 100644 evidence/research-20261029-final/invalid-growing1-log.txt create mode 100644 evidence/research-20261029-final/invalid-growing1.md create mode 100644 evidence/research-20261029-final/load-fixed1-20261029110437.json create mode 100644 evidence/research-20261029-final/load-fixed1-20261029110437.txt create mode 100644 evidence/research-20261029-final/load-fixed2-20261029110639.json create mode 100644 evidence/research-20261029-final/load-fixed2-20261029110639.txt create mode 100644 evidence/research-20261029-final/load-fixed4-20261029110815.json create mode 100644 evidence/research-20261029-final/load-fixed4-20261029110815.txt create mode 100644 evidence/research-20261029-final/load-growing2-20261029111200.json create mode 100644 evidence/research-20261029-final/load-growing2-20261029111200.txt create mode 100644 evidence/research-20261029-final/load-growing4-20261029111342.json create mode 100644 evidence/research-20261029-final/load-growing4-20261029111342.txt create mode 100644 evidence/research-20261029-final/load-saturation8-20261029111530.txt create mode 100644 evidence/research-20261029-final/matrix.png create mode 100644 evidence/research-20261029-final/matrix.svg create mode 100644 evidence/research-20261029-final/node-capacity.json create mode 100644 evidence/research-20261029-final/nodes.txt create mode 100644 evidence/research-20261029-final/pods-growing2-20261029111200.txt create mode 100644 evidence/research-20261029-final/pods-growing4-20261029111342.txt create mode 100644 evidence/research-20261029-final/pods-saturation8-20261029111530.txt create mode 100644 evidence/research-20261029-final/profiles.csv create mode 100644 evidence/research-20261029-final/resources-fixed1-20261029110437.txt create mode 100644 evidence/research-20261029-final/resources-fixed2-20261029110639.txt create mode 100644 evidence/research-20261029-final/resources-fixed4-20261029110815.txt create mode 100644 evidence/research-20261029-final/resources-growing1-20261029111013.txt create mode 100644 evidence/research-20261029-final/resources-growing2-20261029111200.txt create mode 100644 evidence/research-20261029-final/resources-growing4-20261029111342.txt create mode 100644 evidence/research-20261029-final/resources-saturation8-20261029111530.txt create mode 100644 evidence/research-20261029-final/restore-values.yaml create mode 100644 evidence/research-20261029-final/restore.txt create mode 100644 evidence/research-20261029-final/results.png create mode 100644 evidence/research-20261029-final/results.svg create mode 100644 evidence/research-20261029-final/rollout-fixed1.txt create mode 100644 evidence/research-20261029-final/rollout-fixed2.txt create mode 100644 evidence/research-20261029-final/rollout-fixed4.txt create mode 100644 evidence/research-20261029-final/rollout-growing1.txt create mode 100644 evidence/research-20261029-final/rollout-growing2.txt create mode 100644 evidence/research-20261029-final/rollout-growing4.txt create mode 100644 evidence/research-20261029-final/rollout-saturation8.txt create mode 100644 evidence/research-20261029-final/source.sha256 create mode 100644 evidence/research-20261029-final/summary.csv create mode 100644 evidence/research-20261029-pool/README.md create mode 100644 evidence/research-20261029-pool/admission-samples.txt create mode 100644 evidence/research-20261029-pool/base-revision.txt create mode 100644 evidence/research-20261029-pool/date.txt create mode 100644 evidence/research-20261029-pool/deployment-saturation64-20261029112756.json create mode 100644 evidence/research-20261029-pool/deployment-saturation8-20261029112615.json create mode 100644 evidence/research-20261029-pool/deployment-single32a-20261029113131.json create mode 100644 evidence/research-20261029-pool/deployment-single32b-20261029113452.json create mode 100644 evidence/research-20261029-pool/deployment-single8a-20261029112953.json create mode 100644 evidence/research-20261029-pool/deployment-single8b-20261029113315.json create mode 100644 evidence/research-20261029-pool/load-saturation64-20261029112756.json create mode 100644 evidence/research-20261029-pool/load-saturation64-20261029112756.txt create mode 100644 evidence/research-20261029-pool/load-saturation8-20261029112615.json create mode 100644 evidence/research-20261029-pool/load-saturation8-20261029112615.txt create mode 100644 evidence/research-20261029-pool/load-single32a-20261029113131.json create mode 100644 evidence/research-20261029-pool/load-single32a-20261029113131.txt create mode 100644 evidence/research-20261029-pool/load-single32b-20261029113452.json create mode 100644 evidence/research-20261029-pool/load-single32b-20261029113452.txt create mode 100644 evidence/research-20261029-pool/load-single8a-20261029112953.json create mode 100644 evidence/research-20261029-pool/load-single8a-20261029112953.txt create mode 100644 evidence/research-20261029-pool/load-single8b-20261029113315.json create mode 100644 evidence/research-20261029-pool/load-single8b-20261029113315.txt create mode 100644 evidence/research-20261029-pool/nodes.txt create mode 100644 evidence/research-20261029-pool/pods-saturation64-20261029112756.txt create mode 100644 evidence/research-20261029-pool/pods-saturation8-20261029112615.txt create mode 100644 evidence/research-20261029-pool/pods-single32a-20261029113131.txt create mode 100644 evidence/research-20261029-pool/pods-single32b-20261029113452.txt create mode 100644 evidence/research-20261029-pool/pods-single8a-20261029112953.txt create mode 100644 evidence/research-20261029-pool/pods-single8b-20261029113315.txt create mode 100644 evidence/research-20261029-pool/profiles.csv create mode 100644 evidence/research-20261029-pool/readiness-events.json create mode 100644 evidence/research-20261029-pool/resources-saturation64-20261029112756.txt create mode 100644 evidence/research-20261029-pool/resources-saturation8-20261029112615.txt create mode 100644 evidence/research-20261029-pool/resources-single32a-20261029113131.txt create mode 100644 evidence/research-20261029-pool/resources-single32b-20261029113452.txt create mode 100644 evidence/research-20261029-pool/resources-single8a-20261029112953.txt create mode 100644 evidence/research-20261029-pool/resources-single8b-20261029113315.txt create mode 100644 evidence/research-20261029-pool/restore-values.yaml create mode 100644 evidence/research-20261029-pool/restore.txt create mode 100644 evidence/research-20261029-pool/rollout-saturation64.txt create mode 100644 evidence/research-20261029-pool/rollout-saturation8.txt create mode 100644 evidence/research-20261029-pool/rollout-single32a.txt create mode 100644 evidence/research-20261029-pool/rollout-single32b.txt create mode 100644 evidence/research-20261029-pool/rollout-single8a.txt create mode 100644 evidence/research-20261029-pool/rollout-single8b.txt create mode 100644 evidence/research-20261029-pool/source.sha256 create mode 100644 evidence/research-20261029-readiness/README.md create mode 100644 evidence/research-20261029-readiness/base-revision.txt create mode 100644 evidence/research-20261029-readiness/date.txt create mode 100644 evidence/research-20261029-readiness/deployment-probe2a-20261029113757.json create mode 100644 evidence/research-20261029-readiness/deployment-probe2b-20261029114146.json create mode 100644 evidence/research-20261029-readiness/deployment-probe5a-20261029113950.json create mode 100644 evidence/research-20261029-readiness/deployment-probe5b-20261029114403.json create mode 100644 evidence/research-20261029-readiness/load-probe2a-20261029113757.json create mode 100644 evidence/research-20261029-readiness/load-probe2a-20261029113757.txt create mode 100644 evidence/research-20261029-readiness/load-probe2b-20261029114146.json create mode 100644 evidence/research-20261029-readiness/load-probe2b-20261029114146.txt create mode 100644 evidence/research-20261029-readiness/load-probe5a-20261029113950.json create mode 100644 evidence/research-20261029-readiness/load-probe5a-20261029113950.txt create mode 100644 evidence/research-20261029-readiness/load-probe5b-20261029114403.json create mode 100644 evidence/research-20261029-readiness/load-probe5b-20261029114403.txt create mode 100644 evidence/research-20261029-readiness/nodes.txt create mode 100644 evidence/research-20261029-readiness/pods-probe2a-20261029113757.txt create mode 100644 evidence/research-20261029-readiness/pods-probe2b-20261029114146.txt create mode 100644 evidence/research-20261029-readiness/pods-probe5a-20261029113950.txt create mode 100644 evidence/research-20261029-readiness/pods-probe5b-20261029114403.txt create mode 100644 evidence/research-20261029-readiness/profiles.csv create mode 100644 evidence/research-20261029-readiness/resources-probe2a-20261029113757.txt create mode 100644 evidence/research-20261029-readiness/resources-probe2b-20261029114146.txt create mode 100644 evidence/research-20261029-readiness/resources-probe5a-20261029113950.txt create mode 100644 evidence/research-20261029-readiness/resources-probe5b-20261029114403.txt create mode 100644 evidence/research-20261029-readiness/restore-values.yaml create mode 100644 evidence/research-20261029-readiness/restore.txt create mode 100644 evidence/research-20261029-readiness/rollout-probe2a.txt create mode 100644 evidence/research-20261029-readiness/rollout-probe2b.txt create mode 100644 evidence/research-20261029-readiness/rollout-probe5a.txt create mode 100644 evidence/research-20261029-readiness/rollout-probe5b.txt create mode 100644 evidence/research-20261029-readiness/source.sha256 create mode 100644 evidence/research-20261029-readiness/values-probe5b-20261029114403.json create mode 100644 evidence/research-20261029/README.md create mode 100644 evidence/research-20261029/base-revision.txt create mode 100644 evidence/research-20261029/dataset-during.txt create mode 100644 evidence/research-20261029/date.txt create mode 100644 evidence/research-20261029/deployment-fixed4.json create mode 100644 evidence/research-20261029/load-fixed1-20261029105633.json create mode 100644 evidence/research-20261029/load-fixed1-20261029105633.txt create mode 100644 evidence/research-20261029/load-fixed2-20261029105833.json create mode 100644 evidence/research-20261029/load-fixed2-20261029105833.txt create mode 100644 evidence/research-20261029/load-fixed4-20261029110021.txt create mode 100644 evidence/research-20261029/nodes.txt create mode 100644 evidence/research-20261029/profiles.csv create mode 100644 evidence/research-20261029/readiness-events.json create mode 100644 evidence/research-20261029/resources-fixed1-20261029105633.txt create mode 100644 evidence/research-20261029/resources-fixed2-20261029105833.txt create mode 100644 evidence/research-20261029/resources-fixed4-20261029110021.txt create mode 100644 evidence/research-20261029/restore-values.yaml create mode 100644 evidence/research-20261029/restore.txt create mode 100644 evidence/research-20261029/rollout-fixed1.txt create mode 100644 evidence/research-20261029/rollout-fixed2.txt create mode 100644 evidence/research-20261029/rollout-fixed4.txt create mode 100644 evidence/research-20261029/source.sha256 create mode 100644 evidence/research-20261029/values-fixed1.json create mode 100644 evidence/research-20261029/values-fixed2.json create mode 100644 evidence/review-20261029/413-body.json create mode 100644 evidence/review-20261029/413-headers.txt create mode 100644 evidence/review-20261029/README.md create mode 100644 evidence/review-20261029/body-limit.txt create mode 100644 evidence/review-20261029/both-replicas.txt create mode 100644 evidence/review-20261029/build.txt create mode 100644 evidence/review-20261029/contract.txt create mode 100644 evidence/review-20261029/coverage-per-file.json create mode 100644 evidence/review-20261029/coverage.txt create mode 100644 evidence/review-20261029/deploy.txt create mode 100644 evidence/review-20261029/failover-1-20261029105415-delete.txt create mode 100644 evidence/review-20261029/failover-1-20261029105415-run.txt create mode 100644 evidence/review-20261029/failover-1-20261029105415-stop-epoch.txt create mode 100644 evidence/review-20261029/failover-1-20261029105415-summary.json create mode 100644 evidence/review-20261029/failover-1-20261029105415-target.json create mode 100644 evidence/review-20261029/failover-2-20261029105524-delete.txt create mode 100644 evidence/review-20261029/failover-2-20261029105524-restored.txt create mode 100644 evidence/review-20261029/failover-2-20261029105524-run.txt create mode 100644 evidence/review-20261029/failover-2-20261029105524-stop-epoch.txt create mode 100644 evidence/review-20261029/failover-2-20261029105524-summary.json create mode 100644 evidence/review-20261029/failover-2-20261029105524-target.json create mode 100644 evidence/review-20261029/final-deployment.json create mode 100644 evidence/review-20261029/final-rollout.txt create mode 100644 evidence/review-20261029/final-smoke-retry.txt create mode 100644 evidence/review-20261029/final-smoke.txt create mode 100644 evidence/review-20261029/go-version.txt create mode 100644 evidence/review-20261029/helm-lint.txt create mode 100644 evidence/review-20261029/helm-version.txt create mode 100644 evidence/review-20261029/image.json create mode 100644 evidence/review-20261029/initial-api.json create mode 100644 evidence/review-20261029/kubernetes-version.json create mode 100644 evidence/review-20261029/lint.txt create mode 100644 evidence/review-20261029/load-failover-1-20261029105415.txt create mode 100644 evidence/review-20261029/load-failover-2-20261029105524.txt create mode 100644 evidence/review-20261029/resources-failover-1-20261029105415.txt create mode 100644 evidence/review-20261029/resources-failover-2-20261029105524.txt create mode 100644 evidence/review-20261029/smoke-after.txt create mode 100644 evidence/review-20261029/smoke.txt create mode 100644 evidence/review-20261029/targets.txt create mode 100644 evidence/review-20261029/vet.txt create mode 100644 internal/controller/http/fiber/body_limit_test.go create mode 100644 scripts/plot-research.py create mode 100755 scripts/sample-admission.sh create mode 100644 scripts/summarize-failover.rb create mode 100755 scripts/test-both-replicas.sh create mode 100644 student-tests/load/failover.js diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 6bc38b40..b87a772b 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -13,3 +13,7 @@ Traefik Ingress hl.agapov.space направляет запросы в Service a Один namespace `highload-applications`; существующий release lab2 обновляется на реализацию lab3. Имена api/postgres/valkey, три шарда, PVC и пароль БД сохраняются. Один LB, PostgreSQL и координатор Valkey остаются точками отказа; трек отказа узла не заявляется. Источники: [HPA](https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/), [metrics-server](https://github.com/kubernetes-sigs/metrics-server), [PostgreSQL locking](https://www.postgresql.org/docs/17/explicit-locking.html). + +Ошибки парсера Fiber (например превышение BodyLimit) могут возникать до middleware. Общий handleErr самостоятельно устанавливает X-Instance-Id и при необходимости создаёт X-Request-Id; поэтому контракт заголовков не зависит от того, был ли вызван route handler. + +Параметры readiness вынесены в api.readiness для воспроизводимого A/B. Штатные timeoutSeconds=2 и failureThreshold=2 сохранены: эксперимент с 5 с / 1 ошибкой не подтвердил устойчивого выигрыша. Необязательный api.nodeSelector используется только для контроля аппаратной платформы эксперимента; в рабочем релизе его нет. diff --git a/REPORT.md b/REPORT.md index 5786df16..f0a9a06c 100644 --- a/REPORT.md +++ b/REPORT.md @@ -6,7 +6,7 @@ Основной стенд: Kubernetes dev, namespace highload-applications, существующий release lab2. Публичная точка входа: https://hl.agapov.space через установленный Traefik. TLS: cert-manager ClusterIssuer letsencrypt-prod. PostgreSQL и три Valkey сохраняют прежние PVC. Новый release lab3 не требуется. -Нужны Helm, kubectl, Docker buildx, jq, OpenSSL, curl. Для проверки: Go 1.26.1+, golangci-lint; Python 3 используется только публичными тестами преподавателя. В кластере нужны Traefik, cert-manager, default StorageClass и metrics-server. Образы PostgreSQL 17.6-alpine, Valkey 8.1.3-alpine, k6 1.3.0 закреплены в chart. +Нужны Helm, kubectl, Docker buildx, jq, OpenSSL, curl. Для проверки: Go 1.26.1+, golangci-lint; Python 3 используется публичными тестами и построением графиков (matplotlib); управление стендом — shell/Helm. В кластере нужны Traefik, cert-manager, default StorageClass и metrics-server. Образы PostgreSQL 17.6-alpine, Valkey 8.1.3-alpine, k6 1.3.0 закреплены в chart. ```sh make init @@ -34,22 +34,21 @@ make deploy IMAGE_DIGEST="$(jq -r '."containerimage.digest"' evidence/image-buil [Архитектура](ARCHITECTURE.md) описывает readiness, graceful shutdown и HPA. Подготовлены [scrape](infra/monitoring/prometheus-scrape.yaml) и [dashboard](infra/monitoring/grafana-dashboard.json); импорт в Grafana не заявляется. -## Проверки +## Проверки исправлений 29.10.2026 -Актуальные результаты обновления release сохраняются в evidence/shared-*. Старые файлы без этого префикса, кроме заново полученного coverage, относятся к прежнему экспериментальному стенду и не доказывают текущую конфигурацию. +- 413 при превышении BodyLimit содержит X-Instance-Id и согласованный X-Request-Id. Проверены настоящий TCP listener и публичный HTTPS: [результаты](evidence/review-20261029/README.md). +- Последовательно остановлены обе исходные API: восстановление 0.190 с и 2.547 с, подтверждённые сообщения и прежние сессии сохранены. Краткие ошибки операций (5 и 7) измерены, а не скрыты. Имена/UID целей, события записи и Kubernetes delete сохранены. +- После восстановления публичный smoke прошёл. Race, интеграционные PostgreSQL/Valkey и настоящий процесс/SIGTERM прошли; каждый из 59 исполняемых Go-файлов имеет не менее 90% покрытия. Lint, vet и контракт проверены. +- Исследование масштабирования, насыщение и повторные A/B описаны в [RESEARCH](docs/RESEARCH.md). Таблицы и графики получены из raw k6, фактические replicas проверены по Deployment. Несостоявшиеся и некорректные прогоны исключены с сохранением причин. -make coverage выполняется с изолированными PostgreSQL/Valkey (переменные в CI): race, интеграционные проверки, реальный процесс, SIGTERM и порог 90% на каждый файл. scripts/test-faults.sh создаёт одноразовые Docker-зависимости, останавливает и замораживает БД/Valkey, проверяет 503 и отсутствие анонимного доступа. +Ранее подтверждённые конкурентная идемпотентность, persistence и stop/pause PostgreSQL/Valkey находятся в evidence/shared-*. Это исторические проверки 16.10.2026, а не новые прогоны. Файлы старых экспериментальных стендов не заменяют свежие доказательства. -## Исследование и ограничения +## Ограничения -Трек 5.1: scripts/experiment.sh сравнивает 1/2/4 API при фиксированном суммарном бюджете 1000m CPU / 512Mi и растущем бюджете по 250m / 128Mi на реплику. HPA временно отключается и восстанавливается. Профиль: 16 пользователей, 32 VU, 5 с прогрева, 30 с измерения; запись, чтение и повтор ключа. Сохраняются raw k6 и ресурсы. Полный трек требует матрицы, анализа насыщения и подтверждённого улучшения; наличие сценария не заменяет измерения. +Используется Kubernetes вместо перечисленных в задании Compose/Swarm; принятие этой замены преподавателем отдельно не подтверждено. PostgreSQL и Valkey не реплицированы: отказ узла с локальным PVC не покрывается. Метрики и подготовленный dashboard не означают, что Grafana настроена. -Задание перечисляет Compose/Swarm; принятие Kubernetes как замены преподавателем не подтверждено. PostgreSQL и Valkey не реплицированы: потеря узла с локальным диском не покрывается. Оценка не заявляется как полученная. +Результаты получены на общем dev-кластере с неоднородными нодами и сетевыми сбоями. Пределы и исключённые точки указаны в исследовании; оценку определяет преподаватель. -Источники: README, COURSE, contracts этого репозитория; собственная lab2. Codex использован для реализации, проверки и документации. +Источники: README, COURSE, contracts текущей лабораторной, собственная lab2. Codex использован для реализации, проверки и документации. -Свежий прогон 16.10.2026: Go test/vet/lint прошли; race/integration/coverage — 59 файлов, минимум 90%. Публичный HTTPS smoke прошёл. Первый failover: 48 записей, 0 неудачных попыток, восстановление 0.801 с. Повторный запуск получил внешний connection/TLS timeout до остановки pod; сохранён отдельно, не считается PASS. - -Конкурентная идемпотентность через HTTPS: 8 VU / 32 операции, 34/34 checks, ровно одно сообщение, другой body — конфликт. В процессе были 5 транзиентных неуспешных HTTP из 41; повторы выполнялись с исходным ключом. Полный рестарт API/PostgreSQL/Valkey прошёл: исходная сессия и сообщение сохранились, PVC неизменны. Реальные stop/pause PostgreSQL и Valkey на одноразовом стенде прошли: 503, отсутствие анонимного доступа, восстановление прежней сессии и сообщения. - -Rolling update проверен под нагрузкой 4 VU, 5 с прогрева и 20 с измерения. Deployment заменён успешно; 308 подтверждённых сообщений из 317 попыток записи (15.4 подтверждения/с в измеряемые 20 с). Всего 17 ошибок операций, включая чтения/повторы; 1040 из 1057 checks успешны, p95 записи 107.5 мс, p99 3036.5 мс. Это проверка с измеренными краткими ошибками, а не бесшовное обновление без ошибок. Raw: evidence/load-rolling-20261016.json, выборки: evidence/resources-rolling-20261016.txt. Сценарий не доказывает полную сохранность каждой записи после rolling update; она отдельно проверена persistence/failover-тестами. +Финальная проверка после всех экспериментов: rollout завершился, но два внешних smoke получили connection/TLS failure. Их логи сохранены в evidence/review-20261029/final-smoke*.txt. Успешный smoke-after относится к более раннему состоянию после проверки обоих отказов; текущая стабильность внешнего доступа не подтверждена. diff --git a/charts/messenger/templates/api.yaml b/charts/messenger/templates/api.yaml index 2f093250..4f61f62c 100644 --- a/charts/messenger/templates/api.yaml +++ b/charts/messenger/templates/api.yaml @@ -49,6 +49,10 @@ spec: labels: app: api spec: + {{- with .Values.api.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} imagePullSecrets: - name: {{ .Values.imagePullSecret }} terminationGracePeriodSeconds: 20 @@ -101,8 +105,8 @@ spec: periodSeconds: 2 failureThreshold: 30 readinessProbe: - timeoutSeconds: 2 - failureThreshold: 2 + timeoutSeconds: {{ .Values.api.readiness.timeoutSeconds }} + failureThreshold: {{ .Values.api.readiness.failureThreshold }} httpGet: path: /health/ready port: 8080 diff --git a/charts/messenger/templates/load.yaml b/charts/messenger/templates/load.yaml index 29f4f0e4..b9a5f133 100644 --- a/charts/messenger/templates/load.yaml +++ b/charts/messenger/templates/load.yaml @@ -20,6 +20,8 @@ spec: env: - name: BASE_URL value: "https://{{ .Values.ingress.host }}" + - name: TARGET_INSTANCE_ID + value: {{ .Values.load.target | default "" | quote }} - name: DURATION value: {{ .Values.load.duration | quote }} - name: VUS diff --git a/charts/messenger/values.yaml b/charts/messenger/values.yaml index b3c55967..bfb3a0c9 100644 --- a/charts/messenger/values.yaml +++ b/charts/messenger/values.yaml @@ -1,10 +1,13 @@ # Existing lab2 release; shared persistent stores and credentials. image: repository: asisti.registry.twcstorage.ru/mtusi2026lab3 - digest: sha256:a73799010550ab2008b984ed9d0bfa8dfdd9bb963cb948bc91713748b24c3889 + digest: sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 imagePullSecret: registry-pull databaseSecret: messenger-secrets api: + readiness: + timeoutSeconds: 2 + failureThreshold: 2 replicas: 2 resources: requests: {cpu: 250m, memory: 128Mi} diff --git a/docs/DEFENSE.md b/docs/DEFENSE.md index c0077ea7..1b3c46ce 100644 --- a/docs/DEFENSE.md +++ b/docs/DEFENSE.md @@ -19,6 +19,8 @@ make test make test-failover ACTION_SCRIPT=scripts/stop-one.sh ``` -Первый успешный failover: 48 записей, 0 ошибок, восстановление 0.801 секунды, сессия и сообщения сохранены. Актуальные другие результаты находятся в evidence/shared-*; не выдавать повтор с сетевым timeout за успешный. +29.10 последовательно остановлены обе исходные API: восстановление 0.190 и 2.547 секунды, подтверждённые сообщения сохранены. Сценарий: scripts/test-both-replicas.sh. Ответ 413 теперь тоже содержит X-Instance-Id. -Ограничения: PostgreSQL и Valkey не реплицированы, hostpath PVC зависит от узла. Полный исследовательский трек на 5 ещё требует матрицы 1/2/4, доказанного насыщения и улучшения; один HPA его не заменяет. Kubernetes вместо Compose/Swarm требует принятия преподавателем. +Исследование: полная матрица 1/2/4 API при фиксированном и растущем бюджете. При фиксированном CPU дополнительные процессы не дали ускорения. Заполнены все 32 глобальных admission-слота. Удвоение ресурсов двух API повысило полезный RPS в обоих повторах, но один прогон дал много 503: рост пропускной способности не означает устойчивость. Числа, графики и ограничения — в [исследовании](RESEARCH.md). + +Ограничения: PostgreSQL и Valkey не реплицированы, hostpath PVC зависит от узла. Kubernetes вместо Compose/Swarm требует принятия преподавателем. diff --git a/docs/PLAN.md b/docs/PLAN.md index b2850db8..d7287e3d 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -2,11 +2,11 @@ | Требования | Работа | Статус | | --- | --- | --- | -| L3-01–04 | База lab2, идемпотентность, cursor, отдельная миграция | Реализовано; базовый коммит a57cbcf опубликован | -| L3-05–07,10 | Release lab2, Traefik hl.agapov.space, TLS, HPA | Применено; две реплики готовы, сертификат Ready; evidence/shared-state.txt | -| L3-09 | Go test/vet/lint, race/integration/coverage | test/vet/lint и race/integration/coverage прошли: 59 файлов, минимум 90% | -| L3-01,02,05 | Smoke, concurrent retry, failover, persistence, rolling update | Актуальные результаты в evidence/shared-* | -| L3-08 | Матрица, насыщение, подтверждённое улучшение | Полный трек не завершён | +| L3-01–04 | База lab2, идемпотентность, cursor, миграция | Реализовано; прежние проверки отделены в REPORT | +| L3-01 | X-Instance-Id для раннего 413 | Исправлено; регрессия на TCP listener и публичный HTTPS | +| L3-05 | Последовательный отказ обеих исходных API | Проверено 29.10; recovery 0.190/2.547 с; evidence/review-20261029 | +| L3-05–07,10 | Release lab2, Traefik, TLS, HPA | Существующий release обновлён, штатные values восстановлены после исследования | +| L3-08 | Матрица, графики, насыщение и улучшение | Измерены шесть точек и повторный A/B; вырос полезный RPS, устойчивость не подтверждена. См. RESEARCH | +| L3-09 | Race/integration/coverage, lint, vet, контракт | Пройдены; 59 исполняемых файлов с покрытием не менее 90% | -Проверки: shared-smoke PASS, shared-failover-1 PASS, shared-persistence PASS, shared-dependency-faults PASS. Concurrent retry: 34/34 checks, один Message через две реплики. Два повторных внешних failover-прогона завершились timeout до action; последовательная остановка каждой исходной реплики ещё не подтверждена. -Rolling update выполнен под короткой нагрузкой: 308 подтверждённых сообщений, 17 ошибок операций, обновление завершилось; raw в evidence/load-rolling-20261016.json. Полный исследовательский трек остаётся незавершённым. +Свежие доказательства и ограничения: [REPORT](../REPORT.md), [исследование](RESEARCH.md). Исторические persistence, concurrent retry и rolling update не выдаются за повторные проверки 29.10. Принятие Kubernetes как замены учебного стенда и итоговая оценка остаются за преподавателем. diff --git a/docs/RESEARCH.md b/docs/RESEARCH.md new file mode 100644 index 00000000..5b231263 --- /dev/null +++ b/docs/RESEARCH.md @@ -0,0 +1,77 @@ +# Цена масштабирования: измерения 29.10.2026 + +## Методика + +Гипотеза: рост числа API при неизменном суммарном бюджете не гарантирует рост полезного RPS. Ограничениями могут стать CPU каждой реплики, пулы зависимостей, общий пул admission, сеть и доступность backend для Traefik. + +Основная матрица: 1/2/4 API, фиксированный общий бюджет 1000m CPU / 512Mi RAM; затем растущий бюджет по 250m / 128Mi на API. Requests равны limits во время измерений. PostgreSQL, три Valkey и Traefik не масштабируются; HPA отключён. GOMEMLIMIT=80MiB, pool=8. Существующие PVC сохраняются. + +Профиль k6 1.3.0: 16 синтетических пользователей с отдельными чатами, 32 VU, 5 секунд прогрева, 5 секунд дренирования, 30 секунд измерения. Итерация отправляет сообщение и читает историю; каждый десятый подтверждённый POST повторяется с тем же ключом. Подготовка может заново создать синтетического участника после временного отказа; эти операции исключены из измеряемых счётчиков. Частично подготовленные данные не используются в нагрузке. + +Полезный RPS = confirmed_messages / 30, а не общий http_reqs, включающий setup и быстрые отказы. Доля ошибок = application_errors / measured_operations. p50/p95/p99 относятся ко всем попыткам записи; низкая задержка при большом числе быстрых 503 не считается улучшением. События, CPU/RAM и ожидания PostgreSQL сохранены отдельно. + +## Контроль конфигурации + +Перед первой сменой replicas HPA удаляется отдельным Helm-обновлением. После завершения возможной текущей reconciliation задаётся профиль. До Job проверяется соответствие spec.replicas ожидаемому значению. Deployment, Helm values и pod/node snapshot сохраняются. Анализатор исключает прежние прогоны с несовпадением числа реплик, отсутствующим измерением или нарушенной изоляцией смены конфигурации. + +Основная матрица использует штатное распределение API по нодам; восстановленная точка growing1 закреплена на dev.asisti.tech. Ноды неоднородны, поэтому матрица описывает этот dev-стенд, а не чистый эффект числа процессов. Дополнительные A/B выполняются на одной ноде с неизменными зависимостями, образом и сценарием. + +## Насыщение + +В серии 64 VU зафиксировано заполнение всех 32 глобальных admission-слотов. Дополнительные запросы конкурируют за ограниченный общий бюджет, а не получают отдельную ёмкость при добавлении API. Readiness-события показывают также временное исключение backend; мгновенные 503 от LB способны увеличить общий http_reqs при падении полезной пропускной способности. + +Это измеренное насыщение пула допуска запросов и доступности backend. Предел CPU PostgreSQL по редким выборкам не установлен: наблюдение свободного CPU не исключает ожидания сети, диска или соединений. Изменение общего параметра pool одновременно влияет на pgxpool и Valkey; отдельный вклад этих пулов не выделен. + +## Проверенные альтернативы + +- Pool 8 → 32: повторные замеры неоднородны, отдельный прирост RPS сопровождался большой долей ошибок. Устойчивое улучшение не подтверждено, штатный pool=8 сохранён. +- Readiness 2 с / 2 ошибки → 5 с / 1 ошибка: проверка зависимостей может последовательно занять до 4 секунд, но изменение probe не устранило реальные отказы/нестабильность. Устойчивое улучшение не подтверждено; штатные 2/2 сохранены. +- Ресурсный бюджет двух API: отдельный A/B/A/B при одинаковой ноде, pool=8 и 32 VU сравнивает по 250m/128Mi и по 500m/256Mi. Результаты приведены в итоговой таблице ниже. + +## Результаты + +| Профиль | API | CPU/RAM на API | Полезный RPS | Ошибки, % | p95 записи, мс | +| --- | ---: | --- | ---: | ---: | ---: | +| fixed1 | 1 | 1000m / 512Mi | 141.40 | 0.00 | 221.84 | +| fixed2 | 2 | 500m / 256Mi | 124.17 | 0.46 | 172.74 | +| fixed4 | 4 | 250m / 128Mi | 92.77 | 0.17 | 579.48 | +| growing1 | 1 | 250m / 128Mi | 37.77 | 61.95 | 400.90 | +| growing2 | 2 | 250m / 128Mi | 39.93 | 73.19 | 347.85 | +| growing4 | 4 | 250m / 128Mi | 77.30 | 0.00 | 800.67 | +| saturation8 | 1 | 1000m / 512Mi | 66.93 | 0.00 | 119.67 | +| saturation64 | 1 | 1000m / 512Mi | 108.20 | 41.27 | 371.87 | +| resource-low-a | 2 | 250m / 128Mi | 42.70 | 4.46 | 474.74 | +| resource-high-a | 2 | 500m / 256Mi | 109.00 | 72.94 | 165.90 | +| resource-low-b | 2 | 250m / 128Mi | 38.80 | 1.00 | 427.35 | +| resource-high-b | 2 | 500m / 256Mi | 170.30 | 0.00 | 150.96 | + +Полные p50/p95/p99, CPU/RAM, ошибки и ссылки на исходные серии: [summary.csv](../evidence/research-20261029-final/summary.csv). Единый источник чисел — этот CSV. + +![Матрица масштабирования](../evidence/research-20261029-final/matrix.png) + +![Все принятые эксперименты](../evidence/research-20261029-final/results.png) + +При фиксированном бюджете увеличение числа процессов снизило полезный RPS с 141.40 до 92.77; дробление CPU не создало дополнительных ресурсов. При растущем бюджете RPS вырос с 37.77 до 77.30, но ошибки двух первых точек не позволяют считать это устойчивой линейной масштабируемостью. + +**Подтверждённое улучшение пропускной способности:** при двух API удвоение ресурсов каждой реплики повысило полезный RPS с 42.70 до 109.00 (2.55 раза) и с 38.80 до 170.30 (4.39 раза). Средние двух повторов — 40.75 и 139.65 RPS (3.43 раза). Это рост подтверждённых записей, а не числа быстрых отказов. Однако первый high-прогон дал 72.94% ошибок; улучшение надёжности под нагрузкой не подтверждено. Низкий p95 этого прогона частично объясняется быстрыми 503. Поэтому повышенный бюджет — проверенный способ увеличить полезную пропускную способность на данном стенде, но не доказательство выполнения SLO. Штатные requests/limits после эксперимента восстановлены. + +При 8 VU получено 66.93 RPS без ошибок, при 64 VU — 108.20 RPS и 41.27% ошибок. Нагрузка выросла восьмикратно, полезный RPS — только в 1.62 раза; наблюдение 32 занятых admission-слотов подтверждает ограничение общей ёмкости. Эти точки сняты в разное время; они не определяют точный порог насыщения. + +## Исходные данные и воспроизведение + +Основные принятые источники: evidence/research-20261029-final, evidence/research-20261029-pool, evidence/research-20261029-readiness, evidence/research-20261029-budget. summary.csv содержит источник каждой строки; excluded.json перечисляет автоматически исключённые точки. Исключённые прогоны и причины остаются в соответствующих README/логах. + +```sh +EVIDENCE_DIR=evidence/new-matrix scripts/experiment.sh +EVIDENCE_DIR=evidence/new-budget BENCHMARK_NODE=dev.asisti.tech \ + PROFILES='resource-low-a resource-high-a resource-low-b resource-high-b' scripts/experiment.sh +python3 scripts/plot-research.py evidence/new-matrix evidence/new-budget +``` + +Для графиков: Python 3 и matplotlib 3.10.8. Управление стендом выполняют shell, Helm и kubectl. scripts/sample-admission.sh наблюдает слоты без изменения данных. Нужны также jq, rg, Ruby 2.6+ для отчёта отказов. Helm 4 использует client-side apply во время исследований; force-replace не применяется. После каждого запуска восстанавливаются исходные values и HPA. + +## Ограничения + +Общий dev-кластер не изолирован от другой нагрузки; публичный путь включает сеть и Traefik. Есть измеренные сетевые/TLS-сбои и readiness-flapping. Короткие прогоны не дают статистической гарантии; повторный A/B служит проверкой направления эффекта, не доверительным интервалом. Новые чаты одинаково пусты в начале, но общий объём БД растёт; чужие/старые записи не удаляются. + +CPU/RAM — выборки kubectl top примерно раз в 5 секунд за весь Job, включая setup и прогрев, а не точное профилирование измерительного окна. Анализатор исключает старые API и load-поды из других прогонов, когда есть pod snapshot. PostgreSQL active включает наблюдающий запрос. Эти выборки не заменяют CPU-throttling, I/O или pgxpool wait histograms. CPU CFS quota на dev.asisti.tech включена, период 100ms. diff --git a/docs/SPEC.md b/docs/SPEC.md index bf8c7a25..0ce6cbf0 100644 --- a/docs/SPEC.md +++ b/docs/SPEC.md @@ -16,3 +16,21 @@ | L3-10 | Timeweb Cloud Registry: токен из локального файла, Docker login через stdin, Kubernetes imagePullSecret; секреты не попадают в Git или Helm values; образ фиксируется digest | Вне объёма: HA PostgreSQL и Valkey, отказ чужих узлов, развёртывание Grafana, реализация lab4+. Секреты не хранятся в Git. Эксперименты затрагивают учебный release lab2, обновлённый реализацией lab3. HPA отключается на время контролируемого сравнения реплик; после эксперимента возвращается. + +## Приёмка исправлений 29.10.2026 + +- L3-01: ошибки HTTP-парсера до middleware, включая 413, содержат стабильный X-Instance-Id и согласованный X-Request-Id. Проверка настоящим HTTP-запросом с превышением BodyLimit. +- L3-05: сохранить исходные имена/UID двух API; остановить каждую отдельно, восстановив две готовые реплики между отказами. Проверять через Traefik чтение, запись, повтор ключа и сохранность подтверждений; сохранить ошибки и время восстановления. +- L3-08: одинаковый профиль для шести конфигураций, ограниченный прогрев и измерение, отдельные счётчики успешных операций/ошибок/latency, CPU/RAM и ожидания PostgreSQL. Дополнительная серия интенсивности выявляет предел, A/B проверяет одно изменение при равных ресурсах. Нулевые и отрицательные результаты публикуются без подмены прогнозом. + +Методика L3-08: 16 синтетических пользователей с отдельными чатами, 32 VU; 5 секунд прогрева, 5 секунд дренирования, 30 секунд измерения без graceful-продления нагрузки. Сравнение fixed1/2/4 и growing1/2/4; затем 8/64 VU на четырёх репликах. Гипотеза улучшения: увеличение ограниченного пула зависимостей 8 → 32 уменьшит ожидание при неизменных CPU/RAM; проверка A/B/A/B, отрицательный результат также сохраняется. Данные каждого профиля — новые отдельные чаты без очистки чужих записей. + +Уточнение методики после неуспешного setup fixed4: подготовка допускает до пяти попыток на синтетического участника, каждый раз с новым именем; частично подготовленные участники не используются в нагрузке. Ошибки setup видны в raw log, измеряемые запросы не получают автоматических повторов (кроме предусмотренной проверки Idempotency-Key). Серии интенсивности и A/B пула проводятся на одной API с 1000m/512Mi, чтобы проверить именно ограничение пула 8 против 32; fixed1 служит первым A, далее B/A/B. Шесть основных профилей заново измеряются с одной версией workload. + +Контроль A/B: при необходимости повторов BENCHMARK_NODE=dev.asisti.tech фиксирует одну API на той же ноде для всех четырёх прогонов, сохраняя CPU/RAM, workload, БД и Valkey. В обычном развёртывании nodeSelector отсутствует; исходная конфигурация восстанавливается. Это устраняет смену аппаратной платформы как объяснение различия размеров пула. + +L3-05 / L3-08: проверка гипотезы readiness. PostgreSQL Ping и Valkey Ping используют отдельные последовательные бюджеты по 2 с, а прежняя readinessProbe имеет timeout 2 с. Сравнение A/B/A/B: 2 с / 2 ошибки против 5 с / 1 ошибка при неизменных 1 API, 1000m/512Mi, pool=8, 32 VU и ноде dev.asisti.tech. Новый вариант допускает завершение ограниченной проверки, сохраняя оценку обнаружения примерно до 7 с (период 2 + timeout 5), плюс распространение EndpointSlice. Выбор штатного варианта зависит от измерения и повторного failover. + +Контроль фактической конфигурации: HPA сначала отключается отдельным Helm-обновлением, затем завершается его возможная текущая reconciliation. До старта Job сравниваются ожидаемые replicas из Helm values и реальные spec.replicas Deployment. Несовпадение останавливает опыт. Анализатор также исключает ранее полученные прогоны с несовпадением; заданное значение в команде не считается доказательством фактического числа API. + +L3-08: подтверждение ресурсного улучшения проводится отдельным A/B/A/B на одной ноде: две API, pool=8, 32 VU, readiness 2 с / 2 ошибки; A — по 250m/128Mi, B — по 500m/256Mi. Меняется только бюджет API; PostgreSQL, Valkey, Traefik и сценарий одинаковые. Не считать увеличение connection pool или probe timeout улучшением, если успешный RPS вырос ценой большей доли ошибок. Штатные значения pool=8 и readiness 2/2 сохраняются. diff --git a/evidence/research-20261029-budget/README.md b/evidence/research-20261029-budget/README.md new file mode 100644 index 00000000..c3a8e361 --- /dev/null +++ b/evidence/research-20261029-budget/README.md @@ -0,0 +1,7 @@ +# Контролируемый бюджет, 29.10.2026 + +Команда: `EVIDENCE_DIR=evidence/research-20261029-budget BENCHMARK_NODE=dev.asisti.tech PROFILES='growing1 saturation8 resource-low-a resource-high-a resource-low-b resource-high-b' scripts/experiment.sh`. + +HPA отключён отдельным обновлением до смены replicas. Для каждого запуска сохранены Deployment и values; run-load проверяет ожидаемое число реплик. Все шесть точек имеют корректное число API. Прогоны последовательные, один образ, pool=8. После завершения штатные values восстановлены (restore.txt, release lab2 revision 40). + +source.sha256 фиксирует исходники запуска. Результаты и ограничения приведены в ../../docs/RESEARCH.md; агрегирование в соседнем research-20261029-final/summary.csv. Рост полезного RPS в A/B повторился, снижение ошибок — нет. Инфраструктурные ошибки не удалены из измерений. diff --git a/evidence/research-20261029-budget/base-revision.txt b/evidence/research-20261029-budget/base-revision.txt new file mode 100644 index 00000000..32abb9b4 --- /dev/null +++ b/evidence/research-20261029-budget/base-revision.txt @@ -0,0 +1 @@ +7b7e23fd029beea47e6f625a96cb98d2fe04bafb diff --git a/evidence/research-20261029-budget/date.txt b/evidence/research-20261029-budget/date.txt new file mode 100644 index 00000000..e4097551 --- /dev/null +++ b/evidence/research-20261029-budget/date.txt @@ -0,0 +1 @@ +2026-10-29T11:58:04Z diff --git a/evidence/research-20261029-budget/deployment-growing1-20261029115804.json b/evidence/research-20261029-budget/deployment-growing1-20261029115804.json new file mode 100644 index 00000000..5124874b --- /dev/null +++ b/evidence/research-20261029-budget/deployment-growing1-20261029115804.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "28", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 45, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60171652", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "250m", + "memory": "128Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:57:50Z", + "lastUpdateTime": "2026-10-29T11:57:50Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:58:08Z", + "message": "ReplicaSet \"api-577bffc7b\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 45, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-budget/deployment-resource-high-a-20261029121644.json b/evidence/research-20261029-budget/deployment-resource-high-a-20261029121644.json new file mode 100644 index 00000000..8a93f5b3 --- /dev/null +++ b/evidence/research-20261029-budget/deployment-resource-high-a-20261029121644.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "31", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 48, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60175422", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "500m", + "memory": "256Mi" + }, + "requests": { + "cpu": "500m", + "memory": "256Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T12:16:30Z", + "lastUpdateTime": "2026-10-29T12:16:30Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T12:16:52Z", + "message": "ReplicaSet \"api-54d5599c7b\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 48, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/research-20261029-budget/deployment-resource-high-b-20261029122017.json b/evidence/research-20261029-budget/deployment-resource-high-b-20261029122017.json new file mode 100644 index 00000000..78535428 --- /dev/null +++ b/evidence/research-20261029-budget/deployment-resource-high-b-20261029122017.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "33", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 50, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60176430", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "500m", + "memory": "256Mi" + }, + "requests": { + "cpu": "500m", + "memory": "256Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T12:20:01Z", + "lastUpdateTime": "2026-10-29T12:20:01Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T12:20:24Z", + "message": "ReplicaSet \"api-54d5599c7b\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 50, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/research-20261029-budget/deployment-resource-low-a-20261029121455.json b/evidence/research-20261029-budget/deployment-resource-low-a-20261029121455.json new file mode 100644 index 00000000..24d9ad48 --- /dev/null +++ b/evidence/research-20261029-budget/deployment-resource-low-a-20261029121455.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "30", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 47, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60174994", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "250m", + "memory": "128Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T12:15:09Z", + "lastUpdateTime": "2026-10-29T12:15:09Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T12:15:14Z", + "message": "ReplicaSet \"api-577bffc7b\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 47, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/research-20261029-budget/deployment-resource-low-b-20261029121833.json b/evidence/research-20261029-budget/deployment-resource-low-b-20261029121833.json new file mode 100644 index 00000000..f7fe22f9 --- /dev/null +++ b/evidence/research-20261029-budget/deployment-resource-low-b-20261029121833.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "32", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 49, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60175941", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "250m", + "memory": "128Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T12:18:25Z", + "lastUpdateTime": "2026-10-29T12:18:25Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T12:18:43Z", + "message": "ReplicaSet \"api-577bffc7b\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 49, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/research-20261029-budget/deployment-saturation8-20261029121309.json b/evidence/research-20261029-budget/deployment-saturation8-20261029121309.json new file mode 100644 index 00000000..ce10c133 --- /dev/null +++ b/evidence/research-20261029-budget/deployment-saturation8-20261029121309.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "29", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 46, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60174477", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T12:12:38Z", + "lastUpdateTime": "2026-10-29T12:12:38Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T12:13:16Z", + "message": "ReplicaSet \"api-84fbf9968\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 46, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-budget/disable-hpa.txt b/evidence/research-20261029-budget/disable-hpa.txt new file mode 100644 index 00000000..850c8a7e --- /dev/null +++ b/evidence/research-20261029-budget/disable-hpa.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:57:42 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 33 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-budget/load-growing1-20261029115804.json b/evidence/research-20261029-budget/load-growing1-20261029115804.json new file mode 100644 index 00000000..5d63ce80 --- /dev/null +++ b/evidence/research-20261029-budget/load-growing1-20261029115804.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "setup_data": [ + { + "chat": "9b417389-5ffb-4b55-89d4-4b44eb3c86f1", + "token": "mj4Dmi0RqqV1RTjGdIBf2cSgOkyeqzBFhTkR7sQID9Q" + }, + { + "chat": "b6b250df-02a3-4dd8-b9c7-35772b844654", + "token": "lVuGejLCguPVHAqBEGpbnOt0uUD-18hSA77S2VpfSKo" + }, + { + "chat": "a0d10970-e9f7-4d5e-b31e-c7760fd5501d", + "token": "4txkO49FyWWFsbC09SPANQ-r7TKypeuHsQ0AHBTbWKg" + }, + { + "chat": "d2b0029e-edc7-4d7d-aba8-d00e636795a7", + "token": "Me461ExRTt76-3jzUUJU6ipGx8EBDFrp4Dexiusn-7I" + }, + { + "chat": "17b76cbd-113e-4a57-a0c6-8b37903826c0", + "token": "-lX7fbA9RWv0xZaVkovZH5o-0hESAoAC4RfEEEbUpkA" + }, + { + "token": "rAxwvLIDz7Jt6W1r52A3wHVLA5NqSMMqPMpVappfbHI", + "chat": "31d30ba6-fc91-4b6b-bac3-282c1c54b3c5" + }, + { + "chat": "ebb987b0-0316-4df0-9ea0-427bbd91c11c", + "token": "KXwp_IoEs7d-duV6EoGVxpICm9kDQOrRhd8YjQ8BXGk" + }, + { + "token": "5LtzJoNoLTqwxuGxkh6hBw3Aq1_ORF-bMgY4XgT3f-M", + "chat": "db2ac4da-05ad-45f2-ad61-1f301890bf71" + }, + { + "chat": "be9fea05-36a8-4cdd-aa1c-ff2da5881f39", + "token": "5oXVcUceeS7cIyWO22EWDFv4OjiozbUukkwh6-FdE34" + }, + { + "chat": "3ab5dc1c-ba5c-4120-b72f-9be93c8e09ba", + "token": "_kuCCV_m4F-VRA3Q7M9Puae9pe3bfOlgD6oLxbeKxKI" + }, + { + "token": "qGptaVQ54z7eHbHhB9BPXd13dugSZ6jg74sjlr2RF_E", + "chat": "46aaab09-ed0d-4238-b778-28aa4325d6c2" + }, + { + "chat": "3b744ef2-dd7a-47ba-b05a-225995674bb9", + "token": "f7NvgCC12z-_GWcwupuMlEEH5p3XmOTsoglCCL-XGz8" + }, + { + "chat": "50966e79-a203-4255-9385-66d48c5ffb50", + "token": "ef79_V8IjqME-yCTGUO5WyZVYU2n9IuksXPkgrVmyvM" + }, + { + "chat": "85bc2af3-6303-4748-ae55-eea12d9247e9", + "token": "aYK851cmC2jYDgYRAjOqU5vjjfBprlbqVhf-bBjhw_s" + }, + { + "chat": "a467bc0a-86e2-48ed-8ae6-b3bd9a7de7da", + "token": "-bx-GIqCuXA8YgVw7I5UWQ3OE12X3CatR-V6X_r8fAA" + }, + { + "chat": "19090aa7-1ab7-46de-9d9d-678178dbabd7", + "token": "gvs9LtpeJlUob9cTBxrCpfkQJKI10u7_oIeWkAekOc4" + } + ], + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "passes": 1336, + "fails": 1947, + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e" + }, + { + "passes": 149, + "fails": 4, + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa" + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 1317, + "fails": 1947 + } + ] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 50700.779292 + }, + "metrics": { + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.4182089552238806, + "passes": 2802, + "fails": 3898 + } + }, + "application_errors{status:503}": { + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default", + "values": { + "count": 3897, + "rate": 76.86272389534852 + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 144.07987260023705, + "p(50)": 16.528008999999997, + "p(95)": 389.29778824999994, + "p(99)": 497.70713441, + "max": 9159.233298 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "rate": 64.37770869756675, + "count": 3264 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "rate": 22.346796554639436, + "count": 1133 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 3898, + "rate": 76.88244745806225 + } + }, + "failed_writes": { + "type": "counter", + "contains": "default", + "values": { + "count": 1947, + "rate": 38.401776603603686 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 497.10024959, + "max": 9156.518622, + "avg": 142.64434993775882, + "p(50)": 8.1193335, + "p(95)": 388.80872635 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 585179, + "rate": 11541.814705249206 + } + }, + "message_latency_ms": { + "contains": "time", + "values": { + "avg": 156.76337151785663, + "p(50)": 9.191468, + "p(95)": 400.90426964999995, + "p(99)": 515.0820838300001, + "max": 9075.971106 + }, + "type": "trend" + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "http_req_duration{expected_response:true}": { + "contains": "time", + "values": { + "p(99)": 601.6781475499987, + "max": 8073.096102, + "avg": 314.4811274036987, + "p(50)": 279.6986455, + "p(95)": 419.368238 + }, + "type": "trend" + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 6764, + "rate": 133.4101781955703 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.37589536191602296, + "p(50)": 0.000688, + "p(95)": 0.001273, + "p(99)": 0.004134719999999994, + "max": 950.975337 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 3080, + "rate": 60.748573158243126 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 37.74685, + "avg": 0.02312838571850976 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 239.484409, + "avg": 0.22270943598462445 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.5762862211709048, + "passes": 3898, + "fails": 2866 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 4195518, + "rate": 82750.5623895214 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "max": 32, + "value": 32, + "min": 32 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "max": 216.639188, + "avg": 1.201672609107039, + "p(50)": 0.2664335, + "p(95)": 3.857153799999995, + "p(99)": 24.95663570999991 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 296.96846638419083, + "p(50)": 28.244625, + "p(95)": 808.12144195, + "p(99)": 1222.6212108099976, + "max": 9457.513679 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 6292, + "rate": 124.10065659469667 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_sending": { + "contains": "time", + "values": { + "avg": 0.23385005337078663, + "p(50)": 0.1136735, + "p(95)": 0.3216075499999999, + "p(99)": 2.026604269999999, + "max": 65.394982 + }, + "type": "trend" + }, + "application_errors{status:429}": { + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter" + } + } + } +} diff --git a/evidence/research-20261029-budget/load-growing1-20261029115804.txt b/evidence/research-20261029-budget/load-growing1-20261029115804.txt new file mode 100644 index 00000000..9e71858b --- /dev/null +++ b/evidence/research-20261029-budget/load-growing1-20261029115804.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"setup_data":[{"chat":"9b417389-5ffb-4b55-89d4-4b44eb3c86f1","token":"mj4Dmi0RqqV1RTjGdIBf2cSgOkyeqzBFhTkR7sQID9Q"},{"chat":"b6b250df-02a3-4dd8-b9c7-35772b844654","token":"lVuGejLCguPVHAqBEGpbnOt0uUD-18hSA77S2VpfSKo"},{"chat":"a0d10970-e9f7-4d5e-b31e-c7760fd5501d","token":"4txkO49FyWWFsbC09SPANQ-r7TKypeuHsQ0AHBTbWKg"},{"chat":"d2b0029e-edc7-4d7d-aba8-d00e636795a7","token":"Me461ExRTt76-3jzUUJU6ipGx8EBDFrp4Dexiusn-7I"},{"chat":"17b76cbd-113e-4a57-a0c6-8b37903826c0","token":"-lX7fbA9RWv0xZaVkovZH5o-0hESAoAC4RfEEEbUpkA"},{"token":"rAxwvLIDz7Jt6W1r52A3wHVLA5NqSMMqPMpVappfbHI","chat":"31d30ba6-fc91-4b6b-bac3-282c1c54b3c5"},{"chat":"ebb987b0-0316-4df0-9ea0-427bbd91c11c","token":"KXwp_IoEs7d-duV6EoGVxpICm9kDQOrRhd8YjQ8BXGk"},{"token":"5LtzJoNoLTqwxuGxkh6hBw3Aq1_ORF-bMgY4XgT3f-M","chat":"db2ac4da-05ad-45f2-ad61-1f301890bf71"},{"chat":"be9fea05-36a8-4cdd-aa1c-ff2da5881f39","token":"5oXVcUceeS7cIyWO22EWDFv4OjiozbUukkwh6-FdE34"},{"chat":"3ab5dc1c-ba5c-4120-b72f-9be93c8e09ba","token":"_kuCCV_m4F-VRA3Q7M9Puae9pe3bfOlgD6oLxbeKxKI"},{"token":"qGptaVQ54z7eHbHhB9BPXd13dugSZ6jg74sjlr2RF_E","chat":"46aaab09-ed0d-4238-b778-28aa4325d6c2"},{"chat":"3b744ef2-dd7a-47ba-b05a-225995674bb9","token":"f7NvgCC12z-_GWcwupuMlEEH5p3XmOTsoglCCL-XGz8"},{"chat":"50966e79-a203-4255-9385-66d48c5ffb50","token":"ef79_V8IjqME-yCTGUO5WyZVYU2n9IuksXPkgrVmyvM"},{"chat":"85bc2af3-6303-4748-ae55-eea12d9247e9","token":"aYK851cmC2jYDgYRAjOqU5vjjfBprlbqVhf-bBjhw_s"},{"chat":"a467bc0a-86e2-48ed-8ae6-b3bd9a7de7da","token":"-bx-GIqCuXA8YgVw7I5UWQ3OE12X3CatR-V6X_r8fAA"},{"chat":"19090aa7-1ab7-46de-9d9d-678178dbabd7","token":"gvs9LtpeJlUob9cTBxrCpfkQJKI10u7_oIeWkAekOc4"}],"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":1336,"fails":1947,"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e"},{"passes":149,"fails":4,"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa"},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":1317,"fails":1947}]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":50700.779292},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":0.4182089552238806,"passes":2802,"fails":3898}},"application_errors{status:503}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"count":3897,"rate":76.86272389534852}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":144.07987260023705,"p(50)":16.528008999999997,"p(95)":389.29778824999994,"p(99)":497.70713441,"max":9159.233298}},"iterations":{"type":"counter","contains":"default","values":{"rate":64.37770869756675,"count":3264}},"confirmed_messages":{"type":"counter","contains":"default","values":{"rate":22.346796554639436,"count":1133}},"application_errors":{"type":"counter","contains":"default","values":{"count":3898,"rate":76.88244745806225}},"failed_writes":{"type":"counter","contains":"default","values":{"count":1947,"rate":38.401776603603686}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":497.10024959,"max":9156.518622,"avg":142.64434993775882,"p(50)":8.1193335,"p(95)":388.80872635}},"data_sent":{"type":"counter","contains":"data","values":{"count":585179,"rate":11541.814705249206}},"message_latency_ms":{"contains":"time","values":{"avg":156.76337151785663,"p(50)":9.191468,"p(95)":400.90426964999995,"p(99)":515.0820838300001,"max":9075.971106},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(99)":601.6781475499987,"max":8073.096102,"avg":314.4811274036987,"p(50)":279.6986455,"p(95)":419.368238},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":6764,"rate":133.4101781955703}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.37589536191602296,"p(50)":0.000688,"p(95)":0.001273,"p(99)":0.004134719999999994,"max":950.975337}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":3080,"rate":60.748573158243126}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":37.74685,"avg":0.02312838571850976}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":239.484409,"avg":0.22270943598462445}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.5762862211709048,"passes":3898,"fails":2866}},"data_received":{"type":"counter","contains":"data","values":{"count":4195518,"rate":82750.5623895214}},"vus_max":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":216.639188,"avg":1.201672609107039,"p(50)":0.2664335,"p(95)":3.857153799999995,"p(99)":24.95663570999991}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":296.96846638419083,"p(50)":28.244625,"p(95)":808.12144195,"p(99)":1222.6212108099976,"max":9457.513679}},"measured_operations":{"type":"counter","contains":"default","values":{"count":6292,"rate":124.10065659469667}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_sending":{"contains":"time","values":{"avg":0.23385005337078663,"p(50)":0.1136735,"p(95)":0.3216075499999999,"p(99)":2.026604269999999,"max":65.394982},"type":"trend"},"application_errors{status:429}":{"contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter"}}}} diff --git a/evidence/research-20261029-budget/load-resource-high-a-20261029121644.json b/evidence/research-20261029-budget/load-resource-high-a-20261029121644.json new file mode 100644 index 00000000..b312030e --- /dev/null +++ b/evidence/research-20261029-budget/load-resource-high-a-20261029121644.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 62799.862953 + }, + "metrics": { + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 2134144, + "rate": 33983.2588742624 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 77.48847192855455, + "p(50)": 6.951556, + "p(95)": 329.7308103, + "p(99)": 479.30767200000037, + "max": 5260.066465 + } + }, + "http_req_receiving": { + "contains": "time", + "values": { + "avg": 0.6482721659767205, + "p(50)": 0.2119605, + "p(95)": 1.7822905, + "p(99)": 10.010433900000011, + "max": 188.911651 + }, + "type": "trend" + }, + "attempted_messages": { + "values": { + "count": 12508, + "rate": 199.1724091716745 + }, + "type": "counter", + "contains": "default" + }, + "iterations": { + "values": { + "count": 12583, + "rate": 200.3666792938264 + }, + "type": "counter", + "contains": "default" + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 18494, + "rate": 294.49108852102245 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.7224088104350543, + "passes": 18498, + "fails": 7108 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 25355, + "rate": 403.7429192954755 + } + }, + "failed_writes": { + "contains": "default", + "values": { + "count": 9238, + "rate": 147.102231845853 + }, + "type": "counter" + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 11327671, + "rate": 180377.3203848826 + } + }, + "message_latency_ms": { + "values": { + "p(99)": 214.25322976000027, + "max": 2105.229414, + "avg": 37.81423101127255, + "p(50)": 3.132864, + "p(95)": 165.90313379999998 + }, + "type": "trend", + "contains": "time" + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.07160572112005212, + "p(50)": 0.000252, + "p(95)": 0.00135, + "p(99)": 0.001486, + "max": 512.599107 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 25606, + "rate": 407.73974330427706 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.0036877972740763884, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 4.38229 + } + }, + "vus": { + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + }, + "type": "gauge" + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 38.61973596547674, + "p(50)": 3.2507835, + "p(95)": 162.070367, + "p(99)": 209.24074225000007, + "max": 3000.98968 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 61.066863, + "avg": 0.047064733578067626 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "max": 3000.926011, + "avg": 37.85816009825789, + "p(50)": 2.554658, + "p(95)": 161.6179185, + "p(99)": 208.48592990000006 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 271.1536319600006, + "max": 1095.280026, + "avg": 119.94345917177822, + "p(50)": 104.1612405, + "p(95)": 197.87173769999998 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "max": 23.808162, + "avg": 0.1133037012418968, + "p(50)": 0.044178, + "p(95)": 0.24903725, + "p(99)": 0.5478875500000034 + } + }, + "confirmed_messages": { + "values": { + "count": 3270, + "rate": 52.070177325821525 + }, + "type": "counter", + "contains": "default" + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 18494, + "rate": 294.49108852102245 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.2758242618842509, + "passes": 7044, + "fails": 18494 + } + } + }, + "setup_data": [ + { + "chat": "79fce74b-08ea-41a1-b659-a49d92408248", + "token": "bdPHACJnUZ67x-OhE_u0czdsxG2jZAo8w2PnzPVKqhc" + }, + { + "chat": "8084c8b5-da74-4913-ab4a-4b94ba03968d", + "token": "wGgvrzNhNei_PXAKZJTlvC6428zr_5VK92qrzlx21_s" + }, + { + "chat": "624be9d1-3696-4912-b789-01f005a573f8", + "token": "2uTqthqAJh1CG_3odQBvE2X2Ncdz_6oPPexPBuZsY6M" + }, + { + "chat": "61703b54-db6f-47ce-97c9-84fa6b41e3f4", + "token": "FG1w3BzPyIxeHMSQjh_4tzbflVJUYlZPt7bcHqRHOwA" + }, + { + "chat": "57250da8-8d3e-434a-90d3-251390ce7cc1", + "token": "89GxyIWG3aD6ONpW9--RRvb-8tSQN-9ThmU-biHvEq4" + }, + { + "chat": "fa0e6ec3-f868-466b-99c1-c1bd4103796d", + "token": "ncV60vGVnD0IKJJrU8Y9wVuzDmhGZh8ouo6U2mV9kWo" + }, + { + "token": "RorabKAImE-Lg2vCJsPPL90D4RIElqPq4FPkFquUoNY", + "chat": "27be6988-eeba-4508-8fc6-31a2d3f7839c" + }, + { + "chat": "5d4cb9a0-bbcc-4b70-9d87-489b30b8b1ca", + "token": "TW1H4KBgVysTjbZtLtIBdWJSuyh3YD3u1fm8ev9y0u8" + }, + { + "chat": "7cfbac7c-5b6d-4aa8-8b17-1dd9e9ea67e9", + "token": "14V6y1PWn-5phmYob785pPlTXR9ucKMyUPPgQ0pZvSc" + }, + { + "chat": "aecc1954-4ef4-4dd2-a6b1-d4f901d3b575", + "token": "9wMUqzYNqfpBCuP4cQvlppYnfu0aS-AHAwJtVZ73PqE" + }, + { + "chat": "7c95333d-5b62-4c16-b3bf-ab385d1f26b7", + "token": "_1zSY4PxjXfi7veKrTrHG2dHudSX9Aghad-AuvPMbEw" + }, + { + "chat": "630c5be7-3899-4f64-b34a-617eff79559e", + "token": "rT9rFph4gA_D4yTDgvO6TfFy2fO5cxY7x-mogC000sY" + }, + { + "token": "-VTRD1xP86fz_axMZWbJUMTZQcR54gZMz5OAQB9pKJ4", + "chat": "efc8dcdd-08e3-4845-9f1f-495b24625313" + }, + { + "chat": "73e1e0c9-63d7-4bce-87cf-7899f76a55b6", + "token": "_o2VVVtTF3qAzF1B-hIvrY8KYteCY1TjDx70p0Wh5W0" + }, + { + "chat": "4422251f-cceb-4a1f-836d-4f19505c4c2c", + "token": "c_OYhyxFq0S6ECEHyL_fKoLy40Pd4bWd_izfDoa6ccM" + }, + { + "chat": "026a220d-ccc6-4bea-af94-6fa9e433b09b", + "token": "cLlQKwn1yDF_veVg_m35-bIAnkCysClsuQYYZtQb_18" + } + ], + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "fails": 9238, + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 3366 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 344, + "fails": 7 + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 3334, + "fails": 9249 + } + ] + } + } +} diff --git a/evidence/research-20261029-budget/load-resource-high-a-20261029121644.txt b/evidence/research-20261029-budget/load-resource-high-a-20261029121644.txt new file mode 100644 index 00000000..6e4f58df --- /dev/null +++ b/evidence/research-20261029-budget/load-resource-high-a-20261029121644.txt @@ -0,0 +1,4 @@ +time="2026-10-29T12:17:29Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/health/ready\": request timeout" +time="2026-10-29T12:17:33Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/health/ready\": request timeout" +time="2026-10-29T12:17:37Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/health/ready\": request timeout" +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":62799.862953},"metrics":{"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"data_sent":{"type":"counter","contains":"data","values":{"count":2134144,"rate":33983.2588742624}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":77.48847192855455,"p(50)":6.951556,"p(95)":329.7308103,"p(99)":479.30767200000037,"max":5260.066465}},"http_req_receiving":{"contains":"time","values":{"avg":0.6482721659767205,"p(50)":0.2119605,"p(95)":1.7822905,"p(99)":10.010433900000011,"max":188.911651},"type":"trend"},"attempted_messages":{"values":{"count":12508,"rate":199.1724091716745},"type":"counter","contains":"default"},"iterations":{"values":{"count":12583,"rate":200.3666792938264},"type":"counter","contains":"default"},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":18494,"rate":294.49108852102245},"thresholds":{"count>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.7224088104350543,"passes":18498,"fails":7108}},"measured_operations":{"type":"counter","contains":"default","values":{"count":25355,"rate":403.7429192954755}},"failed_writes":{"contains":"default","values":{"count":9238,"rate":147.102231845853},"type":"counter"},"data_received":{"type":"counter","contains":"data","values":{"count":11327671,"rate":180377.3203848826}},"message_latency_ms":{"values":{"p(99)":214.25322976000027,"max":2105.229414,"avg":37.81423101127255,"p(50)":3.132864,"p(95)":165.90313379999998},"type":"trend","contains":"time"},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.07160572112005212,"p(50)":0.000252,"p(95)":0.00135,"p(99)":0.001486,"max":512.599107}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"count":25606,"rate":407.73974330427706}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0036877972740763884,"p(50)":0,"p(95)":0,"p(99)":0,"max":4.38229}},"vus":{"contains":"default","values":{"value":32,"min":0,"max":32},"type":"gauge"},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":38.61973596547674,"p(50)":3.2507835,"p(95)":162.070367,"p(99)":209.24074225000007,"max":3000.98968}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":61.066863,"avg":0.047064733578067626}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":3000.926011,"avg":37.85816009825789,"p(50)":2.554658,"p(95)":161.6179185,"p(99)":208.48592990000006}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":271.1536319600006,"max":1095.280026,"avg":119.94345917177822,"p(50)":104.1612405,"p(95)":197.87173769999998}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":23.808162,"avg":0.1133037012418968,"p(50)":0.044178,"p(95)":0.24903725,"p(99)":0.5478875500000034}},"confirmed_messages":{"values":{"count":3270,"rate":52.070177325821525},"type":"counter","contains":"default"},"application_errors":{"type":"counter","contains":"default","values":{"count":18494,"rate":294.49108852102245}},"checks":{"type":"rate","contains":"default","values":{"rate":0.2758242618842509,"passes":7044,"fails":18494}}},"setup_data":[{"chat":"79fce74b-08ea-41a1-b659-a49d92408248","token":"bdPHACJnUZ67x-OhE_u0czdsxG2jZAo8w2PnzPVKqhc"},{"chat":"8084c8b5-da74-4913-ab4a-4b94ba03968d","token":"wGgvrzNhNei_PXAKZJTlvC6428zr_5VK92qrzlx21_s"},{"chat":"624be9d1-3696-4912-b789-01f005a573f8","token":"2uTqthqAJh1CG_3odQBvE2X2Ncdz_6oPPexPBuZsY6M"},{"chat":"61703b54-db6f-47ce-97c9-84fa6b41e3f4","token":"FG1w3BzPyIxeHMSQjh_4tzbflVJUYlZPt7bcHqRHOwA"},{"chat":"57250da8-8d3e-434a-90d3-251390ce7cc1","token":"89GxyIWG3aD6ONpW9--RRvb-8tSQN-9ThmU-biHvEq4"},{"chat":"fa0e6ec3-f868-466b-99c1-c1bd4103796d","token":"ncV60vGVnD0IKJJrU8Y9wVuzDmhGZh8ouo6U2mV9kWo"},{"token":"RorabKAImE-Lg2vCJsPPL90D4RIElqPq4FPkFquUoNY","chat":"27be6988-eeba-4508-8fc6-31a2d3f7839c"},{"chat":"5d4cb9a0-bbcc-4b70-9d87-489b30b8b1ca","token":"TW1H4KBgVysTjbZtLtIBdWJSuyh3YD3u1fm8ev9y0u8"},{"chat":"7cfbac7c-5b6d-4aa8-8b17-1dd9e9ea67e9","token":"14V6y1PWn-5phmYob785pPlTXR9ucKMyUPPgQ0pZvSc"},{"chat":"aecc1954-4ef4-4dd2-a6b1-d4f901d3b575","token":"9wMUqzYNqfpBCuP4cQvlppYnfu0aS-AHAwJtVZ73PqE"},{"chat":"7c95333d-5b62-4c16-b3bf-ab385d1f26b7","token":"_1zSY4PxjXfi7veKrTrHG2dHudSX9Aghad-AuvPMbEw"},{"chat":"630c5be7-3899-4f64-b34a-617eff79559e","token":"rT9rFph4gA_D4yTDgvO6TfFy2fO5cxY7x-mogC000sY"},{"token":"-VTRD1xP86fz_axMZWbJUMTZQcR54gZMz5OAQB9pKJ4","chat":"efc8dcdd-08e3-4845-9f1f-495b24625313"},{"chat":"73e1e0c9-63d7-4bce-87cf-7899f76a55b6","token":"_o2VVVtTF3qAzF1B-hIvrY8KYteCY1TjDx70p0Wh5W0"},{"chat":"4422251f-cceb-4a1f-836d-4f19505c4c2c","token":"c_OYhyxFq0S6ECEHyL_fKoLy40Pd4bWd_izfDoa6ccM"},{"chat":"026a220d-ccc6-4bea-af94-6fa9e433b09b","token":"cLlQKwn1yDF_veVg_m35-bIAnkCysClsuQYYZtQb_18"}],"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":9238,"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":3366},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":344,"fails":7},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":3334,"fails":9249}]}}} diff --git a/evidence/research-20261029-budget/load-resource-high-b-20261029122017.json b/evidence/research-20261029-budget/load-resource-high-b-20261029122017.json new file mode 100644 index 00000000..e2dcaa80 --- /dev/null +++ b/evidence/research-20261029-budget/load-resource-high-b-20261029122017.json @@ -0,0 +1,373 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 5230, + "fails": 0 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 528, + "fails": 0 + }, + { + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 5216, + "fails": 0, + "name": "history readable", + "path": "::history readable" + } + ] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 45658.562455 + }, + "metrics": { + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 11038, + "rate": 241.75093140259926 + } + }, + "http_req_failed": { + "values": { + "rate": 0, + "passes": 0, + "fails": 11038 + }, + "type": "rate", + "contains": "default" + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 5109, + "rate": 111.8957699343975 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 15125395, + "rate": 331271.8181810308 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "min": 32, + "max": 32, + "value": 32 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.04566174053270521, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 25.739401 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0.6592425499999996, + "p(99)": 1.4886263799999973, + "max": 189.491048, + "avg": 0.2831693467113601, + "p(50)": 0.181108 + } + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "http_req_duration{expected_response:true}": { + "values": { + "p(95)": 148.4398172, + "p(99)": 169.97291509999982, + "max": 634.447418, + "avg": 88.6529423891107, + "p(50)": 78.5364045 + }, + "type": "trend", + "contains": "time" + }, + "http_req_connecting": { + "contains": "time", + "values": { + "avg": 0.01091145696684182, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 7.66539 + }, + "type": "trend" + }, + "checks": { + "values": { + "rate": 1, + "passes": 10974, + "fails": 0 + }, + "type": "rate", + "contains": "default" + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "rate": 111.8957699343975, + "count": 5109 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "http_req_duration": { + "contains": "time", + "values": { + "avg": 88.6529423891107, + "p(50)": 78.5364045, + "p(95)": 148.4398172, + "p(99)": 169.97291509999982, + "max": 634.447418 + }, + "type": "trend" + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 94.34357741456262, + "p(50)": 86.548129, + "p(95)": 150.95621699999998, + "p(99)": 174.36450792000005, + "max": 634.447418 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.19530083266896073, + "p(50)": 0.172547, + "p(95)": 0.35084894999999994, + "p(99)": 0.70326441, + "max": 10.432989 + } + }, + "http_req_waiting": { + "values": { + "p(95)": 147.96067564999998, + "p(99)": 169.61154033999983, + "max": 634.096686, + "avg": 88.17447220973034, + "p(50)": 78.139894 + }, + "type": "trend", + "contains": "time" + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 1007642, + "rate": 22069.069760860475 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 166.124368, + "p(95)": 305.40765375, + "p(99)": 436.3995856, + "max": 963.702448, + "avg": 187.09528789589734 + } + }, + "http_req_blocked": { + "values": { + "p(50)": 0.001214, + "p(95)": 0.0014271499999999996, + "p(99)": 0.0017360399999999936, + "max": 29.570485, + "avg": 0.0587230481971364 + }, + "type": "trend", + "contains": "time" + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 5216, + "rate": 114.23925151258904 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 10734, + "rate": 235.09281551689622 + } + }, + "application_errors{status:0}": { + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + } + }, + "setup_data": [ + { + "chat": "91c65169-e029-41e8-9a3d-3d9cdc50f533", + "token": "hdd53_NS9rXWBVHU20Jt9JMbfiv4gMd2hBddG2vfRKA" + }, + { + "token": "HRzWk5NyCEtz8951cOQem8IBiHCjqos-RQcyKU4DIcw", + "chat": "9a20bcc5-ed82-442d-9ef3-c013d9f4b90f" + }, + { + "chat": "351d6fd3-4c8a-4d70-9165-5ac60720cc53", + "token": "SpKlhn-4Te0lrzYKauV38dR4NQJV9dFW4cJC7RLkVRA" + }, + { + "chat": "b3e37643-bb89-480e-b5c0-f127a44e4c32", + "token": "BBan9FT7VI3u6m0TLUOx3gCacA6BW3ucHrT3KvKTj1M" + }, + { + "chat": "8aacf184-5d09-4e85-9f7e-7c0213def1c0", + "token": "l-uDa3tyKbZcHpzTyz1kCdwI9JsjXmom2VW_swcnJxA" + }, + { + "chat": "008c85d5-376a-4089-9f14-374db3db5ad4", + "token": "bK7Z0mpBA27GM4X1tIfw_6G0UuCR84M9km_INxq1BVY" + }, + { + "token": "vzi9034UW9R6UvZVq5yNmhjx08_xdZNlh2o4NDmdJYM", + "chat": "ef0420a2-a9e4-49d3-834e-664cb604c76f" + }, + { + "chat": "48f6bb3d-0e53-4440-ad2a-5e086c71b516", + "token": "SDIZBSpAVxdQRoSyr2WX4z9n2CiBw_9dlj55cr33zTQ" + }, + { + "token": "Umz1yWJ9_wbf4bQ6bpXkOYtsGofs-hbJno0vPRlR968", + "chat": "aee8ebc6-e03f-4865-834a-d002513444c8" + }, + { + "chat": "0f39ff84-68bc-4e77-8250-6d84448938a4", + "token": "McLP3DOUFeB7TdHaKxfVzJVU6Yiwf4hPmIloihNX6LQ" + }, + { + "token": "egIHGXPgXaDkOr5EEI-tj0lLbv6i53QSQ3p9rvPdS8Q", + "chat": "9813b57a-f83c-4a32-b855-2a73e5e94fa3" + }, + { + "chat": "1fdf4a8f-a2a6-4ff6-8e95-d7cc2dff2424", + "token": "syrQ8IGX5nqF6fm2a-K9cSLxHRBEsUVDbpfGRGJExyk" + }, + { + "chat": "0f1a041e-11d2-410b-a6f3-610138932863", + "token": "gZMY-iKeabd3X0x2hjQrel4-UKk9QixdXjWx-ZZwAQI" + }, + { + "token": "bOdeqdhjMQ3MS-vqgwc_uR55qd-FD9oxtHXu35nd1A0", + "chat": "4aae219b-0deb-4028-851c-99a61c521274" + }, + { + "chat": "9b66b89a-0993-429e-abe2-ae40103e25da", + "token": "uzibd3tAtqrzYJAJd88csGZl8PQ517P4HI67qXDZYzA" + }, + { + "chat": "1f95d050-3b75-4071-826f-4b121a63cf51", + "token": "Yb4OgdBWC9t9zXoH26STDLzOlMzddZysFz3xS00kpnA" + } + ] + } +} diff --git a/evidence/research-20261029-budget/load-resource-high-b-20261029122017.txt b/evidence/research-20261029-budget/load-resource-high-b-20261029122017.txt new file mode 100644 index 00000000..db628043 --- /dev/null +++ b/evidence/research-20261029-budget/load-resource-high-b-20261029122017.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":5230,"fails":0},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":528,"fails":0},{"id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":5216,"fails":0,"name":"history readable","path":"::history readable"}]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":45658.562455},"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"count":11038,"rate":241.75093140259926}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":11038},"type":"rate","contains":"default"},"attempted_messages":{"type":"counter","contains":"default","values":{"count":5109,"rate":111.8957699343975}},"data_received":{"type":"counter","contains":"data","values":{"count":15125395,"rate":331271.8181810308}},"vus_max":{"type":"gauge","contains":"default","values":{"min":32,"max":32,"value":32}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0.04566174053270521,"p(50)":0,"p(95)":0,"p(99)":0,"max":25.739401}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.6592425499999996,"p(99)":1.4886263799999973,"max":189.491048,"avg":0.2831693467113601,"p(50)":0.181108}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"http_req_duration{expected_response:true}":{"values":{"p(95)":148.4398172,"p(99)":169.97291509999982,"max":634.447418,"avg":88.6529423891107,"p(50)":78.5364045},"type":"trend","contains":"time"},"http_req_connecting":{"contains":"time","values":{"avg":0.01091145696684182,"p(50)":0,"p(95)":0,"p(99)":0,"max":7.66539},"type":"trend"},"checks":{"values":{"rate":1,"passes":10974,"fails":0},"type":"rate","contains":"default"},"confirmed_messages":{"type":"counter","contains":"default","values":{"rate":111.8957699343975,"count":5109}},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"http_req_duration":{"contains":"time","values":{"avg":88.6529423891107,"p(50)":78.5364045,"p(95)":148.4398172,"p(99)":169.97291509999982,"max":634.447418},"type":"trend"},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":94.34357741456262,"p(50)":86.548129,"p(95)":150.95621699999998,"p(99)":174.36450792000005,"max":634.447418}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.19530083266896073,"p(50)":0.172547,"p(95)":0.35084894999999994,"p(99)":0.70326441,"max":10.432989}},"http_req_waiting":{"values":{"p(95)":147.96067564999998,"p(99)":169.61154033999983,"max":634.096686,"avg":88.17447220973034,"p(50)":78.139894},"type":"trend","contains":"time"},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"data_sent":{"type":"counter","contains":"data","values":{"count":1007642,"rate":22069.069760860475}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":166.124368,"p(95)":305.40765375,"p(99)":436.3995856,"max":963.702448,"avg":187.09528789589734}},"http_req_blocked":{"values":{"p(50)":0.001214,"p(95)":0.0014271499999999996,"p(99)":0.0017360399999999936,"max":29.570485,"avg":0.0587230481971364},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":5216,"rate":114.23925151258904}},"measured_operations":{"type":"counter","contains":"default","values":{"count":10734,"rate":235.09281551689622}},"application_errors{status:0}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"count":0,"rate":0}}},"setup_data":[{"chat":"91c65169-e029-41e8-9a3d-3d9cdc50f533","token":"hdd53_NS9rXWBVHU20Jt9JMbfiv4gMd2hBddG2vfRKA"},{"token":"HRzWk5NyCEtz8951cOQem8IBiHCjqos-RQcyKU4DIcw","chat":"9a20bcc5-ed82-442d-9ef3-c013d9f4b90f"},{"chat":"351d6fd3-4c8a-4d70-9165-5ac60720cc53","token":"SpKlhn-4Te0lrzYKauV38dR4NQJV9dFW4cJC7RLkVRA"},{"chat":"b3e37643-bb89-480e-b5c0-f127a44e4c32","token":"BBan9FT7VI3u6m0TLUOx3gCacA6BW3ucHrT3KvKTj1M"},{"chat":"8aacf184-5d09-4e85-9f7e-7c0213def1c0","token":"l-uDa3tyKbZcHpzTyz1kCdwI9JsjXmom2VW_swcnJxA"},{"chat":"008c85d5-376a-4089-9f14-374db3db5ad4","token":"bK7Z0mpBA27GM4X1tIfw_6G0UuCR84M9km_INxq1BVY"},{"token":"vzi9034UW9R6UvZVq5yNmhjx08_xdZNlh2o4NDmdJYM","chat":"ef0420a2-a9e4-49d3-834e-664cb604c76f"},{"chat":"48f6bb3d-0e53-4440-ad2a-5e086c71b516","token":"SDIZBSpAVxdQRoSyr2WX4z9n2CiBw_9dlj55cr33zTQ"},{"token":"Umz1yWJ9_wbf4bQ6bpXkOYtsGofs-hbJno0vPRlR968","chat":"aee8ebc6-e03f-4865-834a-d002513444c8"},{"chat":"0f39ff84-68bc-4e77-8250-6d84448938a4","token":"McLP3DOUFeB7TdHaKxfVzJVU6Yiwf4hPmIloihNX6LQ"},{"token":"egIHGXPgXaDkOr5EEI-tj0lLbv6i53QSQ3p9rvPdS8Q","chat":"9813b57a-f83c-4a32-b855-2a73e5e94fa3"},{"chat":"1fdf4a8f-a2a6-4ff6-8e95-d7cc2dff2424","token":"syrQ8IGX5nqF6fm2a-K9cSLxHRBEsUVDbpfGRGJExyk"},{"chat":"0f1a041e-11d2-410b-a6f3-610138932863","token":"gZMY-iKeabd3X0x2hjQrel4-UKk9QixdXjWx-ZZwAQI"},{"token":"bOdeqdhjMQ3MS-vqgwc_uR55qd-FD9oxtHXu35nd1A0","chat":"4aae219b-0deb-4028-851c-99a61c521274"},{"chat":"9b66b89a-0993-429e-abe2-ae40103e25da","token":"uzibd3tAtqrzYJAJd88csGZl8PQ517P4HI67qXDZYzA"},{"chat":"1f95d050-3b75-4071-826f-4b121a63cf51","token":"Yb4OgdBWC9t9zXoH26STDLzOlMzddZysFz3xS00kpnA"}]}} diff --git a/evidence/research-20261029-budget/load-resource-low-a-20261029121455.json b/evidence/research-20261029-budget/load-resource-low-a-20261029121455.json new file mode 100644 index 00000000..93b94d85 --- /dev/null +++ b/evidence/research-20261029-budget/load-resource-low-a-20261029121455.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "metrics": { + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 1342, + "rate": 26.561472909672695 + } + }, + "application_errors{status:0}": { + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default" + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 126, + "rate": 2.493849170356751 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.4785587288240778, + "p(50)": 0.170357, + "p(95)": 1.1339236, + "p(99)": 3.4475808399999934, + "max": 214.619895 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 308580, + "rate": 6107.555372926081 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 1495, + "rate": 29.58971833082018 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "rate": 55.874096888231016, + "count": 2823 + } + }, + "application_errors{status:429}": { + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default" + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 304.09755029351567, + "p(50)": 147.824596, + "p(95)": 410.633796, + "p(99)": 4001.48060386, + "max": 15305.91387 + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 179.871273, + "p(95)": 474.7400550500002, + "p(99)": 2920.94988727998, + "max": 4001.89549, + "avg": 244.71032225335352 + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 412.31885059999956, + "p(99)": 4001.85648818, + "max": 15306.114353, + "avg": 304.80681099596694, + "p(50)": 148.372542 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.9290434660254416, + "p(50)": 0.000929, + "p(95)": 0.0014948999999999997, + "p(99)": 9.614031419997158, + "max": 1122.781083 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 1.7588446199994259, + "max": 1084.331548, + "avg": 0.4973989196400869 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.039094011790257524, + "passes": 126, + "fails": 3097 + } + }, + "http_reqs": { + "contains": "default", + "values": { + "rate": 63.79107838142705, + "count": 3223 + }, + "type": "counter" + }, + "http_req_duration{expected_response:true}": { + "values": { + "avg": 258.8675715650633, + "p(50)": 151.210045, + "p(95)": 395.1222127999998, + "p(99)": 805.1593229599996, + "max": 13484.65663 + }, + "type": "trend", + "contains": "time" + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 4186739, + "rate": 82865.83794960518 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.9601139601139601, + "passes": 3033, + "fails": 126 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 6.95150741999773, + "max": 318.387688, + "avg": 0.40447649953459514 + } + }, + "vus": { + "values": { + "value": 32, + "min": 0, + "max": 32 + }, + "type": "gauge", + "contains": "default" + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 315.29533, + "p(95)": 952.9943968, + "p(99)": 13495.279628039998, + "max": 16686.161806, + "avg": 651.9972944147166 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 1281, + "rate": 25.3541332319603 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.2307019736270553, + "p(50)": 0.139785, + "p(95)": 0.49472829999999995, + "p(99)": 2.3659373399999986, + "max": 14.509999 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + } + }, + "failed_writes": { + "type": "counter", + "contains": "default", + "values": { + "count": 61, + "rate": 1.2073396777123953 + } + }, + "application_errors{status:503}": { + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default", + "values": { + "count": 110, + "rate": 2.1771699106289093 + } + } + }, + "setup_data": [ + { + "chat": "40f3048c-dc88-46bc-993a-d50c7468fccd", + "token": "aXl5610t-lUuA05L5uAThAZvXaM6maZid2q3lzVf1ic" + }, + { + "chat": "ef3e62fe-d54d-4749-891a-5233e057b95f", + "token": "eMcEAwKjc9-IiSDNb7P_pwetWZTx1f-u1dZVz7b5YZA" + }, + { + "chat": "befb66cf-e346-4c9b-ad7b-df21a62f493d", + "token": "ubikwf5lirrYiOpuhDdqZNI6BK_hoY1LHZk0R6JYeWo" + }, + { + "chat": "f3df2a1d-5c5c-402b-b201-7645dfac22dd", + "token": "pCOPkGEq-8fPpFW0hvbm0ZhNCAyaSlIbWdVJbIMzE3g" + }, + { + "chat": "1835e164-8df2-4579-b9c6-909e4afff190", + "token": "beA-HCCfv1GdrGklVYZfGyyPCdO6aoGu6PwXckCYu78" + }, + { + "chat": "12bbdd61-859d-4def-9194-0ac72ecb97cd", + "token": "gbPAIwQqpI8TjoUFI3jIjE1Me_bHeaV9WnYflVDAkKM" + }, + { + "chat": "731e7274-e841-478d-994a-f8bd3e9e5589", + "token": "zn66NKnRanUawQ4uwQ5xbnk09PCYrHf1YHWQzsxREt4" + }, + { + "chat": "a3b4692a-af10-48d3-8f54-8e48feae4612", + "token": "edxXRcbiyVYcYmRveFaMjherFV-9SGrta-dHJZ56ECI" + }, + { + "chat": "ba8a1024-117b-49e3-b83f-337651f3fda0", + "token": "P_6O8HryOaE-k4EFDHNN2ATnEhdvqlkRjB3wvoAmnS4" + }, + { + "chat": "23d1b45e-da68-4e81-8c66-24637a77fac0", + "token": "az8g6fY5btOXxU65YbUURcy_lMF22NmbISPfcezRiQE" + }, + { + "chat": "bf7a8f6a-ec14-4aff-b7bd-254ab247e91a", + "token": "r-P4mXHViC666mF7QqoRPt3zQuthk2Y-8B7lBcJKpRw" + }, + { + "chat": "595ef50d-5e75-4c52-b396-b18954402e47", + "token": "tpO20J4OJfLOnJIncvb8obstXNtflzCNIxdll6U4LZM" + }, + { + "chat": "ca0c67f7-8dc4-45f0-a947-43b5276e6023", + "token": "XUWiuyO9BtlQQmSPp13w7k3Xp0PDLqKw27N7e6u6t8U" + }, + { + "token": "We7Y2W-VGPBSFET5WeAZWiSD4aPQoKoeHjmO-7JMFnI", + "chat": "d32d06cf-62e7-442a-8d55-23f0df08fbe7" + }, + { + "chat": "6b10db1b-d3d4-4969-aab5-d59e06578ffb", + "token": "pst6F_kphCd5WIQF3O-QqQyEGNWxDYw_fVFORby8bmM" + }, + { + "token": "eFnY_ls7ovtLZSz6C2R6INBLAKAyKEbSwhAxGsaZEr4", + "chat": "8a347874-dd9a-42b3-9618-2f99f0b53ec2" + } + ], + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "fails": 61, + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 1447 + }, + { + "passes": 153, + "fails": 3, + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa" + }, + { + "passes": 1433, + "fails": 62, + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8" + } + ] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 50524.306561 + } + } +} diff --git a/evidence/research-20261029-budget/load-resource-low-a-20261029121455.txt b/evidence/research-20261029-budget/load-resource-low-a-20261029121455.txt new file mode 100644 index 00000000..97a27861 --- /dev/null +++ b/evidence/research-20261029-budget/load-resource-low-a-20261029121455.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"metrics":{"attempted_messages":{"type":"counter","contains":"default","values":{"count":1342,"rate":26.561472909672695}},"application_errors{status:0}":{"values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default"},"application_errors":{"type":"counter","contains":"default","values":{"count":126,"rate":2.493849170356751}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.4785587288240778,"p(50)":0.170357,"p(95)":1.1339236,"p(99)":3.4475808399999934,"max":214.619895}},"data_sent":{"type":"counter","contains":"data","values":{"count":308580,"rate":6107.555372926081}},"iterations":{"type":"counter","contains":"default","values":{"count":1495,"rate":29.58971833082018}},"measured_operations":{"type":"counter","contains":"default","values":{"rate":55.874096888231016,"count":2823}},"application_errors{status:429}":{"values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":304.09755029351567,"p(50)":147.824596,"p(95)":410.633796,"p(99)":4001.48060386,"max":15305.91387}},"message_latency_ms":{"type":"trend","contains":"time","values":{"p(50)":179.871273,"p(95)":474.7400550500002,"p(99)":2920.94988727998,"max":4001.89549,"avg":244.71032225335352}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":412.31885059999956,"p(99)":4001.85648818,"max":15306.114353,"avg":304.80681099596694,"p(50)":148.372542}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.9290434660254416,"p(50)":0.000929,"p(95)":0.0014948999999999997,"p(99)":9.614031419997158,"max":1122.781083}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":1.7588446199994259,"max":1084.331548,"avg":0.4973989196400869}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.039094011790257524,"passes":126,"fails":3097}},"http_reqs":{"contains":"default","values":{"rate":63.79107838142705,"count":3223},"type":"counter"},"http_req_duration{expected_response:true}":{"values":{"avg":258.8675715650633,"p(50)":151.210045,"p(95)":395.1222127999998,"p(99)":805.1593229599996,"max":13484.65663},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":4186739,"rate":82865.83794960518}},"checks":{"type":"rate","contains":"default","values":{"rate":0.9601139601139601,"passes":3033,"fails":126}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":6.95150741999773,"max":318.387688,"avg":0.40447649953459514}},"vus":{"values":{"value":32,"min":0,"max":32},"type":"gauge","contains":"default"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":315.29533,"p(95)":952.9943968,"p(99)":13495.279628039998,"max":16686.161806,"avg":651.9972944147166}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":1281,"rate":25.3541332319603}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.2307019736270553,"p(50)":0.139785,"p(95)":0.49472829999999995,"p(99)":2.3659373399999986,"max":14.509999}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"failed_writes":{"type":"counter","contains":"default","values":{"count":61,"rate":1.2073396777123953}},"application_errors{status:503}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"count":110,"rate":2.1771699106289093}}},"setup_data":[{"chat":"40f3048c-dc88-46bc-993a-d50c7468fccd","token":"aXl5610t-lUuA05L5uAThAZvXaM6maZid2q3lzVf1ic"},{"chat":"ef3e62fe-d54d-4749-891a-5233e057b95f","token":"eMcEAwKjc9-IiSDNb7P_pwetWZTx1f-u1dZVz7b5YZA"},{"chat":"befb66cf-e346-4c9b-ad7b-df21a62f493d","token":"ubikwf5lirrYiOpuhDdqZNI6BK_hoY1LHZk0R6JYeWo"},{"chat":"f3df2a1d-5c5c-402b-b201-7645dfac22dd","token":"pCOPkGEq-8fPpFW0hvbm0ZhNCAyaSlIbWdVJbIMzE3g"},{"chat":"1835e164-8df2-4579-b9c6-909e4afff190","token":"beA-HCCfv1GdrGklVYZfGyyPCdO6aoGu6PwXckCYu78"},{"chat":"12bbdd61-859d-4def-9194-0ac72ecb97cd","token":"gbPAIwQqpI8TjoUFI3jIjE1Me_bHeaV9WnYflVDAkKM"},{"chat":"731e7274-e841-478d-994a-f8bd3e9e5589","token":"zn66NKnRanUawQ4uwQ5xbnk09PCYrHf1YHWQzsxREt4"},{"chat":"a3b4692a-af10-48d3-8f54-8e48feae4612","token":"edxXRcbiyVYcYmRveFaMjherFV-9SGrta-dHJZ56ECI"},{"chat":"ba8a1024-117b-49e3-b83f-337651f3fda0","token":"P_6O8HryOaE-k4EFDHNN2ATnEhdvqlkRjB3wvoAmnS4"},{"chat":"23d1b45e-da68-4e81-8c66-24637a77fac0","token":"az8g6fY5btOXxU65YbUURcy_lMF22NmbISPfcezRiQE"},{"chat":"bf7a8f6a-ec14-4aff-b7bd-254ab247e91a","token":"r-P4mXHViC666mF7QqoRPt3zQuthk2Y-8B7lBcJKpRw"},{"chat":"595ef50d-5e75-4c52-b396-b18954402e47","token":"tpO20J4OJfLOnJIncvb8obstXNtflzCNIxdll6U4LZM"},{"chat":"ca0c67f7-8dc4-45f0-a947-43b5276e6023","token":"XUWiuyO9BtlQQmSPp13w7k3Xp0PDLqKw27N7e6u6t8U"},{"token":"We7Y2W-VGPBSFET5WeAZWiSD4aPQoKoeHjmO-7JMFnI","chat":"d32d06cf-62e7-442a-8d55-23f0df08fbe7"},{"chat":"6b10db1b-d3d4-4969-aab5-d59e06578ffb","token":"pst6F_kphCd5WIQF3O-QqQyEGNWxDYw_fVFORby8bmM"},{"token":"eFnY_ls7ovtLZSz6C2R6INBLAKAyKEbSwhAxGsaZEr4","chat":"8a347874-dd9a-42b3-9618-2f99f0b53ec2"}],"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":61,"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":1447},{"passes":153,"fails":3,"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa"},{"passes":1433,"fails":62,"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8"}]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":50524.306561}}} diff --git a/evidence/research-20261029-budget/load-resource-low-b-20261029121833.json b/evidence/research-20261029-budget/load-resource-low-b-20261029121833.json new file mode 100644 index 00000000..b1f51165 --- /dev/null +++ b/evidence/research-20261029-budget/load-resource-low-b-20261029121833.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 1357, + "fails": 16 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 149, + "fails": 0 + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 1347, + "fails": 9 + } + ] + }, + "options": { + "noColor": false, + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "" + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 52348.857544 + }, + "metrics": { + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0.15752149999999998, + "p(95)": 1.0667816499999996, + "p(99)": 2.6036035500000057, + "max": 56.486935, + "avg": 0.35244900611828683 + } + }, + "confirmed_messages": { + "values": { + "count": 1164, + "rate": 22.23544227343721 + }, + "type": "counter", + "contains": "default" + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 1356, + "rate": 25.90314409173613 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.14524504452753234, + "p(50)": 0, + "p(95)": 0, + "p(99)": 3.306125890000003, + "max": 29.974407 + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 3906.8322486500006, + "max": 4021.414764, + "avg": 251.97356974999994, + "p(50)": 183.4024585, + "p(95)": 427.3455392499994 + } + }, + "http_req_tls_handshaking": { + "contains": "time", + "values": { + "avg": 0.2917874279401767, + "p(50)": 0, + "p(95)": 0, + "p(99)": 13.475143490000024, + "max": 52.169655 + }, + "type": "trend" + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 1180, + "rate": 22.541084091628786 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_duration": { + "contains": "time", + "values": { + "avg": 334.8987685271932, + "p(50)": 156.650286, + "p(95)": 391.2477612499998, + "p(99)": 11087.787277590052, + "max": 17274.305742 + }, + "type": "trend" + }, + "data_received": { + "values": { + "count": 3916167, + "rate": 74809.02513886579 + }, + "type": "counter", + "contains": "data" + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 10, + "rate": 0.19102613636973548 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_failed": { + "contains": "default", + "values": { + "rate": 0.00849762066621346, + "passes": 25, + "fails": 2917 + }, + "type": "rate" + }, + "http_reqs": { + "values": { + "count": 2942, + "rate": 56.19988931997618 + }, + "type": "counter", + "contains": "default" + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + } + }, + "iteration_duration": { + "values": { + "p(95)": 906.11886825, + "p(99)": 15413.7550611, + "max": 17502.378788, + "avg": 717.6840371460174, + "p(50)": 322.13766 + }, + "type": "trend", + "contains": "time" + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "measured_operations": { + "contains": "default", + "values": { + "count": 2489, + "rate": 47.546405342427164 + }, + "type": "counter" + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "avg": 277.3633390939327, + "p(50)": 155.341015, + "p(95)": 358.18594759999957, + "p(99)": 790.3229117200002, + "max": 15880.251665 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 25, + "rate": 0.4775653409243387 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.7281408660774972, + "p(50)": 0.000867, + "p(95)": 0.00143295, + "p(99)": 18.86882777000019, + "max": 840.913251 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 334.32122564751796, + "p(50)": 155.961825, + "p(95)": 390.94999664999983, + "p(99)": 11087.508132510053, + "max": 17274.101193 + } + }, + "data_sent": { + "values": { + "count": 285048, + "rate": 5445.161811992036 + }, + "type": "counter", + "contains": "data" + }, + "checks": { + "contains": "default", + "values": { + "rate": 0.9913134120917304, + "passes": 2853, + "fails": 25 + }, + "type": "rate" + }, + "failed_writes": { + "values": { + "count": 16, + "rate": 0.30564181819157676 + }, + "type": "counter", + "contains": "default" + }, + "http_req_sending": { + "contains": "time", + "values": { + "max": 14.874507, + "avg": 0.22509387355540372, + "p(50)": 0.134031, + "p(95)": 0.4687294499999987, + "p(99)": 2.5053839100000292 + }, + "type": "trend" + } + }, + "setup_data": [ + { + "chat": "f8ba9b15-98af-4a44-bdf5-624cd8402b38", + "token": "FxFcSoDTGgvrZpeWew6MVyckuFbwYmuYTIF_zUQVKU4" + }, + { + "token": "iRi1cRIConJL3t4fHWe5MZbSyhQe82wWVpuKOsM0ddo", + "chat": "97b17938-f0a6-4897-a2a0-67e81890cea5" + }, + { + "chat": "7ea71e1e-aaac-49d3-ab42-89b338d3a57d", + "token": "K28Wa6osCYcg2TXfmcUOmrvfL0z6RdH48YkyPTKRGi0" + }, + { + "token": "nokvkZFHXTWaZpYxKPh9FmXru2guwyPYTAy9YseVkdc", + "chat": "d0025650-b502-41c5-bb24-36fd04faad3c" + }, + { + "chat": "cac06fb0-fcbe-408b-89e6-98b707fabe5b", + "token": "XUajTicdRBXi6xKQGAzD60zGr21Bo1d5lGnfM-7TSgM" + }, + { + "chat": "0bcd1418-5038-4b51-8d03-091b8d8ff356", + "token": "Gs0LTQrub60JCwcISVLvIOJs7gSPIOPVER4AvodwEkw" + }, + { + "chat": "a3603938-6466-4b5a-9d51-f490145ed9ee", + "token": "Wgi-mBssvieIQOSLEGANd_7iD6Q5z1LgQFOZiavt6mc" + }, + { + "chat": "eeb932ec-d94b-4454-aca7-b10d998cb88f", + "token": "6teaF3P1YycmnULmqIaZPrpoNfmAgp0JdxKPRcW7T0M" + }, + { + "chat": "b29920d6-da8d-45ce-9d5d-9cda85e1cce7", + "token": "-Tx-ORNi08VBzWW2KsJQdCjB7v6MGGwkQnmTxTrzBaI" + }, + { + "token": "v7kefD4hC2SxYQooYKp0RZVJ0nJelJm9BbCcSMKI2Gg", + "chat": "eb05d4cd-d12b-4f63-b337-3b026d2a4508" + }, + { + "chat": "09b2325e-da8f-4ec5-84a2-08c1c75bc091", + "token": "atd5Frtyyy6QbsE4hMq9xC-3r8G2nF_FxP7vl69kuWg" + }, + { + "chat": "40f24b78-ffeb-4d27-ba79-38207f29f968", + "token": "HJvqaa0wD8MghYJos9SIyZcPW6Lr-DNaLr2xOBhbK9A" + }, + { + "chat": "51aec66f-8ad2-4083-b7d3-973da37ed89c", + "token": "L4GeIxSkDAZdydLwiDDNRurxbWlktqRVVXJnX4KHlM8" + }, + { + "chat": "5d473002-832f-4a93-bab6-0f63da9de9dc", + "token": "FAp4pUv4PFdCTmGe61M6ZMv0mdMD3NBn6Ac8ZPE9av4" + }, + { + "chat": "16808b44-8d8b-4fdc-bf64-44ee8aeb3a74", + "token": "y4OydC_AES-GoPDiGmFF2bsiqO57EmYG2yq2ENLz_Ek" + }, + { + "chat": "fd74965f-1d8e-44b2-9c9d-e1a988ccea92", + "token": "uod-2yoApCVejCegpfkcjAcAM55Z5EsSS42yEBk2pNk" + } + ] + } +} diff --git a/evidence/research-20261029-budget/load-resource-low-b-20261029121833.txt b/evidence/research-20261029-budget/load-resource-low-b-20261029121833.txt new file mode 100644 index 00000000..64bf3777 --- /dev/null +++ b/evidence/research-20261029-budget/load-resource-low-b-20261029121833.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":1357,"fails":16},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":149,"fails":0},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":1347,"fails":9}]},"options":{"noColor":false,"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":52348.857544},"metrics":{"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.15752149999999998,"p(95)":1.0667816499999996,"p(99)":2.6036035500000057,"max":56.486935,"avg":0.35244900611828683}},"confirmed_messages":{"values":{"count":1164,"rate":22.23544227343721},"type":"counter","contains":"default"},"iterations":{"type":"counter","contains":"default","values":{"count":1356,"rate":25.90314409173613}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.14524504452753234,"p(50)":0,"p(95)":0,"p(99)":3.306125890000003,"max":29.974407}},"message_latency_ms":{"type":"trend","contains":"time","values":{"p(99)":3906.8322486500006,"max":4021.414764,"avg":251.97356974999994,"p(50)":183.4024585,"p(95)":427.3455392499994}},"http_req_tls_handshaking":{"contains":"time","values":{"avg":0.2917874279401767,"p(50)":0,"p(95)":0,"p(99)":13.475143490000024,"max":52.169655},"type":"trend"},"attempted_messages":{"type":"counter","contains":"default","values":{"count":1180,"rate":22.541084091628786}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_duration":{"contains":"time","values":{"avg":334.8987685271932,"p(50)":156.650286,"p(95)":391.2477612499998,"p(99)":11087.787277590052,"max":17274.305742},"type":"trend"},"data_received":{"values":{"count":3916167,"rate":74809.02513886579},"type":"counter","contains":"data"},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":10,"rate":0.19102613636973548},"thresholds":{"count>=0":{"ok":true}}},"http_req_failed":{"contains":"default","values":{"rate":0.00849762066621346,"passes":25,"fails":2917},"type":"rate"},"http_reqs":{"values":{"count":2942,"rate":56.19988931997618},"type":"counter","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"iteration_duration":{"values":{"p(95)":906.11886825,"p(99)":15413.7550611,"max":17502.378788,"avg":717.6840371460174,"p(50)":322.13766},"type":"trend","contains":"time"},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"measured_operations":{"contains":"default","values":{"count":2489,"rate":47.546405342427164},"type":"counter"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":277.3633390939327,"p(50)":155.341015,"p(95)":358.18594759999957,"p(99)":790.3229117200002,"max":15880.251665}},"application_errors":{"type":"counter","contains":"default","values":{"count":25,"rate":0.4775653409243387}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.7281408660774972,"p(50)":0.000867,"p(95)":0.00143295,"p(99)":18.86882777000019,"max":840.913251}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":334.32122564751796,"p(50)":155.961825,"p(95)":390.94999664999983,"p(99)":11087.508132510053,"max":17274.101193}},"data_sent":{"values":{"count":285048,"rate":5445.161811992036},"type":"counter","contains":"data"},"checks":{"contains":"default","values":{"rate":0.9913134120917304,"passes":2853,"fails":25},"type":"rate"},"failed_writes":{"values":{"count":16,"rate":0.30564181819157676},"type":"counter","contains":"default"},"http_req_sending":{"contains":"time","values":{"max":14.874507,"avg":0.22509387355540372,"p(50)":0.134031,"p(95)":0.4687294499999987,"p(99)":2.5053839100000292},"type":"trend"}},"setup_data":[{"chat":"f8ba9b15-98af-4a44-bdf5-624cd8402b38","token":"FxFcSoDTGgvrZpeWew6MVyckuFbwYmuYTIF_zUQVKU4"},{"token":"iRi1cRIConJL3t4fHWe5MZbSyhQe82wWVpuKOsM0ddo","chat":"97b17938-f0a6-4897-a2a0-67e81890cea5"},{"chat":"7ea71e1e-aaac-49d3-ab42-89b338d3a57d","token":"K28Wa6osCYcg2TXfmcUOmrvfL0z6RdH48YkyPTKRGi0"},{"token":"nokvkZFHXTWaZpYxKPh9FmXru2guwyPYTAy9YseVkdc","chat":"d0025650-b502-41c5-bb24-36fd04faad3c"},{"chat":"cac06fb0-fcbe-408b-89e6-98b707fabe5b","token":"XUajTicdRBXi6xKQGAzD60zGr21Bo1d5lGnfM-7TSgM"},{"chat":"0bcd1418-5038-4b51-8d03-091b8d8ff356","token":"Gs0LTQrub60JCwcISVLvIOJs7gSPIOPVER4AvodwEkw"},{"chat":"a3603938-6466-4b5a-9d51-f490145ed9ee","token":"Wgi-mBssvieIQOSLEGANd_7iD6Q5z1LgQFOZiavt6mc"},{"chat":"eeb932ec-d94b-4454-aca7-b10d998cb88f","token":"6teaF3P1YycmnULmqIaZPrpoNfmAgp0JdxKPRcW7T0M"},{"chat":"b29920d6-da8d-45ce-9d5d-9cda85e1cce7","token":"-Tx-ORNi08VBzWW2KsJQdCjB7v6MGGwkQnmTxTrzBaI"},{"token":"v7kefD4hC2SxYQooYKp0RZVJ0nJelJm9BbCcSMKI2Gg","chat":"eb05d4cd-d12b-4f63-b337-3b026d2a4508"},{"chat":"09b2325e-da8f-4ec5-84a2-08c1c75bc091","token":"atd5Frtyyy6QbsE4hMq9xC-3r8G2nF_FxP7vl69kuWg"},{"chat":"40f24b78-ffeb-4d27-ba79-38207f29f968","token":"HJvqaa0wD8MghYJos9SIyZcPW6Lr-DNaLr2xOBhbK9A"},{"chat":"51aec66f-8ad2-4083-b7d3-973da37ed89c","token":"L4GeIxSkDAZdydLwiDDNRurxbWlktqRVVXJnX4KHlM8"},{"chat":"5d473002-832f-4a93-bab6-0f63da9de9dc","token":"FAp4pUv4PFdCTmGe61M6ZMv0mdMD3NBn6Ac8ZPE9av4"},{"chat":"16808b44-8d8b-4fdc-bf64-44ee8aeb3a74","token":"y4OydC_AES-GoPDiGmFF2bsiqO57EmYG2yq2ENLz_Ek"},{"chat":"fd74965f-1d8e-44b2-9c9d-e1a988ccea92","token":"uod-2yoApCVejCegpfkcjAcAM55Z5EsSS42yEBk2pNk"}]}} diff --git a/evidence/research-20261029-budget/load-saturation8-20261029121309.json b/evidence/research-20261029-budget/load-saturation8-20261029121309.json new file mode 100644 index 00000000..bc56a002 --- /dev/null +++ b/evidence/research-20261029-budget/load-saturation8-20261029121309.json @@ -0,0 +1,373 @@ +{ + "profile": { + "vus": 8, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 58533.224654 + }, + "metrics": { + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 124.812207, + "p(99)": 156.87072295, + "max": 2008.148619, + "avg": 59.06277293209852, + "p(50)": 49.5675375 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 105.085101, + "p(95)": 249.0688166, + "p(99)": 318.28196140000006, + "max": 518.972685, + "avg": 121.67717165125049 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 0.7203928499999984, + "max": 3.02267, + "avg": 0.2122016633597882, + "p(50)": 0.17847449999999998, + "p(95)": 0.450818 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 4536, + "rate": 77.49444912377679 + } + }, + "http_req_failed": { + "contains": "default", + "values": { + "passes": 7, + "fails": 4529, + "rate": 0.0015432098765432098 + }, + "type": "rate" + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "data_sent": { + "values": { + "count": 409935, + "rate": 7003.458333676243 + }, + "type": "counter", + "contains": "data" + }, + "message_latency_ms": { + "values": { + "avg": 60.06522328685268, + "p(50)": 51.4747885, + "p(95)": 119.66888329999979, + "p(99)": 161.99635167000022, + "max": 383.839615 + }, + "type": "trend", + "contains": "time" + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 58.65014784303353, + "p(50)": 49.104319000000004, + "p(95)": 124.4806335, + "p(99)": 156.5714554, + "max": 2007.92283 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "avg": 58.2964705361004, + "p(50)": 49.600483, + "p(95)": 124.24023219999997, + "p(99)": 156.77442796000005, + "max": 383.839615 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 2008, + "rate": 34.305302874899425 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 2008, + "rate": 34.305302874899425 + } + }, + "application_errors{status:503}": { + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0.001467, + "p(99)": 0.001548, + "max": 1149.0839, + "avg": 0.28507101477072533, + "p(50)": 0.001266 + } + }, + "checks": { + "values": { + "passes": 4463, + "fails": 0, + "rate": 1 + }, + "type": "rate", + "contains": "default" + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 2119, + "rate": 36.2016617489601 + } + }, + "application_errors{status:0}": { + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default" + }, + "measured_operations": { + "contains": "default", + "values": { + "count": 4219, + "rate": 72.07872152848638 + }, + "type": "counter" + }, + "data_received": { + "values": { + "count": 6094354, + "rate": 104117.85846456912 + }, + "type": "counter", + "contains": "data" + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.03034404232804233, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 18.706683 + } + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 8, + "min": 0, + "max": 8 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 8, + "min": 8, + "max": 8 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.0027153842592592594, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 2.019461 + } + }, + "http_req_sending": { + "values": { + "avg": 0.20042342570546717, + "p(50)": 0.1861285, + "p(95)": 0.33068575, + "p(99)": 0.4858578999999986, + "max": 1.372177 + }, + "type": "trend", + "contains": "time" + } + }, + "setup_data": [ + { + "chat": "aad19813-b918-49ee-a675-ea64de92eb82", + "token": "McFHyQOOmJrQiY0Krd6QuKzx1GQIpQNT-7WVApDz6VQ" + }, + { + "chat": "d5ad0897-8ea4-4a0a-ab1d-ef166cc95420", + "token": "nxyFMZ7Qfz_f83H0oJUker3rugDW3tib4899RiZrw3M" + }, + { + "chat": "8c008e9a-2036-4e1e-a86a-3e2c67892cc9", + "token": "hn_QtclR09h1_f7pdtrF9BKb2dX9YE5pxbBNHqQvfkU" + }, + { + "token": "uokeKLlS__JqpvQF_nnLRiVci1hH0veRFUrpUK_QzdA", + "chat": "cc75aee9-f2b4-4b0f-9e39-48fbfe0a319b" + }, + { + "chat": "0eb6995b-3936-4371-b405-2fe8be652518", + "token": "2C_eomghSuI8cCj8ixXEzraheNmKvSSQjcRrKDkTjYg" + }, + { + "chat": "c25cb19b-67e2-44f7-8236-c25c0627cf61", + "token": "gflPZGijrBU4aI3a_lFP5DAs12kz0qPn6MjZGtP8jnA" + }, + { + "token": "nG2W3lf6c65WOeqXo3VBaIfXCB18YRnxrOUKt3H7TVk", + "chat": "e2dab8da-f10a-4ecd-87ad-5be618910f5d" + }, + { + "token": "2d8wnOfRcTXQ1-H8kSZsQ8Lz68eAiK5p4Q4_qO_0j98", + "chat": "c1caeab7-ebc8-4237-a38b-7f922a083274" + }, + { + "token": "BB1HYKS52PJw-H21L4oFQRt3RobrQAcz7eDNtTHx2wI", + "chat": "e1f4f31f-fcbe-4682-894e-b79fa1f3e840" + }, + { + "chat": "dcf4fa44-5bf7-44bd-adb5-ae3f2b14ad4b", + "token": "-C3EPu5toLqoNXWSWe1oAGYPMNFuKYvPbM_qMZjRJjY" + }, + { + "token": "PES781v5lAqrFxLzgJ66LD5-tUbibpdVT_U1IwYHIxM", + "chat": "7b6cbd4c-b305-4e0b-ac30-71c288d55d50" + }, + { + "chat": "f8868c3e-1d6f-47e3-9212-51ee2ea679d9", + "token": "KggRLbhURDDM3yBVqoxCuh-LIBzMyo60U9OirvvU3Qc" + }, + { + "chat": "a85af962-a595-42b8-bc08-4cada9aa1cfd", + "token": "khFWZr9CUKi46mjpxjYsYHSOUhBe8UtvBBbUx4JCuI8" + }, + { + "chat": "4528529c-c005-4301-9fc9-b42638f2168d", + "token": "Gy0PTXoTT5dwLGtLRZK-wdgPPlAobPOATZiLdWMu8yI" + }, + { + "chat": "95275f21-ae0c-4697-bb49-2535fed94f4d", + "token": "74785SvBvtY7aHVHumO9LnNRQ3C5m6AFgq2LECQ51UA" + }, + { + "chat": "5402e1d5-2d95-4e8f-8b13-563a70fc60f9", + "token": "ofgSsCiaphnhGYa-UgzLOJj-zGPJ1aE02KdsAeaL9t0" + } + ], + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 2127, + "fails": 0 + }, + { + "passes": 217, + "fails": 0, + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa" + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 2119, + "fails": 0 + } + ], + "name": "" + }, + "options": { + "noColor": false, + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "" + } + } +} diff --git a/evidence/research-20261029-budget/load-saturation8-20261029121309.txt b/evidence/research-20261029-budget/load-saturation8-20261029121309.txt new file mode 100644 index 00000000..9247f28c --- /dev/null +++ b/evidence/research-20261029-budget/load-saturation8-20261029121309.txt @@ -0,0 +1,3 @@ +time="2026-10-29T12:13:53Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/health/ready\": request timeout" +time="2026-10-29T12:14:01Z" level=warning msg="setup login: 503; abandoning synthetic actor" source=console +{"profile":{"vus":8,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":58533.224654},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":124.812207,"p(99)":156.87072295,"max":2008.148619,"avg":59.06277293209852,"p(50)":49.5675375}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":105.085101,"p(95)":249.0688166,"p(99)":318.28196140000006,"max":518.972685,"avg":121.67717165125049}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.7203928499999984,"max":3.02267,"avg":0.2122016633597882,"p(50)":0.17847449999999998,"p(95)":0.450818}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"count":4536,"rate":77.49444912377679}},"http_req_failed":{"contains":"default","values":{"passes":7,"fails":4529,"rate":0.0015432098765432098},"type":"rate"},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"data_sent":{"values":{"count":409935,"rate":7003.458333676243},"type":"counter","contains":"data"},"message_latency_ms":{"values":{"avg":60.06522328685268,"p(50)":51.4747885,"p(95)":119.66888329999979,"p(99)":161.99635167000022,"max":383.839615},"type":"trend","contains":"time"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":58.65014784303353,"p(50)":49.104319000000004,"p(95)":124.4806335,"p(99)":156.5714554,"max":2007.92283}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":58.2964705361004,"p(50)":49.600483,"p(95)":124.24023219999997,"p(99)":156.77442796000005,"max":383.839615}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":2008,"rate":34.305302874899425}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":2008,"rate":34.305302874899425}},"application_errors{status:503}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"count":0,"rate":0}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.001467,"p(99)":0.001548,"max":1149.0839,"avg":0.28507101477072533,"p(50)":0.001266}},"checks":{"values":{"passes":4463,"fails":0,"rate":1},"type":"rate","contains":"default"},"iterations":{"type":"counter","contains":"default","values":{"count":2119,"rate":36.2016617489601}},"application_errors{status:0}":{"values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default"},"measured_operations":{"contains":"default","values":{"count":4219,"rate":72.07872152848638},"type":"counter"},"data_received":{"values":{"count":6094354,"rate":104117.85846456912},"type":"counter","contains":"data"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0.03034404232804233,"p(50)":0,"p(95)":0,"p(99)":0,"max":18.706683}},"vus":{"type":"gauge","contains":"default","values":{"value":8,"min":0,"max":8}},"vus_max":{"type":"gauge","contains":"default","values":{"value":8,"min":8,"max":8}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0027153842592592594,"p(50)":0,"p(95)":0,"p(99)":0,"max":2.019461}},"http_req_sending":{"values":{"avg":0.20042342570546717,"p(50)":0.1861285,"p(95)":0.33068575,"p(99)":0.4858578999999986,"max":1.372177},"type":"trend","contains":"time"}},"setup_data":[{"chat":"aad19813-b918-49ee-a675-ea64de92eb82","token":"McFHyQOOmJrQiY0Krd6QuKzx1GQIpQNT-7WVApDz6VQ"},{"chat":"d5ad0897-8ea4-4a0a-ab1d-ef166cc95420","token":"nxyFMZ7Qfz_f83H0oJUker3rugDW3tib4899RiZrw3M"},{"chat":"8c008e9a-2036-4e1e-a86a-3e2c67892cc9","token":"hn_QtclR09h1_f7pdtrF9BKb2dX9YE5pxbBNHqQvfkU"},{"token":"uokeKLlS__JqpvQF_nnLRiVci1hH0veRFUrpUK_QzdA","chat":"cc75aee9-f2b4-4b0f-9e39-48fbfe0a319b"},{"chat":"0eb6995b-3936-4371-b405-2fe8be652518","token":"2C_eomghSuI8cCj8ixXEzraheNmKvSSQjcRrKDkTjYg"},{"chat":"c25cb19b-67e2-44f7-8236-c25c0627cf61","token":"gflPZGijrBU4aI3a_lFP5DAs12kz0qPn6MjZGtP8jnA"},{"token":"nG2W3lf6c65WOeqXo3VBaIfXCB18YRnxrOUKt3H7TVk","chat":"e2dab8da-f10a-4ecd-87ad-5be618910f5d"},{"token":"2d8wnOfRcTXQ1-H8kSZsQ8Lz68eAiK5p4Q4_qO_0j98","chat":"c1caeab7-ebc8-4237-a38b-7f922a083274"},{"token":"BB1HYKS52PJw-H21L4oFQRt3RobrQAcz7eDNtTHx2wI","chat":"e1f4f31f-fcbe-4682-894e-b79fa1f3e840"},{"chat":"dcf4fa44-5bf7-44bd-adb5-ae3f2b14ad4b","token":"-C3EPu5toLqoNXWSWe1oAGYPMNFuKYvPbM_qMZjRJjY"},{"token":"PES781v5lAqrFxLzgJ66LD5-tUbibpdVT_U1IwYHIxM","chat":"7b6cbd4c-b305-4e0b-ac30-71c288d55d50"},{"chat":"f8868c3e-1d6f-47e3-9212-51ee2ea679d9","token":"KggRLbhURDDM3yBVqoxCuh-LIBzMyo60U9OirvvU3Qc"},{"chat":"a85af962-a595-42b8-bc08-4cada9aa1cfd","token":"khFWZr9CUKi46mjpxjYsYHSOUhBe8UtvBBbUx4JCuI8"},{"chat":"4528529c-c005-4301-9fc9-b42638f2168d","token":"Gy0PTXoTT5dwLGtLRZK-wdgPPlAobPOATZiLdWMu8yI"},{"chat":"95275f21-ae0c-4697-bb49-2535fed94f4d","token":"74785SvBvtY7aHVHumO9LnNRQ3C5m6AFgq2LECQ51UA"},{"chat":"5402e1d5-2d95-4e8f-8b13-563a70fc60f9","token":"ofgSsCiaphnhGYa-UgzLOJj-zGPJ1aE02KdsAeaL9t0"}],"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":2127,"fails":0},{"passes":217,"fails":0,"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa"},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":2119,"fails":0}],"name":""},"options":{"noColor":false,"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""}}} diff --git a/evidence/research-20261029-budget/nodes.txt b/evidence/research-20261029-budget/nodes.txt new file mode 100644 index 00000000..e6b77ed4 --- /dev/null +++ b/evidence/research-20261029-budget/nodes.txt @@ -0,0 +1,4 @@ +NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME +dev.asisti.tech Ready 252d v1.33.13 100.99.166.40 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 +marlosrv0 Ready 254d v1.33.13 192.168.1.37 Ubuntu 24.04.5 LTS 6.8.0-147-generic containerd://1.7.29 +srv0.agapov.space Ready 247d v1.33.13 100.108.186.94 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 diff --git a/evidence/research-20261029-budget/pods-growing1-20261029115804.txt b/evidence/research-20261029-budget/pods-growing1-20261029115804.txt new file mode 100644 index 00000000..1371b882 --- /dev/null +++ b/evidence/research-20261029-budget/pods-growing1-20261029115804.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-577bffc7b-dvvjk 1/1 Running 0 36s 10.1.25.84 dev.asisti.tech diff --git a/evidence/research-20261029-budget/pods-resource-high-a-20261029121644.txt b/evidence/research-20261029-budget/pods-resource-high-a-20261029121644.txt new file mode 100644 index 00000000..44c89361 --- /dev/null +++ b/evidence/research-20261029-budget/pods-resource-high-a-20261029121644.txt @@ -0,0 +1,3 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-54d5599c7b-686bv 1/1 Running 0 39s 10.1.25.96 dev.asisti.tech +api-54d5599c7b-mltrn 1/1 Running 0 35s 10.1.25.125 dev.asisti.tech diff --git a/evidence/research-20261029-budget/pods-resource-high-b-20261029122017.txt b/evidence/research-20261029-budget/pods-resource-high-b-20261029122017.txt new file mode 100644 index 00000000..187b8ade --- /dev/null +++ b/evidence/research-20261029-budget/pods-resource-high-b-20261029122017.txt @@ -0,0 +1,3 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-54d5599c7b-d2w8w 1/1 Running 0 34s 10.1.25.87 dev.asisti.tech +api-54d5599c7b-kbkkc 1/1 Running 0 38s 10.1.25.86 dev.asisti.tech diff --git a/evidence/research-20261029-budget/pods-resource-low-a-20261029121455.txt b/evidence/research-20261029-budget/pods-resource-low-a-20261029121455.txt new file mode 100644 index 00000000..b8889d79 --- /dev/null +++ b/evidence/research-20261029-budget/pods-resource-low-a-20261029121455.txt @@ -0,0 +1,3 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-577bffc7b-mb5qr 1/1 Running 0 50s 10.1.25.74 dev.asisti.tech +api-577bffc7b-xqltd 1/1 Running 0 36s 10.1.25.90 dev.asisti.tech diff --git a/evidence/research-20261029-budget/pods-resource-low-b-20261029121833.txt b/evidence/research-20261029-budget/pods-resource-low-b-20261029121833.txt new file mode 100644 index 00000000..8e759c97 --- /dev/null +++ b/evidence/research-20261029-budget/pods-resource-low-b-20261029121833.txt @@ -0,0 +1,3 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-577bffc7b-7nl2h 1/1 Running 0 42s 10.1.25.80 dev.asisti.tech +api-577bffc7b-scz2v 1/1 Running 0 37s 10.1.25.78 dev.asisti.tech diff --git a/evidence/research-20261029-budget/pods-saturation8-20261029121309.txt b/evidence/research-20261029-budget/pods-saturation8-20261029121309.txt new file mode 100644 index 00000000..cbf9e364 --- /dev/null +++ b/evidence/research-20261029-budget/pods-saturation8-20261029121309.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-84fbf9968-lbwjl 1/1 Running 0 35s 10.1.25.108 dev.asisti.tech diff --git a/evidence/research-20261029-budget/profiles.csv b/evidence/research-20261029-budget/profiles.csv new file mode 100644 index 00000000..909711b9 --- /dev/null +++ b/evidence/research-20261029-budget/profiles.csv @@ -0,0 +1,7 @@ +profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool,vus,duration +growing1,growing1-20261029115804,1,250,128,8,32,30 +saturation8,saturation8-20261029121309,1,1000,512,8,8,30 +resource-low-a,resource-low-a-20261029121455,2,250,128,8,32,30 +resource-high-a,resource-high-a-20261029121644,2,500,256,8,32,30 +resource-low-b,resource-low-b-20261029121833,2,250,128,8,32,30 +resource-high-b,resource-high-b-20261029122017,2,500,256,8,32,30 diff --git a/evidence/research-20261029-budget/resources-growing1-20261029115804.txt b/evidence/research-20261029-budget/resources-growing1-20261029115804.txt new file mode 100644 index 00000000..2c1dee53 --- /dev/null +++ b/evidence/research-20261029-budget/resources-growing1-20261029115804.txt @@ -0,0 +1,107 @@ +UTC 2026-10-29T11:58:42Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-dvvjk 2m 23Mi +postgres-0 5m 63Mi +valkey-0 6m 10Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:58:48Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-dvvjk 3m 23Mi +postgres-0 2m 63Mi +valkey-0 9m 10Mi +valkey-1 5m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:58:53Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-dvvjk 3m 23Mi +postgres-0 2m 63Mi +valkey-0 9m 10Mi +valkey-1 5m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:58:59Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-dvvjk 3m 23Mi +postgres-0 2m 63Mi +valkey-0 9m 10Mi +valkey-1 5m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:59:04Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-dvvjk 100m 59Mi +load-growing1-20261029115804-54pjv 51m 18Mi +postgres-0 7m 64Mi +valkey-0 9m 10Mi +valkey-1 15m 15Mi +valkey-2 7m 4Mi +active|Lock|transactionid|1 +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|7 +UTC 2026-10-29T11:59:10Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-dvvjk 100m 59Mi +load-growing1-20261029115804-54pjv 51m 18Mi +postgres-0 7m 64Mi +valkey-0 9m 10Mi +valkey-1 15m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:59:16Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-dvvjk 188m 14Mi +load-growing1-20261029115804-54pjv 80m 26Mi +postgres-0 94m 81Mi +valkey-0 35m 10Mi +valkey-1 29m 15Mi +valkey-2 12m 4Mi +active|IO|WalSync|1 +active|Lock|transactionid|1 +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|3 +UTC 2026-10-29T11:59:22Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-dvvjk 188m 14Mi +load-growing1-20261029115804-54pjv 80m 26Mi +postgres-0 94m 81Mi +valkey-0 35m 10Mi +valkey-1 29m 15Mi +valkey-2 12m 4Mi +active|||1 +idle|Client|ClientRead|6 +idle in transaction|Client|ClientRead|3 +UTC 2026-10-29T11:59:27Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-dvvjk 188m 14Mi +load-growing1-20261029115804-54pjv 80m 26Mi +postgres-0 94m 81Mi +valkey-0 35m 10Mi +valkey-1 29m 15Mi +valkey-2 12m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:13:08Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-dvvjk 3m 12Mi +postgres-0 4m 83Mi +valkey-0 9m 8Mi +valkey-1 5m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-budget/resources-resource-high-a-20261029121644.txt b/evidence/research-20261029-budget/resources-resource-high-a-20261029121644.txt new file mode 100644 index 00000000..1a6b9766 --- /dev/null +++ b/evidence/research-20261029-budget/resources-resource-high-a-20261029121644.txt @@ -0,0 +1,112 @@ +UTC 2026-10-29T12:17:26Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-686bv 10m 22Mi +api-54d5599c7b-mltrn 20m 22Mi +postgres-0 6m 68Mi +valkey-0 10m 9Mi +valkey-1 4m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:17:46Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-686bv 3m 23Mi +api-54d5599c7b-mltrn 3m 23Mi +load-resource-high-a-20261029121644-nrbcx 10m 16Mi +postgres-0 4m 68Mi +valkey-0 8m 9Mi +valkey-1 5m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:17:52Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-686bv 3m 23Mi +api-54d5599c7b-mltrn 3m 23Mi +load-resource-high-a-20261029121644-nrbcx 10m 16Mi +postgres-0 4m 68Mi +valkey-0 8m 9Mi +valkey-1 5m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:17:58Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-686bv 3m 23Mi +api-54d5599c7b-mltrn 3m 23Mi +load-resource-high-a-20261029121644-nrbcx 10m 16Mi +postgres-0 4m 68Mi +valkey-0 8m 9Mi +valkey-1 5m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:18:04Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-686bv 88m 60Mi +api-54d5599c7b-mltrn 172m 59Mi +load-resource-high-a-20261029121644-nrbcx 33m 19Mi +postgres-0 46m 75Mi +valkey-0 33m 9Mi +valkey-1 5m 15Mi +valkey-2 6m 4Mi +active|IO|WalSync|1 +active|Lock|transactionid|1 +active|||2 +idle|Client|ClientRead|13 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:18:10Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-686bv 88m 60Mi +api-54d5599c7b-mltrn 172m 59Mi +load-resource-high-a-20261029121644-nrbcx 33m 19Mi +postgres-0 46m 75Mi +valkey-0 33m 9Mi +valkey-1 5m 15Mi +valkey-2 6m 4Mi +active|||4 +idle|Client|ClientRead|11 +idle|||1 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T12:18:16Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-686bv 200m 14Mi +api-54d5599c7b-mltrn 298m 15Mi +load-resource-high-a-20261029121644-nrbcx 295m 29Mi +postgres-0 377m 106Mi +valkey-0 114m 9Mi +valkey-1 18m 15Mi +valkey-2 92m 5Mi +active|IO|WalSync|1 +active|LWLock|WALWrite|2 +active|||3 +idle|Client|ClientRead|11 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:18:22Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-686bv 200m 14Mi +api-54d5599c7b-mltrn 298m 15Mi +load-resource-high-a-20261029121644-nrbcx 295m 29Mi +postgres-0 377m 106Mi +valkey-0 114m 9Mi +valkey-1 18m 15Mi +valkey-2 92m 5Mi +active|||3 +idle|Client|ClientRead|14 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:18:27Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-686bv 200m 14Mi +api-54d5599c7b-mltrn 298m 15Mi +load-resource-high-a-20261029121644-nrbcx 295m 29Mi +postgres-0 377m 106Mi +valkey-0 114m 9Mi +valkey-1 18m 15Mi +valkey-2 92m 5Mi +active|||2 +idle|Client|ClientRead|14 +idle in transaction|Client|ClientRead|2 diff --git a/evidence/research-20261029-budget/resources-resource-high-b-20261029122017.txt b/evidence/research-20261029-budget/resources-resource-high-b-20261029122017.txt new file mode 100644 index 00000000..9b3bd39a --- /dev/null +++ b/evidence/research-20261029-budget/resources-resource-high-b-20261029122017.txt @@ -0,0 +1,97 @@ +UTC 2026-10-29T12:20:57Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-d2w8w 2m 22Mi +api-54d5599c7b-kbkkc 2m 22Mi +postgres-0 9m 71Mi +valkey-0 8m 9Mi +valkey-1 4m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:21:03Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-d2w8w 2m 22Mi +api-54d5599c7b-kbkkc 2m 22Mi +postgres-0 4m 71Mi +valkey-0 7m 9Mi +valkey-1 6m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:21:09Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-d2w8w 109m 9Mi +api-54d5599c7b-kbkkc 83m 58Mi +load-resource-high-b-20261029122017-7ssbm 50m 22Mi +postgres-0 42m 78Mi +valkey-0 31m 9Mi +valkey-1 6m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|15 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T12:21:21Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-d2w8w 109m 9Mi +api-54d5599c7b-kbkkc 83m 58Mi +load-resource-high-b-20261029122017-7ssbm 50m 22Mi +postgres-0 42m 78Mi +valkey-0 31m 9Mi +valkey-1 6m 15Mi +valkey-2 6m 4Mi +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|9 +idle in transaction|Client|ClientRead|5 +idle in transaction|||2 +UTC 2026-10-29T12:21:27Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-d2w8w 109m 9Mi +api-54d5599c7b-kbkkc 83m 58Mi +load-resource-high-b-20261029122017-7ssbm 50m 22Mi +postgres-0 42m 78Mi +valkey-0 31m 9Mi +valkey-1 6m 15Mi +valkey-2 6m 4Mi +active|IO|WalSync|1 +active|||2 +idle|Client|ClientRead|11 +idle in transaction|Client|ClientRead|4 +UTC 2026-10-29T12:21:33Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-d2w8w 307m 13Mi +api-54d5599c7b-kbkkc 203m 12Mi +load-resource-high-b-20261029122017-7ssbm 50m 22Mi +postgres-0 287m 108Mi +valkey-0 120m 9Mi +valkey-1 45m 15Mi +valkey-2 34m 5Mi +active|Client|ClientRead|1 +active|||2 +idle|Client|ClientRead|14 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:21:42Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-d2w8w 307m 13Mi +api-54d5599c7b-kbkkc 203m 12Mi +load-resource-high-b-20261029122017-7ssbm 50m 22Mi +postgres-0 287m 108Mi +valkey-0 120m 9Mi +valkey-1 45m 15Mi +valkey-2 34m 5Mi +active|||1 +idle|Client|ClientRead|16 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:21:48Z +NAME CPU(cores) MEMORY(bytes) +api-54d5599c7b-d2w8w 386m 14Mi +api-54d5599c7b-kbkkc 391m 12Mi +postgres-0 851m 111Mi +valkey-0 155m 9Mi +valkey-1 138m 15Mi +valkey-2 84m 5Mi +active|||1 +idle|Client|ClientRead|16 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-budget/resources-resource-low-a-20261029121455.txt b/evidence/research-20261029-budget/resources-resource-low-a-20261029121455.txt new file mode 100644 index 00000000..54a7b3bc --- /dev/null +++ b/evidence/research-20261029-budget/resources-resource-low-a-20261029121455.txt @@ -0,0 +1,92 @@ +UTC 2026-10-29T12:15:47Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-mb5qr 2m 22Mi +api-577bffc7b-xqltd 3m 22Mi +postgres-0 11m 67Mi +valkey-0 9m 8Mi +valkey-1 5m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:15:53Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-mb5qr 2m 22Mi +api-577bffc7b-xqltd 3m 22Mi +postgres-0 11m 67Mi +valkey-0 9m 8Mi +valkey-1 5m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:15:58Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-mb5qr 2m 22Mi +api-577bffc7b-xqltd 3m 22Mi +postgres-0 11m 67Mi +valkey-0 9m 8Mi +valkey-1 5m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:16:04Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-mb5qr 42m 59Mi +api-577bffc7b-xqltd 68m 61Mi +load-resource-low-a-20261029121455-tn8rc 49m 17Mi +postgres-0 11m 67Mi +valkey-0 9m 8Mi +valkey-1 6m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|6 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:16:10Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-mb5qr 42m 59Mi +api-577bffc7b-xqltd 68m 61Mi +load-resource-low-a-20261029121455-tn8rc 49m 17Mi +postgres-0 11m 67Mi +valkey-0 9m 8Mi +valkey-1 6m 15Mi +valkey-2 7m 4Mi +active|||2 +idle|Client|ClientRead|13 +idle|||1 +idle in transaction|Client|ClientRead|1 +idle in transaction|IO|WalSync|1 +UTC 2026-10-29T12:16:31Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-mb5qr 31m 8Mi +api-577bffc7b-xqltd 33m 9Mi +load-resource-low-a-20261029121455-tn8rc 50m 22Mi +postgres-0 111m 103Mi +valkey-0 19m 9Mi +valkey-2 18m 4Mi +active|||2 +idle|Client|ClientRead|11 +idle in transaction|Client|ClientRead|4 +idle in transaction|||1 +UTC 2026-10-29T12:16:37Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-mb5qr 31m 8Mi +api-577bffc7b-xqltd 33m 9Mi +load-resource-low-a-20261029121455-tn8rc 50m 22Mi +postgres-0 111m 103Mi +valkey-0 19m 9Mi +valkey-2 18m 4Mi +active|||1 +idle|Client|ClientRead|12 +idle in transaction|Client|ClientRead|5 +UTC 2026-10-29T12:16:43Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-mb5qr 31m 8Mi +api-577bffc7b-xqltd 33m 9Mi +postgres-0 111m 103Mi +valkey-0 19m 9Mi +valkey-2 18m 4Mi +active|||1 +idle|Client|ClientRead|16 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-budget/resources-resource-low-b-20261029121833.txt b/evidence/research-20261029-budget/resources-resource-low-b-20261029121833.txt new file mode 100644 index 00000000..3832581d --- /dev/null +++ b/evidence/research-20261029-budget/resources-resource-low-b-20261029121833.txt @@ -0,0 +1,82 @@ +UTC 2026-10-29T12:19:17Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7nl2h 3m 22Mi +api-577bffc7b-scz2v 3m 22Mi +postgres-0 4m 70Mi +valkey-0 8m 9Mi +valkey-1 6m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:19:23Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7nl2h 3m 22Mi +api-577bffc7b-scz2v 3m 22Mi +postgres-0 4m 70Mi +valkey-0 8m 9Mi +valkey-1 6m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:19:29Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7nl2h 3m 22Mi +api-577bffc7b-scz2v 3m 22Mi +postgres-0 4m 70Mi +valkey-0 8m 9Mi +valkey-1 6m 15Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|3 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:19:34Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7nl2h 2m 22Mi +api-577bffc7b-scz2v 23m 61Mi +load-resource-low-b-20261029121833-2hx7m 34m 16Mi +postgres-0 19m 73Mi +valkey-0 8m 9Mi +valkey-1 6m 15Mi +valkey-2 5m 5Mi +active|IO|WalSync|1 +active|||3 +idle|Client|ClientRead|9 +idle|||1 +idle in transaction|Client|ClientRead|4 +UTC 2026-10-29T12:19:47Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7nl2h 2m 22Mi +api-577bffc7b-scz2v 23m 61Mi +load-resource-low-b-20261029121833-2hx7m 34m 16Mi +postgres-0 19m 73Mi +valkey-0 8m 9Mi +valkey-1 6m 15Mi +valkey-2 5m 5Mi +active|||3 +idle|Client|ClientRead|13 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T12:20:05Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7nl2h 44m 12Mi +api-577bffc7b-scz2v 104m 10Mi +load-resource-low-b-20261029121833-2hx7m 58m 24Mi +postgres-0 5m 107Mi +valkey-0 26m 9Mi +valkey-2 18m 4Mi +active|Lock|transactionid|1 +active|||1 +idle|Client|ClientRead|13 +idle in transaction|Client|ClientRead|3 +UTC 2026-10-29T12:20:11Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7nl2h 44m 12Mi +api-577bffc7b-scz2v 104m 10Mi +load-resource-low-b-20261029121833-2hx7m 58m 24Mi +postgres-0 5m 107Mi +valkey-0 26m 9Mi +valkey-2 18m 4Mi +active|||1 +idle|Client|ClientRead|16 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-budget/resources-saturation8-20261029121309.txt b/evidence/research-20261029-budget/resources-saturation8-20261029121309.txt new file mode 100644 index 00000000..9343c74d --- /dev/null +++ b/evidence/research-20261029-budget/resources-saturation8-20261029121309.txt @@ -0,0 +1,115 @@ +UTC 2026-10-29T12:13:50Z +Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io) +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:13:59Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lbwjl 21m 22Mi +postgres-0 8m 64Mi +valkey-0 10m 8Mi +valkey-1 5m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:14:04Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lbwjl 3m 22Mi +postgres-0 3m 64Mi +valkey-0 8m 8Mi +valkey-1 3m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:14:10Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lbwjl 3m 22Mi +postgres-0 3m 64Mi +valkey-0 8m 8Mi +valkey-1 3m 15Mi +valkey-2 6m 4Mi +active|||2 +idle|Client|ClientRead|2 +idle|||1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:14:16Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lbwjl 54m 59Mi +load-saturation8-20261029121309-rt8h2 22m 13Mi +postgres-0 19m 65Mi +valkey-0 12m 8Mi +valkey-1 6m 15Mi +valkey-2 8m 4Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:14:22Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lbwjl 54m 59Mi +load-saturation8-20261029121309-rt8h2 22m 13Mi +postgres-0 19m 65Mi +valkey-0 12m 8Mi +valkey-1 6m 15Mi +valkey-2 8m 4Mi +active|||2 +idle|Client|ClientRead|7 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:14:27Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lbwjl 54m 59Mi +load-saturation8-20261029121309-rt8h2 22m 13Mi +postgres-0 19m 65Mi +valkey-0 12m 8Mi +valkey-1 6m 15Mi +valkey-2 8m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:14:33Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lbwjl 260m 62Mi +load-saturation8-20261029121309-rt8h2 45m 15Mi +postgres-0 210m 83Mi +valkey-0 51m 8Mi +valkey-1 15m 15Mi +valkey-2 8m 4Mi +active|IO|WalSync|1 +active|LWLock|WALWrite|1 +active|||2 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:14:39Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lbwjl 260m 62Mi +load-saturation8-20261029121309-rt8h2 45m 15Mi +postgres-0 210m 83Mi +valkey-0 51m 8Mi +valkey-1 15m 15Mi +valkey-2 8m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:14:45Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lbwjl 488m 11Mi +load-saturation8-20261029121309-rt8h2 211m 18Mi +postgres-0 499m 84Mi +valkey-0 130m 8Mi +valkey-1 53m 15Mi +valkey-2 47m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T12:14:51Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lbwjl 488m 11Mi +load-saturation8-20261029121309-rt8h2 211m 18Mi +postgres-0 499m 84Mi +valkey-0 130m 8Mi +valkey-1 53m 15Mi +valkey-2 47m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-budget/restore-values.yaml b/evidence/research-20261029-budget/restore-values.yaml new file mode 100644 index 00000000..4e915dac --- /dev/null +++ b/evidence/research-20261029-budget/restore-values.yaml @@ -0,0 +1,61 @@ +api: + env: + DEPENDENCY_POOL_SIZE: "8" + DEPENDENCY_TIMEOUT_MS: "2000" + GOMEMLIMIT: 160MiB + REQUEST_TIMEOUT_SECONDS: "4" + SESSION_TTL_SECONDS: "3600" + SHUTDOWN_TIMEOUT_SECONDS: "5" + replicas: 2 + resources: + limits: + cpu: "1" + memory: 256Mi + requests: + cpu: 250m + memory: 128Mi +autoscaling: + cpuPercent: 60 + enabled: true + maxReplicas: 4 + minReplicas: 2 +databaseSecret: messenger-secrets +image: + digest: sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 + repository: asisti.registry.twcstorage.ru/mtusi2026lab3 +imagePullSecret: registry-pull +ingress: + className: traefik + clusterIssuer: letsencrypt-prod + host: hl.agapov.space +load: + duration: 30 + enabled: false + run: manual + script: scaling.js + vus: 32 +monitoring: + serviceMonitor: false +postgres: + image: postgres:17.6-alpine + resources: + limits: + cpu: "1" + memory: 512Mi + requests: + cpu: 250m + memory: 256Mi + storage: 2Gi +storageClass: "" +valkey: + image: valkey/valkey:8.1.3-alpine + maxmemory: 64mb + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 100m + memory: 96Mi + shards: 3 + storage: 1Gi diff --git a/evidence/research-20261029-budget/restore.txt b/evidence/research-20261029-budget/restore.txt new file mode 100644 index 00000000..32a33fd9 --- /dev/null +++ b/evidence/research-20261029-budget/restore.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 15:21:51 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 40 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-budget/rollout-growing1.txt b/evidence/research-20261029-budget/rollout-growing1.txt new file mode 100644 index 00000000..f2c4a73c --- /dev/null +++ b/evidence/research-20261029-budget/rollout-growing1.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:58:04 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 34 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-budget/rollout-resource-high-a.txt b/evidence/research-20261029-budget/rollout-resource-high-a.txt new file mode 100644 index 00000000..7facbbdc --- /dev/null +++ b/evidence/research-20261029-budget/rollout-resource-high-a.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 15:16:45 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 37 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-budget/rollout-resource-high-b.txt b/evidence/research-20261029-budget/rollout-resource-high-b.txt new file mode 100644 index 00000000..15eb4160 --- /dev/null +++ b/evidence/research-20261029-budget/rollout-resource-high-b.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 15:20:18 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 39 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-budget/rollout-resource-low-a.txt b/evidence/research-20261029-budget/rollout-resource-low-a.txt new file mode 100644 index 00000000..f858ba09 --- /dev/null +++ b/evidence/research-20261029-budget/rollout-resource-low-a.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 15:14:56 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 36 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-budget/rollout-resource-low-b.txt b/evidence/research-20261029-budget/rollout-resource-low-b.txt new file mode 100644 index 00000000..8e0d9723 --- /dev/null +++ b/evidence/research-20261029-budget/rollout-resource-low-b.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 15:18:34 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 38 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-budget/rollout-saturation8.txt b/evidence/research-20261029-budget/rollout-saturation8.txt new file mode 100644 index 00000000..511e2bfe --- /dev/null +++ b/evidence/research-20261029-budget/rollout-saturation8.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 15:13:10 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 35 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-budget/source.sha256 b/evidence/research-20261029-budget/source.sha256 new file mode 100644 index 00000000..b6c26a83 --- /dev/null +++ b/evidence/research-20261029-budget/source.sha256 @@ -0,0 +1,3 @@ +0a58dff9ad7acf8f228e0fd1c2a670bbe7e18a11360715b47659104832e34892 student-tests/load/scaling.js +c0506f65b976d54273f3e2fb3404b732929a276263ff8974c2a6ab6e27820b8b charts/messenger/values.yaml +60e09dd38fd1d413b744f21b57f64ba83e49a5ae1b4251aa5bf20be033f90cfb internal/controller/http/fiber/errors.go diff --git a/evidence/research-20261029-budget/values-growing1-20261029115804.json b/evidence/research-20261029-budget/values-growing1-20261029115804.json new file mode 100644 index 00000000..5688ec73 --- /dev/null +++ b/evidence/research-20261029-budget/values-growing1-20261029115804.json @@ -0,0 +1 @@ +{"api":{"env":{"DEPENDENCY_POOL_SIZE":"8","DEPENDENCY_TIMEOUT_MS":"2000","GOMEMLIMIT":"80MiB","REQUEST_TIMEOUT_SECONDS":"4","SESSION_TTL_SECONDS":"3600","SHUTDOWN_TIMEOUT_SECONDS":"5"},"nodeSelector":{"kubernetes.io/hostname":"dev.asisti.tech"},"readiness":{"failureThreshold":2,"timeoutSeconds":2},"replicas":1,"resources":{"limits":{"cpu":"250m","memory":"128Mi"},"requests":{"cpu":"250m","memory":"128Mi"}}},"autoscaling":{"cpuPercent":60,"enabled":false,"maxReplicas":4,"minReplicas":2},"databaseSecret":"messenger-secrets","image":{"digest":"sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3","repository":"asisti.registry.twcstorage.ru/mtusi2026lab3"},"imagePullSecret":"registry-pull","ingress":{"className":"traefik","clusterIssuer":"letsencrypt-prod","host":"hl.agapov.space"},"load":{"duration":30,"enabled":false,"run":"manual","script":"scaling.js","vus":32},"monitoring":{"serviceMonitor":false},"postgres":{"image":"postgres:17.6-alpine","resources":{"limits":{"cpu":"1","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}},"storage":"2Gi"},"storageClass":"","valkey":{"image":"valkey/valkey:8.1.3-alpine","maxmemory":"64mb","resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"96Mi"}},"shards":3,"storage":"1Gi"}} diff --git a/evidence/research-20261029-budget/values-resource-high-a-20261029121644.json b/evidence/research-20261029-budget/values-resource-high-a-20261029121644.json new file mode 100644 index 00000000..12fa1397 --- /dev/null +++ b/evidence/research-20261029-budget/values-resource-high-a-20261029121644.json @@ -0,0 +1 @@ +{"api":{"env":{"DEPENDENCY_POOL_SIZE":"8","DEPENDENCY_TIMEOUT_MS":"2000","GOMEMLIMIT":"80MiB","REQUEST_TIMEOUT_SECONDS":"4","SESSION_TTL_SECONDS":"3600","SHUTDOWN_TIMEOUT_SECONDS":"5"},"nodeSelector":{"kubernetes.io/hostname":"dev.asisti.tech"},"readiness":{"failureThreshold":2,"timeoutSeconds":2},"replicas":2,"resources":{"limits":{"cpu":"500m","memory":"256Mi"},"requests":{"cpu":"500m","memory":"256Mi"}}},"autoscaling":{"cpuPercent":60,"enabled":false,"maxReplicas":4,"minReplicas":2},"databaseSecret":"messenger-secrets","image":{"digest":"sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3","repository":"asisti.registry.twcstorage.ru/mtusi2026lab3"},"imagePullSecret":"registry-pull","ingress":{"className":"traefik","clusterIssuer":"letsencrypt-prod","host":"hl.agapov.space"},"load":{"duration":30,"enabled":false,"run":"manual","script":"scaling.js","vus":32},"monitoring":{"serviceMonitor":false},"postgres":{"image":"postgres:17.6-alpine","resources":{"limits":{"cpu":"1","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}},"storage":"2Gi"},"storageClass":"","valkey":{"image":"valkey/valkey:8.1.3-alpine","maxmemory":"64mb","resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"96Mi"}},"shards":3,"storage":"1Gi"}} diff --git a/evidence/research-20261029-budget/values-resource-high-b-20261029122017.json b/evidence/research-20261029-budget/values-resource-high-b-20261029122017.json new file mode 100644 index 00000000..12fa1397 --- /dev/null +++ b/evidence/research-20261029-budget/values-resource-high-b-20261029122017.json @@ -0,0 +1 @@ +{"api":{"env":{"DEPENDENCY_POOL_SIZE":"8","DEPENDENCY_TIMEOUT_MS":"2000","GOMEMLIMIT":"80MiB","REQUEST_TIMEOUT_SECONDS":"4","SESSION_TTL_SECONDS":"3600","SHUTDOWN_TIMEOUT_SECONDS":"5"},"nodeSelector":{"kubernetes.io/hostname":"dev.asisti.tech"},"readiness":{"failureThreshold":2,"timeoutSeconds":2},"replicas":2,"resources":{"limits":{"cpu":"500m","memory":"256Mi"},"requests":{"cpu":"500m","memory":"256Mi"}}},"autoscaling":{"cpuPercent":60,"enabled":false,"maxReplicas":4,"minReplicas":2},"databaseSecret":"messenger-secrets","image":{"digest":"sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3","repository":"asisti.registry.twcstorage.ru/mtusi2026lab3"},"imagePullSecret":"registry-pull","ingress":{"className":"traefik","clusterIssuer":"letsencrypt-prod","host":"hl.agapov.space"},"load":{"duration":30,"enabled":false,"run":"manual","script":"scaling.js","vus":32},"monitoring":{"serviceMonitor":false},"postgres":{"image":"postgres:17.6-alpine","resources":{"limits":{"cpu":"1","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}},"storage":"2Gi"},"storageClass":"","valkey":{"image":"valkey/valkey:8.1.3-alpine","maxmemory":"64mb","resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"96Mi"}},"shards":3,"storage":"1Gi"}} diff --git a/evidence/research-20261029-budget/values-resource-low-a-20261029121455.json b/evidence/research-20261029-budget/values-resource-low-a-20261029121455.json new file mode 100644 index 00000000..9711a783 --- /dev/null +++ b/evidence/research-20261029-budget/values-resource-low-a-20261029121455.json @@ -0,0 +1 @@ +{"api":{"env":{"DEPENDENCY_POOL_SIZE":"8","DEPENDENCY_TIMEOUT_MS":"2000","GOMEMLIMIT":"80MiB","REQUEST_TIMEOUT_SECONDS":"4","SESSION_TTL_SECONDS":"3600","SHUTDOWN_TIMEOUT_SECONDS":"5"},"nodeSelector":{"kubernetes.io/hostname":"dev.asisti.tech"},"readiness":{"failureThreshold":2,"timeoutSeconds":2},"replicas":2,"resources":{"limits":{"cpu":"250m","memory":"128Mi"},"requests":{"cpu":"250m","memory":"128Mi"}}},"autoscaling":{"cpuPercent":60,"enabled":false,"maxReplicas":4,"minReplicas":2},"databaseSecret":"messenger-secrets","image":{"digest":"sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3","repository":"asisti.registry.twcstorage.ru/mtusi2026lab3"},"imagePullSecret":"registry-pull","ingress":{"className":"traefik","clusterIssuer":"letsencrypt-prod","host":"hl.agapov.space"},"load":{"duration":30,"enabled":false,"run":"manual","script":"scaling.js","vus":32},"monitoring":{"serviceMonitor":false},"postgres":{"image":"postgres:17.6-alpine","resources":{"limits":{"cpu":"1","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}},"storage":"2Gi"},"storageClass":"","valkey":{"image":"valkey/valkey:8.1.3-alpine","maxmemory":"64mb","resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"96Mi"}},"shards":3,"storage":"1Gi"}} diff --git a/evidence/research-20261029-budget/values-resource-low-b-20261029121833.json b/evidence/research-20261029-budget/values-resource-low-b-20261029121833.json new file mode 100644 index 00000000..9711a783 --- /dev/null +++ b/evidence/research-20261029-budget/values-resource-low-b-20261029121833.json @@ -0,0 +1 @@ +{"api":{"env":{"DEPENDENCY_POOL_SIZE":"8","DEPENDENCY_TIMEOUT_MS":"2000","GOMEMLIMIT":"80MiB","REQUEST_TIMEOUT_SECONDS":"4","SESSION_TTL_SECONDS":"3600","SHUTDOWN_TIMEOUT_SECONDS":"5"},"nodeSelector":{"kubernetes.io/hostname":"dev.asisti.tech"},"readiness":{"failureThreshold":2,"timeoutSeconds":2},"replicas":2,"resources":{"limits":{"cpu":"250m","memory":"128Mi"},"requests":{"cpu":"250m","memory":"128Mi"}}},"autoscaling":{"cpuPercent":60,"enabled":false,"maxReplicas":4,"minReplicas":2},"databaseSecret":"messenger-secrets","image":{"digest":"sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3","repository":"asisti.registry.twcstorage.ru/mtusi2026lab3"},"imagePullSecret":"registry-pull","ingress":{"className":"traefik","clusterIssuer":"letsencrypt-prod","host":"hl.agapov.space"},"load":{"duration":30,"enabled":false,"run":"manual","script":"scaling.js","vus":32},"monitoring":{"serviceMonitor":false},"postgres":{"image":"postgres:17.6-alpine","resources":{"limits":{"cpu":"1","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}},"storage":"2Gi"},"storageClass":"","valkey":{"image":"valkey/valkey:8.1.3-alpine","maxmemory":"64mb","resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"96Mi"}},"shards":3,"storage":"1Gi"}} diff --git a/evidence/research-20261029-budget/values-saturation8-20261029121309.json b/evidence/research-20261029-budget/values-saturation8-20261029121309.json new file mode 100644 index 00000000..d7a5aa78 --- /dev/null +++ b/evidence/research-20261029-budget/values-saturation8-20261029121309.json @@ -0,0 +1 @@ +{"api":{"env":{"DEPENDENCY_POOL_SIZE":"8","DEPENDENCY_TIMEOUT_MS":"2000","GOMEMLIMIT":"80MiB","REQUEST_TIMEOUT_SECONDS":"4","SESSION_TTL_SECONDS":"3600","SHUTDOWN_TIMEOUT_SECONDS":"5"},"nodeSelector":{"kubernetes.io/hostname":"dev.asisti.tech"},"readiness":{"failureThreshold":2,"timeoutSeconds":2},"replicas":1,"resources":{"limits":{"cpu":"1000m","memory":"512Mi"},"requests":{"cpu":"1000m","memory":"512Mi"}}},"autoscaling":{"cpuPercent":60,"enabled":false,"maxReplicas":4,"minReplicas":2},"databaseSecret":"messenger-secrets","image":{"digest":"sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3","repository":"asisti.registry.twcstorage.ru/mtusi2026lab3"},"imagePullSecret":"registry-pull","ingress":{"className":"traefik","clusterIssuer":"letsencrypt-prod","host":"hl.agapov.space"},"load":{"duration":30,"enabled":false,"run":"manual","script":"scaling.js","vus":32},"monitoring":{"serviceMonitor":false},"postgres":{"image":"postgres:17.6-alpine","resources":{"limits":{"cpu":"1","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}},"storage":"2Gi"},"storageClass":"","valkey":{"image":"valkey/valkey:8.1.3-alpine","maxmemory":"64mb","resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"96Mi"}},"shards":3,"storage":"1Gi"}} diff --git a/evidence/research-20261029-controlled-final/README.md b/evidence/research-20261029-controlled-final/README.md new file mode 100644 index 00000000..045d5935 --- /dev/null +++ b/evidence/research-20261029-controlled-final/README.md @@ -0,0 +1,5 @@ +# Исключение из матрицы + +В growing1-20261029112219 фактически работали две API вместо запрошенной одной: это видно в deployment-growing1-*.json и pods-growing1-*.txt. HPA успел изменить scale при отключении. Поэтому результат 83.57 записей/с не используется как точка «1 реплика». + +Следующее обновление Helm 4 остановилось на конфликте владения spec.replicas с HPA. restore.txt подтверждает восстановление нормальной конфигурации. В итоговом сценарии HPA отключается отдельным обновлением до изменения replicas; перед Job проверяется фактическое число API. Анализатор автоматически исключает этот прогон. diff --git a/evidence/research-20261029-controlled-final/base-revision.txt b/evidence/research-20261029-controlled-final/base-revision.txt new file mode 100644 index 00000000..32abb9b4 --- /dev/null +++ b/evidence/research-20261029-controlled-final/base-revision.txt @@ -0,0 +1 @@ +7b7e23fd029beea47e6f625a96cb98d2fe04bafb diff --git a/evidence/research-20261029-controlled-final/date.txt b/evidence/research-20261029-controlled-final/date.txt new file mode 100644 index 00000000..289118fb --- /dev/null +++ b/evidence/research-20261029-controlled-final/date.txt @@ -0,0 +1 @@ +2026-10-29T11:22:18Z diff --git a/evidence/research-20261029-controlled-final/deployment-growing1-20261029112219.json b/evidence/research-20261029-controlled-final/deployment-growing1-20261029112219.json new file mode 100644 index 00000000..3b8aed69 --- /dev/null +++ b/evidence/research-20261029-controlled-final/deployment-growing1-20261029112219.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "16", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 28, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60163228", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "250m", + "memory": "128Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:22:33Z", + "message": "ReplicaSet \"api-577bffc7b\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + }, + { + "lastTransitionTime": "2026-10-29T11:23:06Z", + "lastUpdateTime": "2026-10-29T11:23:06Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + } + ], + "observedGeneration": 28, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/research-20261029-controlled-final/load-growing1-20261029112219.json b/evidence/research-20261029-controlled-final/load-growing1-20261029112219.json new file mode 100644 index 00000000..25877373 --- /dev/null +++ b/evidence/research-20261029-controlled-final/load-growing1-20261029112219.json @@ -0,0 +1,373 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 2690, + "fails": 0 + }, + { + "fails": 0, + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 281 + }, + { + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 2671, + "fails": 0, + "name": "history readable", + "path": "::history readable" + } + ], + "name": "", + "path": "" + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 51938.508152 + }, + "metrics": { + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 149.9495135, + "p(95)": 295.03911825, + "p(99)": 459.6104094499996, + "max": 1753.715572, + "avg": 162.60486951664882 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 2671, + "rate": 51.426197922035385 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 5706, + "rate": 109.86068339316132 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.30998464423413946, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 277.02813 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 1, + "passes": 5642, + "fails": 0 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 314.756489, + "p(95)": 599.818975, + "p(99)": 862.0272017000001, + "max": 2045.675542, + "avg": 343.6956271527526 + } + }, + "attempted_messages": { + "values": { + "count": 2507, + "rate": 48.26861781750008 + }, + "type": "counter", + "contains": "default" + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "rate": 0, + "count": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 163.21581296582568, + "p(50)": 150.47742399999998, + "p(95)": 295.70493350000004, + "p(99)": 460.4602330499995, + "max": 1753.931379 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 5274, + "rate": 101.54315531292198 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.24427641062039882, + "p(50)": 0.135235, + "p(95)": 0.662551, + "p(99)": 2.6266256999999906, + "max": 11.443155 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.3666670385559065, + "p(50)": 0.163557, + "p(95)": 1.3028165, + "p(99)": 3.2255626499999983, + "max": 15.694926 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "rate": 0, + "count": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 192.16667320781806, + "p(50)": 177.132425, + "p(95)": 337.5963050999997, + "p(99)": 519.0942395600002, + "max": 1548.601143 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "confirmed_messages": { + "contains": "default", + "values": { + "rate": 48.26861781750008, + "count": 2507 + }, + "type": "counter" + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0, + "passes": 0, + "fails": 5706 + } + }, + "http_req_duration{expected_response:true}": { + "contains": "time", + "values": { + "avg": 163.21581296582568, + "p(50)": 150.47742399999998, + "p(95)": 295.70493350000004, + "p(99)": 460.4602330499995, + "max": 1753.931379 + }, + "type": "trend" + }, + "vus": { + "values": { + "min": 0, + "max": 32, + "value": 32 + }, + "type": "gauge", + "contains": "default" + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "max": 32, + "value": 32, + "min": 32 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 7757131, + "rate": 149352.21045045162 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 0, + "max": 20.379458, + "avg": 0.037312242902208206, + "p(50)": 0, + "p(95)": 0 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0.00145775, + "p(99)": 0.013477249999999849, + "max": 690.712483, + "avg": 0.47036642166140996, + "p(50)": 0.000861 + } + }, + "data_sent": { + "contains": "data", + "values": { + "rate": 10235.873514967878, + "count": 531636 + }, + "type": "counter" + } + }, + "setup_data": [ + { + "chat": "5bdcfe1f-c2c7-45cc-9648-79f35cd17279", + "token": "GvkF6GIVBOq0RPxv1ZDMshM_CCjLnd0tZDkb2ThnLks" + }, + { + "chat": "85883086-729a-4849-aeed-2ba4f9fb5f7f", + "token": "ULOB-U0MMfln9PsDd7At9ALo1Y5QoBhbNxN0nIXIgAY" + }, + { + "chat": "068ace76-5971-4039-8b01-fd4d7f182424", + "token": "UFu4FYvXpL0VsYBMAgkCm-_Rv7aUY3BDCpKjN2MDnCI" + }, + { + "chat": "f5628414-bc8a-488a-b2e8-d42b9fb8bedc", + "token": "-lmwut2zmkfkLbQATkHhUwTGqRlriHlLXpHJQvpl49o" + }, + { + "chat": "314bc8ae-3b89-4667-bf72-aec4d2f4ccbd", + "token": "9vZXVw2jZUc-kwFoqZ0MPFkO1vvf91ILdjtQZT4pDho" + }, + { + "chat": "91a10a38-887e-468e-8bd3-bc595205cb49", + "token": "rq6hB6KvDtysZ6ZWd-mr6imxhu5l1HgYQgxvSySxPl8" + }, + { + "chat": "50986276-3200-4991-a748-aa79e87d7deb", + "token": "aqubOAS19q1RD2SKANlGwtPONx5uUbP-otwN_E4Shxs" + }, + { + "token": "ftDzWLT9Tk6s89xOlQ1DPh94k4V9dydLgYrAb9lR2iQ", + "chat": "6ffb3f83-6dc8-425e-9c81-d998adc12727" + }, + { + "chat": "3f949c78-c4ae-4716-8923-64a608f446cc", + "token": "NjXb0NhTkIxVMi1ama3Tzz3VdNc_UFlMauhxhMbP-lo" + }, + { + "chat": "30d0da08-7f28-4ae8-8b75-f198c5c13c7c", + "token": "AlFbpbRlscnfL6tMePku09q3S1YwQoARzHNQwsJThNM" + }, + { + "chat": "4e031048-8d6a-4161-8957-b5d8625da8e9", + "token": "jrs-CIGZqSWGIYn2eEGg4IK1XSGBU7BUef9EoIe6kQ4" + }, + { + "chat": "94aa326c-f0b2-4f67-899c-bb6444de3102", + "token": "DsRJx5Uo4hRTHBMADva_0H2hE351yw2DDCHdpAYEqhE" + }, + { + "chat": "4a3ad7d0-a3ff-4fe9-b7af-a9bb61493a0d", + "token": "_UpCZL__EOIVhkT0iMiQI2xF_1qDPzvDlkCBq1HTSaI" + }, + { + "token": "pei20WJFCkkTAJs9CSYKRHi2bzf1tNZohgFWmBnrZAM", + "chat": "1533dc2b-b92f-4edb-906a-835aa87405de" + }, + { + "chat": "4e0f42a9-42b2-4323-bf26-18acc6cbb3f7", + "token": "MhFov5bltyLc8gLwDubkNxB6FR_xiJNv5LdAViSMEXQ" + }, + { + "token": "foh0BkOgQyAWgzdTpMwhfEJ94YXQb2kQhZIhWsbYxxM", + "chat": "4cf118d4-e7a3-446c-9613-41633a629642" + } + ] + } +} diff --git a/evidence/research-20261029-controlled-final/load-growing1-20261029112219.txt b/evidence/research-20261029-controlled-final/load-growing1-20261029112219.txt new file mode 100644 index 00000000..905521e4 --- /dev/null +++ b/evidence/research-20261029-controlled-final/load-growing1-20261029112219.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":2690,"fails":0},{"fails":0,"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":281},{"id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":2671,"fails":0,"name":"history readable","path":"::history readable"}],"name":"","path":""},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":51938.508152},"metrics":{"http_req_waiting":{"type":"trend","contains":"time","values":{"p(50)":149.9495135,"p(95)":295.03911825,"p(99)":459.6104094499996,"max":1753.715572,"avg":162.60486951664882}},"iterations":{"type":"counter","contains":"default","values":{"count":2671,"rate":51.426197922035385}},"http_reqs":{"type":"counter","contains":"default","values":{"count":5706,"rate":109.86068339316132}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0.30998464423413946,"p(50)":0,"p(95)":0,"p(99)":0,"max":277.02813}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":5642,"fails":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":314.756489,"p(95)":599.818975,"p(99)":862.0272017000001,"max":2045.675542,"avg":343.6956271527526}},"attempted_messages":{"values":{"count":2507,"rate":48.26861781750008},"type":"counter","contains":"default"},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"rate":0,"count":0},"thresholds":{"count>=0":{"ok":true}}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":163.21581296582568,"p(50)":150.47742399999998,"p(95)":295.70493350000004,"p(99)":460.4602330499995,"max":1753.931379}},"measured_operations":{"type":"counter","contains":"default","values":{"count":5274,"rate":101.54315531292198}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.24427641062039882,"p(50)":0.135235,"p(95)":0.662551,"p(99)":2.6266256999999906,"max":11.443155}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.3666670385559065,"p(50)":0.163557,"p(95)":1.3028165,"p(99)":3.2255626499999983,"max":15.694926}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"rate":0,"count":0},"thresholds":{"count>=0":{"ok":true}}},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":192.16667320781806,"p(50)":177.132425,"p(95)":337.5963050999997,"p(99)":519.0942395600002,"max":1548.601143}},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"confirmed_messages":{"contains":"default","values":{"rate":48.26861781750008,"count":2507},"type":"counter"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":5706}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"avg":163.21581296582568,"p(50)":150.47742399999998,"p(95)":295.70493350000004,"p(99)":460.4602330499995,"max":1753.931379},"type":"trend"},"vus":{"values":{"min":0,"max":32,"value":32},"type":"gauge","contains":"default"},"vus_max":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"data_received":{"type":"counter","contains":"data","values":{"count":7757131,"rate":149352.21045045162}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":20.379458,"avg":0.037312242902208206,"p(50)":0,"p(95)":0}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.00145775,"p(99)":0.013477249999999849,"max":690.712483,"avg":0.47036642166140996,"p(50)":0.000861}},"data_sent":{"contains":"data","values":{"rate":10235.873514967878,"count":531636},"type":"counter"}},"setup_data":[{"chat":"5bdcfe1f-c2c7-45cc-9648-79f35cd17279","token":"GvkF6GIVBOq0RPxv1ZDMshM_CCjLnd0tZDkb2ThnLks"},{"chat":"85883086-729a-4849-aeed-2ba4f9fb5f7f","token":"ULOB-U0MMfln9PsDd7At9ALo1Y5QoBhbNxN0nIXIgAY"},{"chat":"068ace76-5971-4039-8b01-fd4d7f182424","token":"UFu4FYvXpL0VsYBMAgkCm-_Rv7aUY3BDCpKjN2MDnCI"},{"chat":"f5628414-bc8a-488a-b2e8-d42b9fb8bedc","token":"-lmwut2zmkfkLbQATkHhUwTGqRlriHlLXpHJQvpl49o"},{"chat":"314bc8ae-3b89-4667-bf72-aec4d2f4ccbd","token":"9vZXVw2jZUc-kwFoqZ0MPFkO1vvf91ILdjtQZT4pDho"},{"chat":"91a10a38-887e-468e-8bd3-bc595205cb49","token":"rq6hB6KvDtysZ6ZWd-mr6imxhu5l1HgYQgxvSySxPl8"},{"chat":"50986276-3200-4991-a748-aa79e87d7deb","token":"aqubOAS19q1RD2SKANlGwtPONx5uUbP-otwN_E4Shxs"},{"token":"ftDzWLT9Tk6s89xOlQ1DPh94k4V9dydLgYrAb9lR2iQ","chat":"6ffb3f83-6dc8-425e-9c81-d998adc12727"},{"chat":"3f949c78-c4ae-4716-8923-64a608f446cc","token":"NjXb0NhTkIxVMi1ama3Tzz3VdNc_UFlMauhxhMbP-lo"},{"chat":"30d0da08-7f28-4ae8-8b75-f198c5c13c7c","token":"AlFbpbRlscnfL6tMePku09q3S1YwQoARzHNQwsJThNM"},{"chat":"4e031048-8d6a-4161-8957-b5d8625da8e9","token":"jrs-CIGZqSWGIYn2eEGg4IK1XSGBU7BUef9EoIe6kQ4"},{"chat":"94aa326c-f0b2-4f67-899c-bb6444de3102","token":"DsRJx5Uo4hRTHBMADva_0H2hE351yw2DDCHdpAYEqhE"},{"chat":"4a3ad7d0-a3ff-4fe9-b7af-a9bb61493a0d","token":"_UpCZL__EOIVhkT0iMiQI2xF_1qDPzvDlkCBq1HTSaI"},{"token":"pei20WJFCkkTAJs9CSYKRHi2bzf1tNZohgFWmBnrZAM","chat":"1533dc2b-b92f-4edb-906a-835aa87405de"},{"chat":"4e0f42a9-42b2-4323-bf26-18acc6cbb3f7","token":"MhFov5bltyLc8gLwDubkNxB6FR_xiJNv5LdAViSMEXQ"},{"token":"foh0BkOgQyAWgzdTpMwhfEJ94YXQb2kQhZIhWsbYxxM","chat":"4cf118d4-e7a3-446c-9613-41633a629642"}]}} diff --git a/evidence/research-20261029-controlled-final/nodes.txt b/evidence/research-20261029-controlled-final/nodes.txt new file mode 100644 index 00000000..461dea77 --- /dev/null +++ b/evidence/research-20261029-controlled-final/nodes.txt @@ -0,0 +1,4 @@ +NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME +dev.asisti.tech Ready 252d v1.33.13 100.99.166.40 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 +marlosrv0 Ready 254d v1.33.13 192.168.1.37 Ubuntu 24.04.5 LTS 6.8.0-147-generic containerd://1.7.29 +srv0.agapov.space Ready 246d v1.33.13 100.108.186.94 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 diff --git a/evidence/research-20261029-controlled-final/pods-growing1-20261029112219.txt b/evidence/research-20261029-controlled-final/pods-growing1-20261029112219.txt new file mode 100644 index 00000000..724365d4 --- /dev/null +++ b/evidence/research-20261029-controlled-final/pods-growing1-20261029112219.txt @@ -0,0 +1,3 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-577bffc7b-7pfjv 1/1 Running 0 44s 10.1.25.123 dev.asisti.tech +api-577bffc7b-9dl4t 1/1 Running 0 44s 10.1.25.88 dev.asisti.tech diff --git a/evidence/research-20261029-controlled-final/profiles.csv b/evidence/research-20261029-controlled-final/profiles.csv new file mode 100644 index 00000000..2a0ddae6 --- /dev/null +++ b/evidence/research-20261029-controlled-final/profiles.csv @@ -0,0 +1,2 @@ +profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool,vus,duration +growing1,growing1-20261029112219,1,250,128,8,32,30 diff --git a/evidence/research-20261029-controlled-final/resources-growing1-20261029112219.txt b/evidence/research-20261029-controlled-final/resources-growing1-20261029112219.txt new file mode 100644 index 00000000..95472516 --- /dev/null +++ b/evidence/research-20261029-controlled-final/resources-growing1-20261029112219.txt @@ -0,0 +1,85 @@ +UTC 2026-10-29T11:23:15Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7pfjv 4m 22Mi +api-577bffc7b-9dl4t 4m 23Mi +postgres-0 6m 43Mi +valkey-0 8m 9Mi +valkey-1 3m 14Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:23:23Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7pfjv 4m 22Mi +api-577bffc7b-9dl4t 4m 23Mi +postgres-0 6m 43Mi +valkey-0 8m 9Mi +valkey-1 3m 14Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:23:31Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7pfjv 94m 60Mi +api-577bffc7b-9dl4t 98m 56Mi +load-growing1-20261029112219-kb6g4 47m 17Mi +postgres-0 17m 44Mi +valkey-0 8m 9Mi +valkey-1 6m 14Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:23:39Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7pfjv 94m 60Mi +api-577bffc7b-9dl4t 98m 56Mi +load-growing1-20261029112219-kb6g4 47m 17Mi +postgres-0 17m 44Mi +valkey-0 8m 9Mi +valkey-1 6m 14Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|12 +idle in transaction|Client|ClientRead|5 +UTC 2026-10-29T11:23:48Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7pfjv 139m 11Mi +api-577bffc7b-9dl4t 98m 56Mi +load-growing1-20261029112219-kb6g4 91m 18Mi +postgres-0 224m 80Mi +valkey-0 39m 10Mi +valkey-1 6m 14Mi +valkey-2 25m 4Mi +active|||1 +idle|Client|ClientRead|16 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:23:57Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7pfjv 139m 11Mi +api-577bffc7b-9dl4t 98m 56Mi +load-growing1-20261029112219-kb6g4 91m 18Mi +postgres-0 224m 80Mi +valkey-0 39m 10Mi +valkey-1 6m 14Mi +valkey-2 25m 4Mi +active|IO|WalSync|1 +active|Lock|transactionid|1 +active|||1 +idle|Client|ClientRead|7 +idle in transaction|Client|ClientRead|7 +idle in transaction|||1 +UTC 2026-10-29T11:24:05Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-7pfjv 247m 12Mi +api-577bffc7b-9dl4t 186m 14Mi +load-growing1-20261029112219-kb6g4 193m 28Mi +postgres-0 550m 81Mi +valkey-0 103m 10Mi +valkey-1 40m 15Mi +valkey-2 25m 4Mi +active|||1 +idle|Client|ClientRead|16 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-controlled-final/restore-values.yaml b/evidence/research-20261029-controlled-final/restore-values.yaml new file mode 100644 index 00000000..4e915dac --- /dev/null +++ b/evidence/research-20261029-controlled-final/restore-values.yaml @@ -0,0 +1,61 @@ +api: + env: + DEPENDENCY_POOL_SIZE: "8" + DEPENDENCY_TIMEOUT_MS: "2000" + GOMEMLIMIT: 160MiB + REQUEST_TIMEOUT_SECONDS: "4" + SESSION_TTL_SECONDS: "3600" + SHUTDOWN_TIMEOUT_SECONDS: "5" + replicas: 2 + resources: + limits: + cpu: "1" + memory: 256Mi + requests: + cpu: 250m + memory: 128Mi +autoscaling: + cpuPercent: 60 + enabled: true + maxReplicas: 4 + minReplicas: 2 +databaseSecret: messenger-secrets +image: + digest: sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 + repository: asisti.registry.twcstorage.ru/mtusi2026lab3 +imagePullSecret: registry-pull +ingress: + className: traefik + clusterIssuer: letsencrypt-prod + host: hl.agapov.space +load: + duration: 30 + enabled: false + run: manual + script: scaling.js + vus: 32 +monitoring: + serviceMonitor: false +postgres: + image: postgres:17.6-alpine + resources: + limits: + cpu: "1" + memory: 512Mi + requests: + cpu: 250m + memory: 256Mi + storage: 2Gi +storageClass: "" +valkey: + image: valkey/valkey:8.1.3-alpine + maxmemory: 64mb + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 100m + memory: 96Mi + shards: 3 + storage: 1Gi diff --git a/evidence/research-20261029-controlled-final/restore.txt b/evidence/research-20261029-controlled-final/restore.txt new file mode 100644 index 00000000..051d04d7 --- /dev/null +++ b/evidence/research-20261029-controlled-final/restore.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:24:33 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 20 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-controlled-final/rollout-growing1.txt b/evidence/research-20261029-controlled-final/rollout-growing1.txt new file mode 100644 index 00000000..89b3cab2 --- /dev/null +++ b/evidence/research-20261029-controlled-final/rollout-growing1.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:22:22 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 18 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-controlled-final/rollout-saturation8.txt b/evidence/research-20261029-controlled-final/rollout-saturation8.txt new file mode 100644 index 00000000..e69de29b diff --git a/evidence/research-20261029-controlled-final/source.sha256 b/evidence/research-20261029-controlled-final/source.sha256 new file mode 100644 index 00000000..862a7ac7 --- /dev/null +++ b/evidence/research-20261029-controlled-final/source.sha256 @@ -0,0 +1,3 @@ +0a58dff9ad7acf8f228e0fd1c2a670bbe7e18a11360715b47659104832e34892 student-tests/load/scaling.js +dcc8dc1217792aca3385c8e3195b236058ee9b2df912e60f9af46dc51b9a6c86 charts/messenger/values.yaml +60e09dd38fd1d413b744f21b57f64ba83e49a5ae1b4251aa5bf20be033f90cfb internal/controller/http/fiber/errors.go diff --git a/evidence/research-20261029-controlled/README.md b/evidence/research-20261029-controlled/README.md new file mode 100644 index 00000000..31751f4e --- /dev/null +++ b/evidence/research-20261029-controlled/README.md @@ -0,0 +1,3 @@ +# Исключённый прогон + +Чтение состояния Job через Kubernetes API завершилось TLS handshake timeout. Восстановление обычной конфигурации могло пересечься с нагрузкой, поэтому этот growing1 не включается в матрицу. Следующий запуск ограниченно повторяет только чтение статуса Job; при неуспехе останавливает свой Job перед восстановлением Helm-конфигурации. diff --git a/evidence/research-20261029-controlled/base-revision.txt b/evidence/research-20261029-controlled/base-revision.txt new file mode 100644 index 00000000..32abb9b4 --- /dev/null +++ b/evidence/research-20261029-controlled/base-revision.txt @@ -0,0 +1 @@ +7b7e23fd029beea47e6f625a96cb98d2fe04bafb diff --git a/evidence/research-20261029-controlled/date.txt b/evidence/research-20261029-controlled/date.txt new file mode 100644 index 00000000..a050f4fd --- /dev/null +++ b/evidence/research-20261029-controlled/date.txt @@ -0,0 +1 @@ +2026-10-29T11:19:19Z diff --git a/evidence/research-20261029-controlled/deployment-growing1-20261029111920.json b/evidence/research-20261029-controlled/deployment-growing1-20261029111920.json new file mode 100644 index 00000000..e104f027 --- /dev/null +++ b/evidence/research-20261029-controlled/deployment-growing1-20261029111920.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "14", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 24, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60162236", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "250m", + "memory": "128Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:19:28Z", + "lastUpdateTime": "2026-10-29T11:19:28Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:19:31Z", + "message": "ReplicaSet \"api-577bffc7b\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 24, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-controlled/nodes.txt b/evidence/research-20261029-controlled/nodes.txt new file mode 100644 index 00000000..461dea77 --- /dev/null +++ b/evidence/research-20261029-controlled/nodes.txt @@ -0,0 +1,4 @@ +NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME +dev.asisti.tech Ready 252d v1.33.13 100.99.166.40 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 +marlosrv0 Ready 254d v1.33.13 192.168.1.37 Ubuntu 24.04.5 LTS 6.8.0-147-generic containerd://1.7.29 +srv0.agapov.space Ready 246d v1.33.13 100.108.186.94 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 diff --git a/evidence/research-20261029-controlled/pods-growing1-20261029111920.txt b/evidence/research-20261029-controlled/pods-growing1-20261029111920.txt new file mode 100644 index 00000000..d1dc18d7 --- /dev/null +++ b/evidence/research-20261029-controlled/pods-growing1-20261029111920.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-577bffc7b-c9wsv 1/1 Running 0 43s 10.1.25.118 dev.asisti.tech diff --git a/evidence/research-20261029-controlled/profiles.csv b/evidence/research-20261029-controlled/profiles.csv new file mode 100644 index 00000000..e678c936 --- /dev/null +++ b/evidence/research-20261029-controlled/profiles.csv @@ -0,0 +1,2 @@ +profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool,vus,duration +growing1,growing1-20261029111920,1,250,128,8,32,30 diff --git a/evidence/research-20261029-controlled/resources-growing1-20261029111920.txt b/evidence/research-20261029-controlled/resources-growing1-20261029111920.txt new file mode 100644 index 00000000..738e981e --- /dev/null +++ b/evidence/research-20261029-controlled/resources-growing1-20261029111920.txt @@ -0,0 +1,51 @@ +UTC 2026-10-29T11:20:07Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-c9wsv 22m 22Mi +postgres-0 5m 41Mi +valkey-0 7m 10Mi +valkey-1 6m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:20:13Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-c9wsv 22m 22Mi +postgres-0 5m 41Mi +valkey-0 7m 10Mi +valkey-1 6m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:20:20Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-c9wsv 3m 22Mi +postgres-0 10m 41Mi +valkey-0 8m 10Mi +valkey-1 6m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:20:28Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-c9wsv 3m 22Mi +postgres-0 10m 41Mi +valkey-0 8m 10Mi +valkey-1 6m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:20:35Z +NAME CPU(cores) MEMORY(bytes) +api-577bffc7b-c9wsv 113m 11Mi +load-growing1-20261029111920-qrwb8 34m 17Mi +postgres-0 34m 44Mi +valkey-0 14m 9Mi +valkey-1 5m 14Mi +valkey-2 8m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-controlled/restore-values.yaml b/evidence/research-20261029-controlled/restore-values.yaml new file mode 100644 index 00000000..4e915dac --- /dev/null +++ b/evidence/research-20261029-controlled/restore-values.yaml @@ -0,0 +1,61 @@ +api: + env: + DEPENDENCY_POOL_SIZE: "8" + DEPENDENCY_TIMEOUT_MS: "2000" + GOMEMLIMIT: 160MiB + REQUEST_TIMEOUT_SECONDS: "4" + SESSION_TTL_SECONDS: "3600" + SHUTDOWN_TIMEOUT_SECONDS: "5" + replicas: 2 + resources: + limits: + cpu: "1" + memory: 256Mi + requests: + cpu: 250m + memory: 128Mi +autoscaling: + cpuPercent: 60 + enabled: true + maxReplicas: 4 + minReplicas: 2 +databaseSecret: messenger-secrets +image: + digest: sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 + repository: asisti.registry.twcstorage.ru/mtusi2026lab3 +imagePullSecret: registry-pull +ingress: + className: traefik + clusterIssuer: letsencrypt-prod + host: hl.agapov.space +load: + duration: 30 + enabled: false + run: manual + script: scaling.js + vus: 32 +monitoring: + serviceMonitor: false +postgres: + image: postgres:17.6-alpine + resources: + limits: + cpu: "1" + memory: 512Mi + requests: + cpu: 250m + memory: 256Mi + storage: 2Gi +storageClass: "" +valkey: + image: valkey/valkey:8.1.3-alpine + maxmemory: 64mb + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 100m + memory: 96Mi + shards: 3 + storage: 1Gi diff --git a/evidence/research-20261029-controlled/restore.txt b/evidence/research-20261029-controlled/restore.txt new file mode 100644 index 00000000..410949cb --- /dev/null +++ b/evidence/research-20261029-controlled/restore.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:20:49 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 17 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-controlled/rollout-growing1.txt b/evidence/research-20261029-controlled/rollout-growing1.txt new file mode 100644 index 00000000..e92f5464 --- /dev/null +++ b/evidence/research-20261029-controlled/rollout-growing1.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:19:21 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 16 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-controlled/source.sha256 b/evidence/research-20261029-controlled/source.sha256 new file mode 100644 index 00000000..93d2dce5 --- /dev/null +++ b/evidence/research-20261029-controlled/source.sha256 @@ -0,0 +1,3 @@ +614623b626103627eea3d8946b9b22474be13a49115ffbb9e68e2d883ff1e4d4 student-tests/load/scaling.js +dcc8dc1217792aca3385c8e3195b236058ee9b2df912e60f9af46dc51b9a6c86 charts/messenger/values.yaml +60e09dd38fd1d413b744f21b57f64ba83e49a5ae1b4251aa5bf20be033f90cfb internal/controller/http/fiber/errors.go diff --git a/evidence/research-20261029-final/base-revision.txt b/evidence/research-20261029-final/base-revision.txt new file mode 100644 index 00000000..32abb9b4 --- /dev/null +++ b/evidence/research-20261029-final/base-revision.txt @@ -0,0 +1 @@ +7b7e23fd029beea47e6f625a96cb98d2fe04bafb diff --git a/evidence/research-20261029-final/cpu-quota-config.json b/evidence/research-20261029-final/cpu-quota-config.json new file mode 100644 index 00000000..7c6ba7b6 --- /dev/null +++ b/evidence/research-20261029-final/cpu-quota-config.json @@ -0,0 +1,4 @@ +{ + "cpuCFSQuota": true, + "cpuCFSQuotaPeriod": "100ms" +} diff --git a/evidence/research-20261029-final/date.txt b/evidence/research-20261029-final/date.txt new file mode 100644 index 00000000..a629bf8e --- /dev/null +++ b/evidence/research-20261029-final/date.txt @@ -0,0 +1 @@ +2026-10-29T11:04:37Z diff --git a/evidence/research-20261029-final/deployment-fixed1-20261029110437.json b/evidence/research-20261029-final/deployment-fixed1-20261029110437.json new file mode 100644 index 00000000..f7d74cc3 --- /dev/null +++ b/evidence/research-20261029-final/deployment-fixed1-20261029110437.json @@ -0,0 +1,214 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "9", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 15, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60158295", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:04:57Z", + "lastUpdateTime": "2026-10-29T11:04:57Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:05:04Z", + "message": "ReplicaSet \"api-6fc45595fc\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 15, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-final/deployment-fixed2-20261029110639.json b/evidence/research-20261029-final/deployment-fixed2-20261029110639.json new file mode 100644 index 00000000..ef0f6ed9 --- /dev/null +++ b/evidence/research-20261029-final/deployment-fixed2-20261029110639.json @@ -0,0 +1,214 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "10", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 16, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60158796", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "500m", + "memory": "256Mi" + }, + "requests": { + "cpu": "500m", + "memory": "256Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:06:45Z", + "lastUpdateTime": "2026-10-29T11:06:45Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:06:48Z", + "message": "ReplicaSet \"api-7f5b6b9d85\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 16, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/research-20261029-final/deployment-fixed4-20261029110815.json b/evidence/research-20261029-final/deployment-fixed4-20261029110815.json new file mode 100644 index 00000000..0674bac4 --- /dev/null +++ b/evidence/research-20261029-final/deployment-fixed4-20261029110815.json @@ -0,0 +1,214 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "11", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 17, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60159468", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 4, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "250m", + "memory": "128Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 4, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:08:33Z", + "lastUpdateTime": "2026-10-29T11:08:33Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:08:39Z", + "message": "ReplicaSet \"api-855b9f4fb5\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 17, + "readyReplicas": 4, + "replicas": 4, + "updatedReplicas": 4 + } +} diff --git a/evidence/research-20261029-final/deployment-growing1-20261029111013.json b/evidence/research-20261029-final/deployment-growing1-20261029111013.json new file mode 100644 index 00000000..8df154ae --- /dev/null +++ b/evidence/research-20261029-final/deployment-growing1-20261029111013.json @@ -0,0 +1,214 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "11", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 18, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60159975", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "250m", + "memory": "128Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:08:39Z", + "message": "ReplicaSet \"api-855b9f4fb5\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + }, + { + "lastTransitionTime": "2026-10-29T11:10:42Z", + "lastUpdateTime": "2026-10-29T11:10:42Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + } + ], + "observedGeneration": 18, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-final/deployment-growing2-20261029111200.json b/evidence/research-20261029-final/deployment-growing2-20261029111200.json new file mode 100644 index 00000000..33ba3f49 --- /dev/null +++ b/evidence/research-20261029-final/deployment-growing2-20261029111200.json @@ -0,0 +1,214 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "11", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 19, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60160315", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "250m", + "memory": "128Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:08:39Z", + "message": "ReplicaSet \"api-855b9f4fb5\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + }, + { + "lastTransitionTime": "2026-10-29T11:12:07Z", + "lastUpdateTime": "2026-10-29T11:12:07Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + } + ], + "observedGeneration": 19, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/research-20261029-final/deployment-growing4-20261029111342.json b/evidence/research-20261029-final/deployment-growing4-20261029111342.json new file mode 100644 index 00000000..96a78cec --- /dev/null +++ b/evidence/research-20261029-final/deployment-growing4-20261029111342.json @@ -0,0 +1,214 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "11", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 20, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60160765", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 4, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "250m", + "memory": "128Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 4, + "conditions": [ + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:08:39Z", + "message": "ReplicaSet \"api-855b9f4fb5\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + }, + { + "lastTransitionTime": "2026-10-29T11:13:48Z", + "lastUpdateTime": "2026-10-29T11:13:48Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + } + ], + "observedGeneration": 20, + "readyReplicas": 4, + "replicas": 4, + "updatedReplicas": 4 + } +} diff --git a/evidence/research-20261029-final/deployment-saturation8-20261029111530.json b/evidence/research-20261029-final/deployment-saturation8-20261029111530.json new file mode 100644 index 00000000..2bbaad40 --- /dev/null +++ b/evidence/research-20261029-final/deployment-saturation8-20261029111530.json @@ -0,0 +1,214 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "12", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 21, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60161224", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:14:31Z", + "lastUpdateTime": "2026-10-29T11:14:31Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:15:36Z", + "message": "ReplicaSet \"api-6fc45595fc\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 21, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-final/events.json b/evidence/research-20261029-final/events.json new file mode 100644 index 00000000..8795511b --- /dev/null +++ b/evidence/research-20261029-final/events.json @@ -0,0 +1,2590 @@ +{ + "apiVersion": "v1", + "items": [ + { + "action": "Binding", + "apiVersion": "v1", + "eventTime": "2026-10-29T11:21:06.541999Z", + "firstTimestamp": null, + "involvedObject": { + "apiVersion": "v1", + "kind": "Pod", + "name": "api-54f7cc6f98-2277p", + "namespace": "highload-applications", + "resourceVersion": "60162672", + "uid": "e48e0d5f-6011-4e30-9f8e-10364509f9bd" + }, + "kind": "Event", + "lastTimestamp": null, + "message": "Successfully assigned highload-applications/api-54f7cc6f98-2277p to dev.asisti.tech", + "metadata": { + "creationTimestamp": "2026-10-29T11:21:06Z", + "name": "api-54f7cc6f98-2277p.18e2fc2bc3953bc2", + "namespace": "highload-applications", + "resourceVersion": "60162677", + "uid": "4d8ec82a-a731-48ff-a5fc-b8f20b830843" + }, + "reason": "Scheduled", + "reportingComponent": "default-scheduler", + "reportingInstance": "default-scheduler-marlosrv0", + "source": {}, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:21:07Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-2277p", + "namespace": "highload-applications", + "resourceVersion": "60162675", + "uid": "e48e0d5f-6011-4e30-9f8e-10364509f9bd" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:21:07Z", + "message": "Container image \"asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3\" already present on machine", + "metadata": { + "creationTimestamp": "2026-10-29T11:21:07Z", + "name": "api-54f7cc6f98-2277p.18e2fc2c090abf57", + "namespace": "highload-applications", + "resourceVersion": "60162689", + "uid": "7f4ae7bd-2b04-405b-9e7d-2dd42ef52b65" + }, + "reason": "Pulled", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:21:07Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-2277p", + "namespace": "highload-applications", + "resourceVersion": "60162675", + "uid": "e48e0d5f-6011-4e30-9f8e-10364509f9bd" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:21:07Z", + "message": "Created container: api", + "metadata": { + "creationTimestamp": "2026-10-29T11:21:07Z", + "name": "api-54f7cc6f98-2277p.18e2fc2c0bb3213a", + "namespace": "highload-applications", + "resourceVersion": "60162690", + "uid": "ee5e3342-744c-48e1-a480-a1ff1cb4b263" + }, + "reason": "Created", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:21:07Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-2277p", + "namespace": "highload-applications", + "resourceVersion": "60162675", + "uid": "e48e0d5f-6011-4e30-9f8e-10364509f9bd" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:21:07Z", + "message": "Started container api", + "metadata": { + "creationTimestamp": "2026-10-29T11:21:07Z", + "name": "api-54f7cc6f98-2277p.18e2fc2c1386cc99", + "namespace": "highload-applications", + "resourceVersion": "60162691", + "uid": "bec855be-ebe0-4259-b657-4e16df5367f5" + }, + "reason": "Started", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 8, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:21:45Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-2277p", + "namespace": "highload-applications", + "resourceVersion": "60162675", + "uid": "e48e0d5f-6011-4e30-9f8e-10364509f9bd" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:21:59Z", + "message": "Readiness probe failed: Get \"http://10.1.25.120:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:03Z", + "name": "api-54f7cc6f98-2277p.18e2fc34cae4ec99", + "namespace": "highload-applications", + "resourceVersion": "60162911", + "uid": "b757545f-ec60-48df-bd78-2d6d4064cdf0" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:28Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-2277p", + "namespace": "highload-applications", + "resourceVersion": "60162675", + "uid": "e48e0d5f-6011-4e30-9f8e-10364509f9bd" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:28Z", + "message": "Stopping container api", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:28Z", + "name": "api-54f7cc6f98-2277p.18e2fc3ecc95738e", + "namespace": "highload-applications", + "resourceVersion": "60163001", + "uid": "31e508d9-3998-433a-8bb1-bdc95f9f4ed2" + }, + "reason": "Killing", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:31Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-2277p", + "namespace": "highload-applications", + "resourceVersion": "60162675", + "uid": "e48e0d5f-6011-4e30-9f8e-10364509f9bd" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:31Z", + "message": "Readiness probe failed: Get \"http://10.1.25.120:8080/health/ready\": dial tcp 10.1.25.120:8080: connect: connection refused", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:31Z", + "name": "api-54f7cc6f98-2277p.18e2fc3f81844d97", + "namespace": "highload-applications", + "resourceVersion": "60163058", + "uid": "36c71db5-caac-43da-97f3-9f0d0bbd7da0" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 5, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:17:44Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-jzbb7", + "namespace": "highload-applications", + "resourceVersion": "60161624", + "uid": "d6485622-2406-455d-98f1-dc78ece3341f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:27Z", + "message": "Readiness probe failed: Get \"http://10.1.112.66:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:17:44Z", + "name": "api-54f7cc6f98-jzbb7.18e2fbfcb49e72a6", + "namespace": "highload-applications", + "resourceVersion": "60162174", + "uid": "918615fd-e731-444a-858f-7802ba16ac28" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:31Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-jzbb7", + "namespace": "highload-applications", + "resourceVersion": "60161624", + "uid": "d6485622-2406-455d-98f1-dc78ece3341f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:31Z", + "message": "Stopping container api", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:31Z", + "name": "api-54f7cc6f98-jzbb7.18e2fc15b7ff73eb", + "namespace": "highload-applications", + "resourceVersion": "60162234", + "uid": "8fd32006-3f66-4450-b8f5-bc52729b34fd" + }, + "reason": "Killing", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Normal" + }, + { + "action": "Binding", + "apiVersion": "v1", + "eventTime": "2026-10-29T11:20:51.314767Z", + "firstTimestamp": null, + "involvedObject": { + "apiVersion": "v1", + "kind": "Pod", + "name": "api-54f7cc6f98-p5pzh", + "namespace": "highload-applications", + "resourceVersion": "60162543", + "uid": "e6de6505-03c7-4b68-bb14-d776dfc60ff6" + }, + "kind": "Event", + "lastTimestamp": null, + "message": "Successfully assigned highload-applications/api-54f7cc6f98-p5pzh to marlosrv0", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:51Z", + "name": "api-54f7cc6f98-p5pzh.18e2fc2837f81d3c", + "namespace": "highload-applications", + "resourceVersion": "60162548", + "uid": "cc613143-489a-4bc4-893c-5d76ac3eb379" + }, + "reason": "Scheduled", + "reportingComponent": "default-scheduler", + "reportingInstance": "default-scheduler-marlosrv0", + "source": {}, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:51Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-p5pzh", + "namespace": "highload-applications", + "resourceVersion": "60162546", + "uid": "e6de6505-03c7-4b68-bb14-d776dfc60ff6" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:51Z", + "message": "Container image \"asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3\" already present on machine", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:51Z", + "name": "api-54f7cc6f98-p5pzh.18e2fc285654b589", + "namespace": "highload-applications", + "resourceVersion": "60162559", + "uid": "1d24d5da-ebcf-4a40-a8bb-337307f167f7" + }, + "reason": "Pulled", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:51Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-p5pzh", + "namespace": "highload-applications", + "resourceVersion": "60162546", + "uid": "e6de6505-03c7-4b68-bb14-d776dfc60ff6" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:51Z", + "message": "Created container: api", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:51Z", + "name": "api-54f7cc6f98-p5pzh.18e2fc2857905410", + "namespace": "highload-applications", + "resourceVersion": "60162560", + "uid": "c886016c-1956-45a2-ad9e-a860484fbf03" + }, + "reason": "Created", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:51Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-p5pzh", + "namespace": "highload-applications", + "resourceVersion": "60162546", + "uid": "e6de6505-03c7-4b68-bb14-d776dfc60ff6" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:51Z", + "message": "Started container api", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:51Z", + "name": "api-54f7cc6f98-p5pzh.18e2fc285ace5f78", + "namespace": "highload-applications", + "resourceVersion": "60162561", + "uid": "6a4a0c39-46ec-4a45-82eb-2621a1729978" + }, + "reason": "Started", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 5, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:21:44Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-p5pzh", + "namespace": "highload-applications", + "resourceVersion": "60162546", + "uid": "e6de6505-03c7-4b68-bb14-d776dfc60ff6" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:21:54Z", + "message": "Readiness probe failed: Get \"http://10.1.112.109:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:21:44Z", + "name": "api-54f7cc6f98-p5pzh.18e2fc34a54480fb", + "namespace": "highload-applications", + "resourceVersion": "60162844", + "uid": "88dcad08-0f91-4d26-8a76-ef7bf57b3720" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:21:48Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-p5pzh", + "namespace": "highload-applications", + "resourceVersion": "60162546", + "uid": "e6de6505-03c7-4b68-bb14-d776dfc60ff6" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:21:48Z", + "message": "Readiness probe failed: HTTP probe failed with statuscode: 503", + "metadata": { + "creationTimestamp": "2026-10-29T11:21:48Z", + "name": "api-54f7cc6f98-p5pzh.18e2fc3593c4a1aa", + "namespace": "highload-applications", + "resourceVersion": "60162821", + "uid": "ed456697-9a8f-4381-bf44-86aa2a21c9e2" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:33Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-p5pzh", + "namespace": "highload-applications", + "resourceVersion": "60162546", + "uid": "e6de6505-03c7-4b68-bb14-d776dfc60ff6" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:33Z", + "message": "Stopping container api", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:33Z", + "name": "api-54f7cc6f98-p5pzh.18e2fc40192b0b76", + "namespace": "highload-applications", + "resourceVersion": "60163102", + "uid": "983b52e1-77cf-49dc-ae0e-cddf1f2a7b9e" + }, + "reason": "Killing", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 6, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:17:44Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-w78wt", + "namespace": "highload-applications", + "resourceVersion": "60161485", + "uid": "6a16a4ff-c8e7-4d26-a5fa-fee874a3f7f2" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:28Z", + "message": "Readiness probe failed: Get \"http://10.1.25.81:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:17:49Z", + "name": "api-54f7cc6f98-w78wt.18e2fbfccfde780b", + "namespace": "highload-applications", + "resourceVersion": "60162189", + "uid": "8ba3ff9f-dd6f-47e8-a663-73e96ca5827d" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:28Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-w78wt", + "namespace": "highload-applications", + "resourceVersion": "60161485", + "uid": "6a16a4ff-c8e7-4d26-a5fa-fee874a3f7f2" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:28Z", + "message": "Stopping container api", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:28Z", + "name": "api-54f7cc6f98-w78wt.18e2fc1503ce1ac1", + "namespace": "highload-applications", + "resourceVersion": "60162187", + "uid": "a7d5e841-50ea-467d-8749-07fcbb25ab93" + }, + "reason": "Killing", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:22Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "api-54f7cc6f98", + "namespace": "highload-applications", + "resourceVersion": "60162123", + "uid": "9a9710e1-f5e8-456c-a8d9-6a6a06fe4839" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:22Z", + "message": "Deleted pod: api-54f7cc6f98-w78wt", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:22Z", + "name": "api-54f7cc6f98.18e2fc138bd3a8de", + "namespace": "highload-applications", + "resourceVersion": "60162128", + "uid": "0c701733-5988-40b7-8fa5-b5c0836e974c" + }, + "reason": "SuccessfulDelete", + "reportingComponent": "replicaset-controller", + "reportingInstance": "", + "source": { + "component": "replicaset-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:31Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "api-54f7cc6f98", + "namespace": "highload-applications", + "resourceVersion": "60162227", + "uid": "9a9710e1-f5e8-456c-a8d9-6a6a06fe4839" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:31Z", + "message": "Deleted pod: api-54f7cc6f98-jzbb7", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:31Z", + "name": "api-54f7cc6f98.18e2fc15b7d28ce1", + "namespace": "highload-applications", + "resourceVersion": "60162230", + "uid": "b45a1e56-d302-46e3-8cfb-08a34b4bed29" + }, + "reason": "SuccessfulDelete", + "reportingComponent": "replicaset-controller", + "reportingInstance": "", + "source": { + "component": "replicaset-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:51Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "api-54f7cc6f98", + "namespace": "highload-applications", + "resourceVersion": "60162542", + "uid": "9a9710e1-f5e8-456c-a8d9-6a6a06fe4839" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:51Z", + "message": "Created pod: api-54f7cc6f98-p5pzh", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:51Z", + "name": "api-54f7cc6f98.18e2fc2836e53169", + "namespace": "highload-applications", + "resourceVersion": "60162544", + "uid": "01b4a797-de46-4eef-a70a-5a7a2d8aa530" + }, + "reason": "SuccessfulCreate", + "reportingComponent": "replicaset-controller", + "reportingInstance": "", + "source": { + "component": "replicaset-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:21:06Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "api-54f7cc6f98", + "namespace": "highload-applications", + "resourceVersion": "60162671", + "uid": "9a9710e1-f5e8-456c-a8d9-6a6a06fe4839" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:21:06Z", + "message": "Created pod: api-54f7cc6f98-2277p", + "metadata": { + "creationTimestamp": "2026-10-29T11:21:06Z", + "name": "api-54f7cc6f98.18e2fc2bc2606e26", + "namespace": "highload-applications", + "resourceVersion": "60162674", + "uid": "8b11ffd9-9c45-4614-8d3c-d1c868f1a76a" + }, + "reason": "SuccessfulCreate", + "reportingComponent": "replicaset-controller", + "reportingInstance": "", + "source": { + "component": "replicaset-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:28Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "api-54f7cc6f98", + "namespace": "highload-applications", + "resourceVersion": "60162991", + "uid": "9a9710e1-f5e8-456c-a8d9-6a6a06fe4839" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:28Z", + "message": "Deleted pod: api-54f7cc6f98-2277p", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:28Z", + "name": "api-54f7cc6f98.18e2fc3ecb8eec04", + "namespace": "highload-applications", + "resourceVersion": "60162994", + "uid": "b5ee2f2c-0f7d-4aa0-bb8e-81cd90ff232d" + }, + "reason": "SuccessfulDelete", + "reportingComponent": "replicaset-controller", + "reportingInstance": "", + "source": { + "component": "replicaset-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:33Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "api-54f7cc6f98", + "namespace": "highload-applications", + "resourceVersion": "60163094", + "uid": "9a9710e1-f5e8-456c-a8d9-6a6a06fe4839" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:33Z", + "message": "Deleted pod: api-54f7cc6f98-p5pzh", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:33Z", + "name": "api-54f7cc6f98.18e2fc4018c82774", + "namespace": "highload-applications", + "resourceVersion": "60163098", + "uid": "f4595847-98f0-405a-a4bd-e1980ae12380" + }, + "reason": "SuccessfulDelete", + "reportingComponent": "replicaset-controller", + "reportingInstance": "", + "source": { + "component": "replicaset-controller" + }, + "type": "Normal" + }, + { + "action": "Binding", + "apiVersion": "v1", + "eventTime": "2026-10-29T11:22:28.318800Z", + "firstTimestamp": null, + "involvedObject": { + "apiVersion": "v1", + "kind": "Pod", + "name": "api-577bffc7b-7pfjv", + "namespace": "highload-applications", + "resourceVersion": "60162999", + "uid": "56b44bd1-0f98-4169-ba8e-b70b6262b818" + }, + "kind": "Event", + "lastTimestamp": null, + "message": "Successfully assigned highload-applications/api-577bffc7b-7pfjv to dev.asisti.tech", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:28Z", + "name": "api-577bffc7b-7pfjv.18e2fc3ecddc17c4", + "namespace": "highload-applications", + "resourceVersion": "60163006", + "uid": "e5ff08be-47ea-40e6-b19a-d15d488a1008" + }, + "reason": "Scheduled", + "reportingComponent": "default-scheduler", + "reportingInstance": "default-scheduler-marlosrv0", + "source": {}, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:29Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-7pfjv", + "namespace": "highload-applications", + "resourceVersion": "60163002", + "uid": "56b44bd1-0f98-4169-ba8e-b70b6262b818" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:29Z", + "message": "Container image \"asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3\" already present on machine", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:29Z", + "name": "api-577bffc7b-7pfjv.18e2fc3f160ea88c", + "namespace": "highload-applications", + "resourceVersion": "60163029", + "uid": "3071b88b-743d-46ee-939f-32e0bf21e9d5" + }, + "reason": "Pulled", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:29Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-7pfjv", + "namespace": "highload-applications", + "resourceVersion": "60163002", + "uid": "56b44bd1-0f98-4169-ba8e-b70b6262b818" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:29Z", + "message": "Created container: api", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:29Z", + "name": "api-577bffc7b-7pfjv.18e2fc3f1a07e76b", + "namespace": "highload-applications", + "resourceVersion": "60163032", + "uid": "dac34e80-865b-4c00-a0fd-3061e0537124" + }, + "reason": "Created", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:29Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-7pfjv", + "namespace": "highload-applications", + "resourceVersion": "60163002", + "uid": "56b44bd1-0f98-4169-ba8e-b70b6262b818" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:29Z", + "message": "Started container api", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:29Z", + "name": "api-577bffc7b-7pfjv.18e2fc3f281a0a9e", + "namespace": "highload-applications", + "resourceVersion": "60163033", + "uid": "2f249c7e-4958-458a-aa92-e1dfd3b38c88" + }, + "reason": "Started", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 3, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:23:00Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-7pfjv", + "namespace": "highload-applications", + "resourceVersion": "60163002", + "uid": "56b44bd1-0f98-4169-ba8e-b70b6262b818" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:23:04Z", + "message": "Readiness probe failed: Get \"http://10.1.25.123:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:23:06Z", + "name": "api-577bffc7b-7pfjv.18e2fc465cdc337d", + "namespace": "highload-applications", + "resourceVersion": "60163223", + "uid": "bdefbc90-9498-475a-9571-55e334b030b1" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "action": "Binding", + "apiVersion": "v1", + "eventTime": "2026-10-29T11:22:28.997450Z", + "firstTimestamp": null, + "involvedObject": { + "apiVersion": "v1", + "kind": "Pod", + "name": "api-577bffc7b-9dl4t", + "namespace": "highload-applications", + "resourceVersion": "60163014", + "uid": "2d8c4451-3413-48e8-8b56-7f05de06738f" + }, + "kind": "Event", + "lastTimestamp": null, + "message": "Successfully assigned highload-applications/api-577bffc7b-9dl4t to dev.asisti.tech", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:28Z", + "name": "api-577bffc7b-9dl4t.18e2fc3ef64f873c", + "namespace": "highload-applications", + "resourceVersion": "60163020", + "uid": "7f18a31a-874e-4f7e-be36-b4da90750880" + }, + "reason": "Scheduled", + "reportingComponent": "default-scheduler", + "reportingInstance": "default-scheduler-marlosrv0", + "source": {}, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:30Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-9dl4t", + "namespace": "highload-applications", + "resourceVersion": "60163017", + "uid": "2d8c4451-3413-48e8-8b56-7f05de06738f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:30Z", + "message": "Container image \"asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3\" already present on machine", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:30Z", + "name": "api-577bffc7b-9dl4t.18e2fc3f53783a49", + "namespace": "highload-applications", + "resourceVersion": "60163047", + "uid": "e4324dae-5510-426d-9c0a-3893b496f121" + }, + "reason": "Pulled", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:30Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-9dl4t", + "namespace": "highload-applications", + "resourceVersion": "60163017", + "uid": "2d8c4451-3413-48e8-8b56-7f05de06738f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:30Z", + "message": "Created container: api", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:30Z", + "name": "api-577bffc7b-9dl4t.18e2fc3f5aaf746c", + "namespace": "highload-applications", + "resourceVersion": "60163048", + "uid": "02adf172-93ed-4375-8c0f-31fc42b28261" + }, + "reason": "Created", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:30Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-9dl4t", + "namespace": "highload-applications", + "resourceVersion": "60163017", + "uid": "2d8c4451-3413-48e8-8b56-7f05de06738f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:30Z", + "message": "Started container api", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:30Z", + "name": "api-577bffc7b-9dl4t.18e2fc3f691a4ecf", + "namespace": "highload-applications", + "resourceVersion": "60163052", + "uid": "145a67a2-fe47-4e5e-891f-189c5fb624ad" + }, + "reason": "Started", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 3, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:59Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-9dl4t", + "namespace": "highload-applications", + "resourceVersion": "60163017", + "uid": "2d8c4451-3413-48e8-8b56-7f05de06738f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:23:03Z", + "message": "Readiness probe failed: Get \"http://10.1.25.88:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:59Z", + "name": "api-577bffc7b-9dl4t.18e2fc462186f252", + "namespace": "highload-applications", + "resourceVersion": "60163220", + "uid": "9c07ae42-255b-40c6-bb26-b28466c18f1c" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "action": "Binding", + "apiVersion": "v1", + "eventTime": "2026-10-29T11:19:22.570826Z", + "firstTimestamp": null, + "involvedObject": { + "apiVersion": "v1", + "kind": "Pod", + "name": "api-577bffc7b-c9wsv", + "namespace": "highload-applications", + "resourceVersion": "60162133", + "uid": "eda3f3ef-ee8b-453b-89fd-6a2b778d380c" + }, + "kind": "Event", + "lastTimestamp": null, + "message": "Successfully assigned highload-applications/api-577bffc7b-c9wsv to dev.asisti.tech", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:22Z", + "name": "api-577bffc7b-c9wsv.18e2fc138e6af003", + "namespace": "highload-applications", + "resourceVersion": "60162139", + "uid": "ebe407ac-5846-473e-9cd1-6eb8510ffd92" + }, + "reason": "Scheduled", + "reportingComponent": "default-scheduler", + "reportingInstance": "default-scheduler-marlosrv0", + "source": {}, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:29Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-c9wsv", + "namespace": "highload-applications", + "resourceVersion": "60162136", + "uid": "eda3f3ef-ee8b-453b-89fd-6a2b778d380c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:29Z", + "message": "Container image \"asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3\" already present on machine", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:29Z", + "name": "api-577bffc7b-c9wsv.18e2fc153c95f33e", + "namespace": "highload-applications", + "resourceVersion": "60162205", + "uid": "afdfd685-c2e9-4634-9b3d-b40b17a664f1" + }, + "reason": "Pulled", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:29Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-c9wsv", + "namespace": "highload-applications", + "resourceVersion": "60162136", + "uid": "eda3f3ef-ee8b-453b-89fd-6a2b778d380c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:29Z", + "message": "Created container: api", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:29Z", + "name": "api-577bffc7b-c9wsv.18e2fc15408bc10a", + "namespace": "highload-applications", + "resourceVersion": "60162208", + "uid": "891327fe-f1da-4dc6-81b0-230aa86e1f3f" + }, + "reason": "Created", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:30Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-c9wsv", + "namespace": "highload-applications", + "resourceVersion": "60162136", + "uid": "eda3f3ef-ee8b-453b-89fd-6a2b778d380c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:30Z", + "message": "Started container api", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:30Z", + "name": "api-577bffc7b-c9wsv.18e2fc154fdb5f34", + "namespace": "highload-applications", + "resourceVersion": "60162211", + "uid": "677aabfa-2295-4a06-94d0-ad85bac4912c" + }, + "reason": "Started", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 5, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:23Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-c9wsv", + "namespace": "highload-applications", + "resourceVersion": "60162136", + "uid": "eda3f3ef-ee8b-453b-89fd-6a2b778d380c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:39Z", + "message": "Readiness probe failed: Get \"http://10.1.25.118:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:23Z", + "name": "api-577bffc7b-c9wsv.18e2fc21ce851361", + "namespace": "highload-applications", + "resourceVersion": "60162487", + "uid": "7a60d2f3-4ad2-4400-aa03-6fb8b6478b2b" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:54Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-c9wsv", + "namespace": "highload-applications", + "resourceVersion": "60162136", + "uid": "eda3f3ef-ee8b-453b-89fd-6a2b778d380c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:54Z", + "message": "Stopping container api", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:54Z", + "name": "api-577bffc7b-c9wsv.18e2fc2907ca7bcf", + "namespace": "highload-applications", + "resourceVersion": "60162604", + "uid": "9ed1c53a-75f1-4709-88d9-6d4b0ddbb080" + }, + "reason": "Killing", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:57Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-577bffc7b-c9wsv", + "namespace": "highload-applications", + "resourceVersion": "60162136", + "uid": "eda3f3ef-ee8b-453b-89fd-6a2b778d380c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:57Z", + "message": "Readiness probe failed: Get \"http://10.1.25.118:8080/health/ready\": dial tcp 10.1.25.118:8080: connect: connection refused", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:57Z", + "name": "api-577bffc7b-c9wsv.18e2fc29bfbdd4a3", + "namespace": "highload-applications", + "resourceVersion": "60162625", + "uid": "38b47972-2662-4214-9a07-06e1ba37366c" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:22Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "api-577bffc7b", + "namespace": "highload-applications", + "resourceVersion": "60162127", + "uid": "3b15ef13-9497-4746-b092-f16be09d480c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:22Z", + "message": "Created pod: api-577bffc7b-c9wsv", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:22Z", + "name": "api-577bffc7b.18e2fc138dbe45d8", + "namespace": "highload-applications", + "resourceVersion": "60162135", + "uid": "eb2c537f-95e6-4777-9301-9c28070c3641" + }, + "reason": "SuccessfulCreate", + "reportingComponent": "replicaset-controller", + "reportingInstance": "", + "source": { + "component": "replicaset-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:54Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "api-577bffc7b", + "namespace": "highload-applications", + "resourceVersion": "60162597", + "uid": "3b15ef13-9497-4746-b092-f16be09d480c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:54Z", + "message": "Deleted pod: api-577bffc7b-c9wsv", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:54Z", + "name": "api-577bffc7b.18e2fc290660857f", + "namespace": "highload-applications", + "resourceVersion": "60162600", + "uid": "4705e1fb-4132-4cc6-92f0-692459770281" + }, + "reason": "SuccessfulDelete", + "reportingComponent": "replicaset-controller", + "reportingInstance": "", + "source": { + "component": "replicaset-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:28Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "api-577bffc7b", + "namespace": "highload-applications", + "resourceVersion": "60162993", + "uid": "3b15ef13-9497-4746-b092-f16be09d480c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:28Z", + "message": "Created pod: api-577bffc7b-7pfjv", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:28Z", + "name": "api-577bffc7b.18e2fc3ecd29e1ba", + "namespace": "highload-applications", + "resourceVersion": "60163003", + "uid": "e7b962b0-1833-47a7-a7e5-149fcab15766" + }, + "reason": "SuccessfulCreate", + "reportingComponent": "replicaset-controller", + "reportingInstance": "", + "source": { + "component": "replicaset-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:28Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "name": "api-577bffc7b", + "namespace": "highload-applications", + "resourceVersion": "60163013", + "uid": "3b15ef13-9497-4746-b092-f16be09d480c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:28Z", + "message": "Created pod: api-577bffc7b-9dl4t", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:28Z", + "name": "api-577bffc7b.18e2fc3ef59b6dcf", + "namespace": "highload-applications", + "resourceVersion": "60163016", + "uid": "3c8783a1-f5df-40dc-93ea-54677c3aa6fa" + }, + "reason": "SuccessfulCreate", + "reportingComponent": "replicaset-controller", + "reportingInstance": "", + "source": { + "component": "replicaset-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 38, + "eventTime": null, + "firstTimestamp": "2026-10-29T10:58:42Z", + "involvedObject": { + "apiVersion": "apps/v1", + "kind": "Deployment", + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60162122", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:22Z", + "message": "(combined from similar events): Scaled down replica set api-54f7cc6f98 from 2 to 1", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:22Z", + "name": "api.18e2faf2c643f5fd", + "namespace": "highload-applications", + "resourceVersion": "60162125", + "uid": "b7b420d6-e7f4-4ce3-8e11-00a1d69c724d" + }, + "reason": "ScalingReplicaSet", + "reportingComponent": "", + "reportingInstance": "", + "source": { + "component": "deployment-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 4, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:17:06Z", + "involvedObject": { + "apiVersion": "autoscaling/v2", + "kind": "HorizontalPodAutoscaler", + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60161619", + "uid": "f4ff85e3-7a2e-4a63-af15-7227d6125fa5" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:29Z", + "message": "failed to get cpu utilization: did not receive metrics for targeted pods (pods might be unready)", + "metadata": { + "creationTimestamp": "2026-10-29T11:17:06Z", + "name": "api.18e2fbf3e0e732ee", + "namespace": "highload-applications", + "resourceVersion": "60162196", + "uid": "cb64f8f6-45bc-481b-8a74-0ae1f9277a88" + }, + "reason": "FailedGetResourceMetric", + "reportingComponent": "horizontal-pod-autoscaler", + "reportingInstance": "", + "source": { + "component": "horizontal-pod-autoscaler" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 4, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:17:06Z", + "involvedObject": { + "apiVersion": "autoscaling/v2", + "kind": "HorizontalPodAutoscaler", + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60161619", + "uid": "f4ff85e3-7a2e-4a63-af15-7227d6125fa5" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:29Z", + "message": "invalid metrics (1 invalid out of 1), first error is: failed to get cpu resource metric value: failed to get cpu utilization: did not receive metrics for targeted pods (pods might be unready)", + "metadata": { + "creationTimestamp": "2026-10-29T11:17:06Z", + "name": "api.18e2fbf3e1d04cf2", + "namespace": "highload-applications", + "resourceVersion": "60162198", + "uid": "4e6e628b-c8f4-4dc3-b405-abdffb0650e4" + }, + "reason": "FailedComputeMetricsReplicas", + "reportingComponent": "horizontal-pod-autoscaler", + "reportingInstance": "", + "source": { + "component": "horizontal-pod-autoscaler" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:29Z", + "involvedObject": { + "apiVersion": "autoscaling/v2", + "kind": "HorizontalPodAutoscaler", + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60162076", + "uid": "f4ff85e3-7a2e-4a63-af15-7227d6125fa5" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:29Z", + "message": "Operation cannot be fulfilled on horizontalpodautoscalers.autoscaling \"api\": StorageError: invalid object, Code: 4, Key: /registry/horizontalpodautoscalers/highload-applications/api, ResourceVersion: 0, AdditionalErrorMsg: Precondition failed: UID in precondition: f4ff85e3-7a2e-4a63-af15-7227d6125fa5, UID in object meta: ", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:29Z", + "name": "api.18e2fc1527c4ebba", + "namespace": "highload-applications", + "resourceVersion": "60162197", + "uid": "c6d1900c-5bcf-43d8-9df2-b8c2a7a07b7f" + }, + "reason": "FailedUpdateStatus", + "reportingComponent": "horizontal-pod-autoscaler", + "reportingInstance": "", + "source": { + "component": "horizontal-pod-autoscaler" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 2, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:21:06Z", + "involvedObject": { + "apiVersion": "autoscaling/v2", + "kind": "HorizontalPodAutoscaler", + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60162552", + "uid": "72625cc0-d163-4075-9335-816cfb2102de" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:28Z", + "message": "New size: 2; reason: Current number of replicas below Spec.MinReplicas", + "metadata": { + "creationTimestamp": "2026-10-29T11:21:06Z", + "name": "api.18e2fc2bc0281d3b", + "namespace": "highload-applications", + "resourceVersion": "60163012", + "uid": "5f5f73c0-9a13-4a1d-a18a-a8155c857ba2" + }, + "reason": "SuccessfulRescale", + "reportingComponent": "horizontal-pod-autoscaler", + "reportingInstance": "", + "source": { + "component": "horizontal-pod-autoscaler" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:13Z", + "involvedObject": { + "apiVersion": "autoscaling/v2", + "kind": "HorizontalPodAutoscaler", + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60162865", + "uid": "72625cc0-d163-4075-9335-816cfb2102de" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:13Z", + "message": "failed to get cpu utilization: did not receive metrics for targeted pods (pods might be unready)", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:13Z", + "name": "api.18e2fc3b74533e5b", + "namespace": "highload-applications", + "resourceVersion": "60162945", + "uid": "d2382884-b07f-4f62-97bb-4799c9dca7ba" + }, + "reason": "FailedGetResourceMetric", + "reportingComponent": "horizontal-pod-autoscaler", + "reportingInstance": "", + "source": { + "component": "horizontal-pod-autoscaler" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:13Z", + "involvedObject": { + "apiVersion": "autoscaling/v2", + "kind": "HorizontalPodAutoscaler", + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60162865", + "uid": "72625cc0-d163-4075-9335-816cfb2102de" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:13Z", + "message": "invalid metrics (1 invalid out of 1), first error is: failed to get cpu resource metric value: failed to get cpu utilization: did not receive metrics for targeted pods (pods might be unready)", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:13Z", + "name": "api.18e2fc3b75378ced", + "namespace": "highload-applications", + "resourceVersion": "60162947", + "uid": "45596b12-4bb5-4e5b-8676-cf0bb514a246" + }, + "reason": "FailedComputeMetricsReplicas", + "reportingComponent": "horizontal-pod-autoscaler", + "reportingInstance": "", + "source": { + "component": "horizontal-pod-autoscaler" + }, + "type": "Warning" + }, + { + "action": "Binding", + "apiVersion": "v1", + "eventTime": "2026-10-29T11:20:06.178578Z", + "firstTimestamp": null, + "involvedObject": { + "apiVersion": "v1", + "kind": "Pod", + "name": "load-growing1-20261029111920-qrwb8", + "namespace": "highload-applications", + "resourceVersion": "60162362", + "uid": "23f73e0e-d7ca-41bb-9747-5a520690afcc" + }, + "kind": "Event", + "lastTimestamp": null, + "message": "Successfully assigned highload-applications/load-growing1-20261029111920-qrwb8 to dev.asisti.tech", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:06Z", + "name": "load-growing1-20261029111920-qrwb8.18e2fc1db5a489bc", + "namespace": "highload-applications", + "resourceVersion": "60162366", + "uid": "5e59068d-bb67-438c-aabf-2ae629f1d26a" + }, + "reason": "Scheduled", + "reportingComponent": "default-scheduler", + "reportingInstance": "default-scheduler-marlosrv0", + "source": {}, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:07Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{k6}", + "kind": "Pod", + "name": "load-growing1-20261029111920-qrwb8", + "namespace": "highload-applications", + "resourceVersion": "60162364", + "uid": "23f73e0e-d7ca-41bb-9747-5a520690afcc" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:07Z", + "message": "Container image \"grafana/k6:1.3.0\" already present on machine", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:07Z", + "name": "load-growing1-20261029111920-qrwb8.18e2fc1e1dbbd6ae", + "namespace": "highload-applications", + "resourceVersion": "60162373", + "uid": "f7e9c2dd-1e7a-4dbb-b644-148366724b7b" + }, + "reason": "Pulled", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:07Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{k6}", + "kind": "Pod", + "name": "load-growing1-20261029111920-qrwb8", + "namespace": "highload-applications", + "resourceVersion": "60162364", + "uid": "23f73e0e-d7ca-41bb-9747-5a520690afcc" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:07Z", + "message": "Created container: k6", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:08Z", + "name": "load-growing1-20261029111920-qrwb8.18e2fc1e20bc70b1", + "namespace": "highload-applications", + "resourceVersion": "60162374", + "uid": "7b447aae-177c-41c2-95f8-64c2d2cb5a4c" + }, + "reason": "Created", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:08Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{k6}", + "kind": "Pod", + "name": "load-growing1-20261029111920-qrwb8", + "namespace": "highload-applications", + "resourceVersion": "60162364", + "uid": "23f73e0e-d7ca-41bb-9747-5a520690afcc" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:08Z", + "message": "Started container k6", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:08Z", + "name": "load-growing1-20261029111920-qrwb8.18e2fc1e276602d7", + "namespace": "highload-applications", + "resourceVersion": "60162377", + "uid": "44dfef0e-d45b-472d-9971-de49c8e29701" + }, + "reason": "Started", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:06Z", + "involvedObject": { + "apiVersion": "batch/v1", + "kind": "Job", + "name": "load-growing1-20261029111920", + "namespace": "highload-applications", + "resourceVersion": "60162361", + "uid": "f9646401-1671-46d3-b2d4-aee29e410257" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:06Z", + "message": "Created pod: load-growing1-20261029111920-qrwb8", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:06Z", + "name": "load-growing1-20261029111920.18e2fc1db4b37df7", + "namespace": "highload-applications", + "resourceVersion": "60162363", + "uid": "13558755-4499-4e00-9fd9-f886e31cfeaa" + }, + "reason": "SuccessfulCreate", + "reportingComponent": "job-controller", + "reportingInstance": "", + "source": { + "component": "job-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:21:05Z", + "involvedObject": { + "apiVersion": "batch/v1", + "kind": "Job", + "name": "load-growing1-20261029111920", + "namespace": "highload-applications", + "resourceVersion": "60162663", + "uid": "f9646401-1671-46d3-b2d4-aee29e410257" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:21:05Z", + "message": "Job completed", + "metadata": { + "creationTimestamp": "2026-10-29T11:21:05Z", + "name": "load-growing1-20261029111920.18e2fc2b7e0fdbb1", + "namespace": "highload-applications", + "resourceVersion": "60162666", + "uid": "788b9ebd-7f57-4cc7-a177-8467db135fc3" + }, + "reason": "Completed", + "reportingComponent": "job-controller", + "reportingInstance": "", + "source": { + "component": "job-controller" + }, + "type": "Normal" + }, + { + "action": "Binding", + "apiVersion": "v1", + "eventTime": "2026-10-29T11:23:14.626066Z", + "firstTimestamp": null, + "involvedObject": { + "apiVersion": "v1", + "kind": "Pod", + "name": "load-growing1-20261029112219-kb6g4", + "namespace": "highload-applications", + "resourceVersion": "60163252", + "uid": "d57e423b-69e7-4f21-bfd3-b39be3580e8b" + }, + "kind": "Event", + "lastTimestamp": null, + "message": "Successfully assigned highload-applications/load-growing1-20261029112219-kb6g4 to dev.asisti.tech", + "metadata": { + "creationTimestamp": "2026-10-29T11:23:14Z", + "name": "load-growing1-20261029112219-kb6g4.18e2fc4995fd1146", + "namespace": "highload-applications", + "resourceVersion": "60163256", + "uid": "66ce5470-9471-4425-9cf1-e7d56f926ade" + }, + "reason": "Scheduled", + "reportingComponent": "default-scheduler", + "reportingInstance": "default-scheduler-marlosrv0", + "source": {}, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:23:16Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{k6}", + "kind": "Pod", + "name": "load-growing1-20261029112219-kb6g4", + "namespace": "highload-applications", + "resourceVersion": "60163254", + "uid": "d57e423b-69e7-4f21-bfd3-b39be3580e8b" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:23:16Z", + "message": "Container image \"grafana/k6:1.3.0\" already present on machine", + "metadata": { + "creationTimestamp": "2026-10-29T11:23:16Z", + "name": "load-growing1-20261029112219-kb6g4.18e2fc49e935101b", + "namespace": "highload-applications", + "resourceVersion": "60163265", + "uid": "917ffe13-8c73-48a6-a753-a8aacf92ea89" + }, + "reason": "Pulled", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:23:16Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{k6}", + "kind": "Pod", + "name": "load-growing1-20261029112219-kb6g4", + "namespace": "highload-applications", + "resourceVersion": "60163254", + "uid": "d57e423b-69e7-4f21-bfd3-b39be3580e8b" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:23:16Z", + "message": "Created container: k6", + "metadata": { + "creationTimestamp": "2026-10-29T11:23:16Z", + "name": "load-growing1-20261029112219-kb6g4.18e2fc49eb96ed3f", + "namespace": "highload-applications", + "resourceVersion": "60163266", + "uid": "e8f1c283-5a87-4097-81f1-540923c54354" + }, + "reason": "Created", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:23:16Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{k6}", + "kind": "Pod", + "name": "load-growing1-20261029112219-kb6g4", + "namespace": "highload-applications", + "resourceVersion": "60163254", + "uid": "d57e423b-69e7-4f21-bfd3-b39be3580e8b" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:23:16Z", + "message": "Started container k6", + "metadata": { + "creationTimestamp": "2026-10-29T11:23:16Z", + "name": "load-growing1-20261029112219-kb6g4.18e2fc49f18cd249", + "namespace": "highload-applications", + "resourceVersion": "60163267", + "uid": "0ca6f304-e4be-4bd6-be86-1352180c04ee" + }, + "reason": "Started", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:23:14Z", + "involvedObject": { + "apiVersion": "batch/v1", + "kind": "Job", + "name": "load-growing1-20261029112219", + "namespace": "highload-applications", + "resourceVersion": "60163251", + "uid": "7d536025-a5f2-4290-9ea0-54643341b97c" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:23:14Z", + "message": "Created pod: load-growing1-20261029112219-kb6g4", + "metadata": { + "creationTimestamp": "2026-10-29T11:23:14Z", + "name": "load-growing1-20261029112219.18e2fc499511e3c2", + "namespace": "highload-applications", + "resourceVersion": "60163253", + "uid": "20f5e6c5-0ec5-4744-9bc7-31d5544077c1" + }, + "reason": "SuccessfulCreate", + "reportingComponent": "job-controller", + "reportingInstance": "", + "source": { + "component": "job-controller" + }, + "type": "Normal" + }, + { + "action": "Binding", + "apiVersion": "v1", + "eventTime": "2026-10-29T11:19:23.237540Z", + "firstTimestamp": null, + "involvedObject": { + "apiVersion": "v1", + "kind": "Pod", + "name": "migrate-16-r5cdz", + "namespace": "highload-applications", + "resourceVersion": "60162146", + "uid": "3e94c137-2626-43c3-b771-cd4145574bc1" + }, + "kind": "Event", + "lastTimestamp": null, + "message": "Successfully assigned highload-applications/migrate-16-r5cdz to dev.asisti.tech", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:23Z", + "name": "migrate-16-r5cdz.18e2fc13b6282eae", + "namespace": "highload-applications", + "resourceVersion": "60162150", + "uid": "d0b65008-3cef-40c2-a4d0-db44e4e50601" + }, + "reason": "Scheduled", + "reportingComponent": "default-scheduler", + "reportingInstance": "default-scheduler-marlosrv0", + "source": {}, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:29Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{migrate}", + "kind": "Pod", + "name": "migrate-16-r5cdz", + "namespace": "highload-applications", + "resourceVersion": "60162149", + "uid": "3e94c137-2626-43c3-b771-cd4145574bc1" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:29Z", + "message": "Container image \"asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3\" already present on machine", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:29Z", + "name": "migrate-16-r5cdz.18e2fc153e8b96c2", + "namespace": "highload-applications", + "resourceVersion": "60162207", + "uid": "98e2eb55-3a75-49ec-92e1-9b79c54311a3" + }, + "reason": "Pulled", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:29Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{migrate}", + "kind": "Pod", + "name": "migrate-16-r5cdz", + "namespace": "highload-applications", + "resourceVersion": "60162149", + "uid": "3e94c137-2626-43c3-b771-cd4145574bc1" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:29Z", + "message": "Created container: migrate", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:29Z", + "name": "migrate-16-r5cdz.18e2fc15423dfe61", + "namespace": "highload-applications", + "resourceVersion": "60162209", + "uid": "bf30a313-588a-4c18-861b-e9d53b38f0d7" + }, + "reason": "Created", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:30Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{migrate}", + "kind": "Pod", + "name": "migrate-16-r5cdz", + "namespace": "highload-applications", + "resourceVersion": "60162149", + "uid": "3e94c137-2626-43c3-b771-cd4145574bc1" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:30Z", + "message": "Started container migrate", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:30Z", + "name": "migrate-16-r5cdz.18e2fc154a1c7ade", + "namespace": "highload-applications", + "resourceVersion": "60162210", + "uid": "91b80b55-8abb-4e5a-9190-6781fda37a59" + }, + "reason": "Started", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:23Z", + "involvedObject": { + "apiVersion": "batch/v1", + "kind": "Job", + "name": "migrate-16", + "namespace": "highload-applications", + "resourceVersion": "60162145", + "uid": "2a9108e2-2fc1-4391-b75e-b907f87355b8" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:23Z", + "message": "Created pod: migrate-16-r5cdz", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:23Z", + "name": "migrate-16.18e2fc13b59d4539", + "namespace": "highload-applications", + "resourceVersion": "60162147", + "uid": "f68cdc25-8b0e-4404-aa2d-bf8ae6033489" + }, + "reason": "SuccessfulCreate", + "reportingComponent": "job-controller", + "reportingInstance": "", + "source": { + "component": "job-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:19:33Z", + "involvedObject": { + "apiVersion": "batch/v1", + "kind": "Job", + "name": "migrate-16", + "namespace": "highload-applications", + "resourceVersion": "60162252", + "uid": "2a9108e2-2fc1-4391-b75e-b907f87355b8" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:19:33Z", + "message": "Job completed", + "metadata": { + "creationTimestamp": "2026-10-29T11:19:33Z", + "name": "migrate-16.18e2fc15fd2da6f8", + "namespace": "highload-applications", + "resourceVersion": "60162255", + "uid": "92407f93-1dbd-4b18-8de9-a6f2ca465da8" + }, + "reason": "Completed", + "reportingComponent": "job-controller", + "reportingInstance": "", + "source": { + "component": "job-controller" + }, + "type": "Normal" + }, + { + "action": "Binding", + "apiVersion": "v1", + "eventTime": "2026-10-29T11:20:52.185631Z", + "firstTimestamp": null, + "involvedObject": { + "apiVersion": "v1", + "kind": "Pod", + "name": "migrate-17-qnn49", + "namespace": "highload-applications", + "resourceVersion": "60162563", + "uid": "aad7e921-0be5-4ff8-b32c-cfb0ddaf1a7b" + }, + "kind": "Event", + "lastTimestamp": null, + "message": "Successfully assigned highload-applications/migrate-17-qnn49 to dev.asisti.tech", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:52Z", + "name": "migrate-17-qnn49.18e2fc286be05c10", + "namespace": "highload-applications", + "resourceVersion": "60162567", + "uid": "52d37526-c80b-42ff-9e7d-847ae65bd892" + }, + "reason": "Scheduled", + "reportingComponent": "default-scheduler", + "reportingInstance": "default-scheduler-marlosrv0", + "source": {}, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:53Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{migrate}", + "kind": "Pod", + "name": "migrate-17-qnn49", + "namespace": "highload-applications", + "resourceVersion": "60162564", + "uid": "aad7e921-0be5-4ff8-b32c-cfb0ddaf1a7b" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:53Z", + "message": "Container image \"asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3\" already present on machine", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:53Z", + "name": "migrate-17-qnn49.18e2fc28a6bb5e20", + "namespace": "highload-applications", + "resourceVersion": "60162585", + "uid": "869b8d64-4475-496a-866c-d5d09626480f" + }, + "reason": "Pulled", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:53Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{migrate}", + "kind": "Pod", + "name": "migrate-17-qnn49", + "namespace": "highload-applications", + "resourceVersion": "60162564", + "uid": "aad7e921-0be5-4ff8-b32c-cfb0ddaf1a7b" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:53Z", + "message": "Created container: migrate", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:53Z", + "name": "migrate-17-qnn49.18e2fc28ab14d093", + "namespace": "highload-applications", + "resourceVersion": "60162586", + "uid": "2d9c11fc-a162-48a9-bdc8-f20be36a4de9" + }, + "reason": "Created", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:53Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{migrate}", + "kind": "Pod", + "name": "migrate-17-qnn49", + "namespace": "highload-applications", + "resourceVersion": "60162564", + "uid": "aad7e921-0be5-4ff8-b32c-cfb0ddaf1a7b" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:53Z", + "message": "Started container migrate", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:53Z", + "name": "migrate-17-qnn49.18e2fc28b2ad3bff", + "namespace": "highload-applications", + "resourceVersion": "60162587", + "uid": "d73e5547-fbe1-4a26-976c-2ee427aa5049" + }, + "reason": "Started", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:52Z", + "involvedObject": { + "apiVersion": "batch/v1", + "kind": "Job", + "name": "migrate-17", + "namespace": "highload-applications", + "resourceVersion": "60162562", + "uid": "7afb4cf6-b6fe-497c-a312-bfb3ca8a599f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:52Z", + "message": "Created pod: migrate-17-qnn49", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:52Z", + "name": "migrate-17.18e2fc286b7a4c43", + "namespace": "highload-applications", + "resourceVersion": "60162566", + "uid": "a856567b-cf66-4ea2-8925-87c6c17e4ff6" + }, + "reason": "SuccessfulCreate", + "reportingComponent": "job-controller", + "reportingInstance": "", + "source": { + "component": "job-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:20:56Z", + "involvedObject": { + "apiVersion": "batch/v1", + "kind": "Job", + "name": "migrate-17", + "namespace": "highload-applications", + "resourceVersion": "60162615", + "uid": "7afb4cf6-b6fe-497c-a312-bfb3ca8a599f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:20:56Z", + "message": "Job completed", + "metadata": { + "creationTimestamp": "2026-10-29T11:20:56Z", + "name": "migrate-17.18e2fc297012e67c", + "namespace": "highload-applications", + "resourceVersion": "60162618", + "uid": "64997301-d100-466b-8551-39fd27535277" + }, + "reason": "Completed", + "reportingComponent": "job-controller", + "reportingInstance": "", + "source": { + "component": "job-controller" + }, + "type": "Normal" + }, + { + "action": "Binding", + "apiVersion": "v1", + "eventTime": "2026-10-29T11:22:30.033193Z", + "firstTimestamp": null, + "involvedObject": { + "apiVersion": "v1", + "kind": "Pod", + "name": "migrate-18-lg8kn", + "namespace": "highload-applications", + "resourceVersion": "60163035", + "uid": "8ede605b-8720-4f85-98f2-cb214511251d" + }, + "kind": "Event", + "lastTimestamp": null, + "message": "Successfully assigned highload-applications/migrate-18-lg8kn to dev.asisti.tech", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:30Z", + "name": "migrate-18-lg8kn.18e2fc3f340badd2", + "namespace": "highload-applications", + "resourceVersion": "60163039", + "uid": "9911d781-2fe6-492c-aeca-235c5359be7f" + }, + "reason": "Scheduled", + "reportingComponent": "default-scheduler", + "reportingInstance": "default-scheduler-marlosrv0", + "source": {}, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:31Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{migrate}", + "kind": "Pod", + "name": "migrate-18-lg8kn", + "namespace": "highload-applications", + "resourceVersion": "60163038", + "uid": "8ede605b-8720-4f85-98f2-cb214511251d" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:31Z", + "message": "Container image \"asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3\" already present on machine", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:31Z", + "name": "migrate-18-lg8kn.18e2fc3f96c7a16d", + "namespace": "highload-applications", + "resourceVersion": "60163061", + "uid": "b46c03db-8711-4e10-bec0-ed1c9333dc99" + }, + "reason": "Pulled", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:31Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{migrate}", + "kind": "Pod", + "name": "migrate-18-lg8kn", + "namespace": "highload-applications", + "resourceVersion": "60163038", + "uid": "8ede605b-8720-4f85-98f2-cb214511251d" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:31Z", + "message": "Created container: migrate", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:31Z", + "name": "migrate-18-lg8kn.18e2fc3f9a19d199", + "namespace": "highload-applications", + "resourceVersion": "60163062", + "uid": "6caa3f49-2756-4c94-8636-c31d12783fec" + }, + "reason": "Created", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:31Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{migrate}", + "kind": "Pod", + "name": "migrate-18-lg8kn", + "namespace": "highload-applications", + "resourceVersion": "60163038", + "uid": "8ede605b-8720-4f85-98f2-cb214511251d" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:31Z", + "message": "Started container migrate", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:31Z", + "name": "migrate-18-lg8kn.18e2fc3fa15acbb8", + "namespace": "highload-applications", + "resourceVersion": "60163066", + "uid": "a46d577a-0a78-4112-a2a8-1d452c334003" + }, + "reason": "Started", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:30Z", + "involvedObject": { + "apiVersion": "batch/v1", + "kind": "Job", + "name": "migrate-18", + "namespace": "highload-applications", + "resourceVersion": "60163034", + "uid": "bb8776d0-fdc1-40f9-82a1-99456bb1b64b" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:30Z", + "message": "Created pod: migrate-18-lg8kn", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:30Z", + "name": "migrate-18.18e2fc3f332bd7b6", + "namespace": "highload-applications", + "resourceVersion": "60163036", + "uid": "d6519df8-2603-4f4b-8cb6-6f4d8ca40668" + }, + "reason": "SuccessfulCreate", + "reportingComponent": "job-controller", + "reportingInstance": "", + "source": { + "component": "job-controller" + }, + "type": "Normal" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:22:35Z", + "involvedObject": { + "apiVersion": "batch/v1", + "kind": "Job", + "name": "migrate-18", + "namespace": "highload-applications", + "resourceVersion": "60163113", + "uid": "bb8776d0-fdc1-40f9-82a1-99456bb1b64b" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:22:35Z", + "message": "Job completed", + "metadata": { + "creationTimestamp": "2026-10-29T11:22:35Z", + "name": "migrate-18.18e2fc405d3ad326", + "namespace": "highload-applications", + "resourceVersion": "60163116", + "uid": "9a23fd61-6832-4c14-9bf9-692c7576c823" + }, + "reason": "Completed", + "reportingComponent": "job-controller", + "reportingInstance": "", + "source": { + "component": "job-controller" + }, + "type": "Normal" + } + ], + "kind": "List", + "metadata": { + "resourceVersion": "" + } +} diff --git a/evidence/research-20261029-final/excluded.json b/evidence/research-20261029-final/excluded.json new file mode 100644 index 00000000..5f3a95ec --- /dev/null +++ b/evidence/research-20261029-final/excluded.json @@ -0,0 +1,6 @@ +[ + "evidence/research-20261029-final/load-growing1-20261029111013.json", + "evidence/research-20261029-final/load-saturation8-20261029111530.json", + "evidence/research-20261029-pool/deployment-saturation8-20261029112615.json (replica mismatch)", + "evidence/research-20261029-readiness/deployment-probe2a-20261029113757.json (replica mismatch)" +] diff --git a/evidence/research-20261029-final/invalid-growing1-log.txt b/evidence/research-20261029-final/invalid-growing1-log.txt new file mode 100644 index 00000000..6130ed66 --- /dev/null +++ b/evidence/research-20261029-final/invalid-growing1-log.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":1198,"fails":19},{"id":"f737ff9008ff036f7a4b775b05a953fa","passes":134,"fails":1,"name":"retry returns original","path":"::retry returns original"},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":1179,"fails":3}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTimeUnit":"","noColor":false,"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":55367.980277},"metrics":{"failed_writes":{"values":{"count":19,"rate":0.3431586253452819},"type":"counter","contains":"default"},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_waiting":{"values":{"max":4013.911145,"avg":297.81720610999224,"p(50)":263.95369000000005,"p(95)":413.17917339999985,"p(99)":604.7509460200013},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"rate":21.3480786925328,"count":1182}},"measured_operations":{"type":"counter","contains":"default","values":{"count":2400,"rate":43.3463526751935}},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":355.6252164868189,"p(50)":291.28524749999997,"p(95)":462.9099535499996,"p(99)":4005.9950556599997,"max":4014.418809}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":406.2463302,"p(99)":504.5710182400003,"max":1187.822861,"avg":267.1168591070733,"p(50)":262.760403}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":1.5840202100000005,"max":44.779815,"avg":0.2732304372579401,"p(50)":0.1597055,"p(95)":0.6923887000000001}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":298.2575188466307,"p(50)":264.407159,"p(95)":413.67931565,"p(99)":605.5805445600013,"max":4014.418809}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":3,"rate":0.054182940843991875},"thresholds":{"count>=0":{"ok":true}}},"vus":{"values":{"value":32,"min":0,"max":32},"type":"gauge","contains":"default"},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":1119,"rate":20.21023693480897}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":1255.149739,"avg":1.6344206080557782,"p(50)":0.000826,"p(95)":0.00135795,"p(99)":27.324818060000318}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.6570658907823393,"p(50)":0,"p(95)":0,"p(99)":4.042904520000011,"max":1020.04565}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(95)":0.2917665999999996,"p(99)":0.6606140900000003,"max":11.115504,"avg":0.16708229938032532,"p(50)":0.13094450000000002}},"data_sent":{"type":"counter","contains":"data","values":{"count":253256,"rate":4574.051622128669}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.008907823392718823,"passes":23,"fails":2559}},"application_errors":{"type":"counter","contains":"default","values":{"count":23,"rate":0.4154025464706044}},"application_errors{status:429}":{"contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter"},"checks":{"contains":"default","values":{"rate":0.9909234411996843,"passes":2511,"fails":23},"type":"rate"},"attempted_messages":{"type":"counter","contains":"default","values":{"count":1138,"rate":20.55339556015425}},"data_received":{"contains":"data","values":{"count":3434918,"rate":62037.98626598763},"type":"counter"},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(99)":19.32826936000025,"max":283.028296,"avg":0.5257641402013942,"p(50)":0,"p(95)":0}},"iteration_duration":{"contains":"time","values":{"avg":570.8932141150593,"p(50)":553.444838,"p(95)":905.7134026,"p(99)":1115.6861048000019,"max":2503.263238},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":2582,"rate":46.633451086395674}}},"setup_data":[{"chat":"d9d8f2d4-8f6e-49ae-a80a-ece546cf42c6","token":"G4qF2Ute7G8F_APmqJLFEux0hdA53ri61ronobiOyg4"},{"chat":"d4b356a0-df3a-4633-9ecf-ca1493390bda","token":"C5wyqIQ7B09bphk-R3u6fKVZbfdeTtro0uhAcSFA8C8"},{"token":"zz30LRUG3SrBPuDWQ1sEg52NXOvZ-Bw0KMm23JFRyVY","chat":"b222aad4-8391-4d6a-8045-530887924ba4"},{"chat":"a1761fff-1dd3-4127-b774-8a847720ef1c","token":"FloVwhfqIgo19UsPuHALuktUw-qDI5VwVgIisS9lH98"},{"chat":"60fa4c46-4523-4488-bca1-dafaf427af7a","token":"YktaKb3-XVbBpQ6_X3wEdNa53JwzVBCeELNMSJSOv78"},{"token":"yjy9YRAekbRhfzgAWXoGt71qs1kzHMyYEX33AFuL8bI","chat":"c78f15a3-0c98-4d2e-a243-9822329a62d6"},{"chat":"b8b9fcd5-eca8-4911-98e9-0e07130eaa7f","token":"_flkDKIhbYwSMlwssqC8ypQ_XD8ENN0cEHYfuutM3TM"},{"chat":"e5577f27-a69e-4186-8e94-571f56c768d0","token":"VTFm9UnAQJHO4IDgVco3gyqwJt06ogVK4RTX3At0sk4"},{"token":"do2I5wtXXagD1hhNAysx90tjpeErNn0ZalsIfzpFAkQ","chat":"5a463815-2e22-479a-a868-bb70699ba1eb"},{"chat":"d64034a9-f2fd-4f9f-832f-111188ec5ec5","token":"x0aVzgFR-76AWhZI4TQ44o15g8SqxqVsGRusDwJlgRs"},{"chat":"a1dcb79a-1eaf-478a-ad20-1ce5a3868960","token":"WBYbR4I9S9TLLwjA6XWjly_RjmHcOfqboSNGlz7eheE"},{"token":"EE6btE1zMMWDMfffrW54wlyutRw-UrTHwDTVtNrgLvU","chat":"7b84d4bb-8857-4596-98f1-af304812fa5a"},{"token":"YiaJiD9gueKl4zRScUd4pvIchRWlHMhZ3v9SbUTsPxs","chat":"de3bfa66-6503-4951-94ab-50a84753a362"},{"chat":"25e66a5c-c3a2-42a1-ae8b-ca09b5c85d34","token":"DXVgvk4A1FrQx4tvgMD6WJkQbvPy8XCqo6cAKOc4JNs"},{"chat":"86c5e47f-5275-48fd-956b-f2c4596f63a1","token":"U3OZpqLbaEvWu1dwAX-MpwFHk38MM6YLYPuiEl60ACI"},{"chat":"154b072e-bc71-4acd-8d4f-b59b2245419c","token":"Nvfi1NkMce3_R2AXRaj3i0eoqAHzLQGiYwsm0kIQcSk"}]}} diff --git a/evidence/research-20261029-final/invalid-growing1.md b/evidence/research-20261029-final/invalid-growing1.md new file mode 100644 index 00000000..b9918aa6 --- /dev/null +++ b/evidence/research-20261029-final/invalid-growing1.md @@ -0,0 +1,3 @@ +# Исключённый профиль growing1 + +Сборщик shell завершился с ошибкой разбора до сохранения JSON; следующая смена конфигурации могла начаться до завершения k6. Профиль growing1-20261029111013 исключён из сравнительной матрицы, даже несмотря на Completed у Job. Raw сохранён как invalid-growing1-log.txt. Требуется отдельный повтор без одновременного изменения сценариев. diff --git a/evidence/research-20261029-final/load-fixed1-20261029110437.json b/evidence/research-20261029-final/load-fixed1-20261029110437.json new file mode 100644 index 00000000..93df38c3 --- /dev/null +++ b/evidence/research-20261029-final/load-fixed1-20261029110437.json @@ -0,0 +1,373 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "fails": 0, + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 4410 + }, + { + "fails": 0, + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 450 + }, + { + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 4386, + "fails": 0, + "name": "history readable" + } + ], + "name": "", + "path": "" + }, + "options": { + "noColor": false, + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "" + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 53455.947116 + }, + "metrics": { + "application_errors{status:503}": { + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default" + }, + "iteration_duration": { + "values": { + "p(99)": 994.0872749499946, + "max": 2097.024005, + "avg": 222.51865749338796, + "p(50)": 181.8969165, + "p(95)": 448.8924635 + }, + "type": "trend", + "contains": "time" + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "min": 0, + "max": 32, + "value": 32 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 9296, + "rate": 173.9002019705605 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 0, + "max": 5.401903, + "avg": 0.010837729238382096, + "p(50)": 0, + "p(95)": 0 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.18664502474182468, + "p(50)": 0.168196, + "p(95)": 0.35287175, + "p(99)": 0.6798374499999994, + "max": 2.701782 + } + }, + "checks": { + "values": { + "rate": 1, + "passes": 9246, + "fails": 0 + }, + "type": "rate", + "contains": "default" + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 4242, + "rate": 79.35506204379492 + } + }, + "application_errors{status:0}": { + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 851313, + "rate": 15925.505877814518 + } + }, + "vus_max": { + "values": { + "max": 32, + "value": 32, + "min": 32 + }, + "type": "gauge", + "contains": "default" + }, + "http_req_failed": { + "values": { + "rate": 0.0002151462994836489, + "passes": 2, + "fails": 9294 + }, + "type": "rate", + "contains": "default" + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 12713523, + "rate": 237831.77898637758 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 85.33531500000001, + "p(95)": 200.28237675, + "p(99)": 518.9361790499993, + "max": 7289.852967, + "avg": 105.50648479292175 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 4242, + "rate": 79.35506204379492 + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 114.11333843800108, + "p(50)": 91.8974085, + "p(95)": 221.84451689999997, + "p(99)": 570.8439318800006, + "max": 2008.877224 + } + }, + "measured_operations": { + "values": { + "count": 8916, + "rate": 166.79154483320968 + }, + "type": "counter", + "contains": "default" + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 4386, + "rate": 82.04886895900154 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 55.030213, + "avg": 0.12879976473752153 + } + }, + "http_req_duration{expected_response:true}": { + "contains": "time", + "values": { + "p(95)": 200.60701310000002, + "p(99)": 519.1186737799997, + "max": 7290.221682, + "avg": 105.96144836711845, + "p(50)": 85.7954265 + }, + "type": "trend" + }, + "http_req_receiving": { + "contains": "time", + "values": { + "max": 10.663606, + "avg": 0.24584906777108384, + "p(50)": 0.17332350000000002, + "p(95)": 0.6394920000000001, + "p(99)": 1.2738066999999884 + }, + "type": "trend" + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 0.0015902999999999957, + "max": 513.246557, + "avg": 0.19672042340792084, + "p(50)": 0.0012205, + "p(95)": 0.001436 + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 200.6005985, + "p(99)": 519.0985366999993, + "max": 7290.221682, + "avg": 105.9389788854345, + "p(50)": 85.7931045 + } + } + }, + "setup_data": [ + { + "token": "H8U4mmxMOeylShMDdiLrr72zztAMv0tQOcSpwi9hrPU", + "chat": "58fad9fc-0cd2-4def-bf4f-d3620a5e3e5e" + }, + { + "chat": "2940388e-bd6b-4778-9262-7343cab570d2", + "token": "PB3oFGkJqjqxyIWK7HX6iWolj855xuVelLm6qLjq33U" + }, + { + "chat": "2661bde6-5999-40df-baf3-a2f8780512eb", + "token": "YN7yfBsma4LZYQhGBeBTwhx1RmtBktHsBagLE0OjG7Q" + }, + { + "token": "SgVP99a72A3Er3UbeSDQnb3NBg3mqDFhykUeDiS1OP8", + "chat": "d0353044-8ed1-4542-beaa-9ae09d88d368" + }, + { + "chat": "e59639ee-af0e-4c9b-b7f5-b110585de2f1", + "token": "VUV735UMNw83g39npVOjk0inHkWdK_v6ly445iic3WM" + }, + { + "chat": "8082db8a-a626-4982-9206-16a6f23f940d", + "token": "Ys3PGxAYi60O6jiITGZzs79EqDI_j-nz_Ai3cmMmvNY" + }, + { + "chat": "c3d7bc6d-a3b7-4e52-8291-e06b4dcb98b6", + "token": "njG8Z5TqNpxvfONk95PqWmhVNL8K9QlCDqcJ9cKpnA4" + }, + { + "chat": "ee800f84-62e2-4ef5-b9c3-fe84204d6a0b", + "token": "M7EwIgJ2t25tj7w82K5P1fMI9vkhVCYculeIjcIRiFE" + }, + { + "chat": "f9d45edf-7c49-410e-8d6c-f49f84e00141", + "token": "dIHwBjYIzUBQ4vN2WGzQYIPS-FDnt4YTP7jSsGMvz04" + }, + { + "chat": "6c65c749-c699-4b05-bb7c-37d4f54ec17c", + "token": "QlS_zXWOF8JpA_eTFTViFzFSWR6p7JyDoaBvdSAK56A" + }, + { + "chat": "8c4c1c95-701e-4a41-865e-a24b61176191", + "token": "7KgeMNgLrJr84EpFXMWiCgwEAnexwVnpbu7pCvlrBFk" + }, + { + "chat": "0d782d99-5416-479b-b3c3-4853efd0cee5", + "token": "3DVrz1eH8UJwga_LlmdGWqchaFLtGmo7834qeb66HYw" + }, + { + "token": "VYz7O7dq8bvIb3xvnXyIUKM72wF1pWaOEINVUHly92A", + "chat": "7785e1b5-daba-4949-8e7f-664dc45dcf70" + }, + { + "chat": "842f3193-2521-4417-bca9-9dbb48da7c26", + "token": "1hHpv9HJy7QoecF3gYnjpvDIHaQamo2oC_Vhfx99ogI" + }, + { + "chat": "277e221c-7e6f-48ef-854f-0998fdfde031", + "token": "QbgZb2Kkg3TevlCJgrHGajkOCdDJ0cdwWHDb27fj5Sw" + }, + { + "chat": "96511043-5ba3-4cd8-a17a-7feae0fa48f5", + "token": "VPwy8KTykHPZUKZ7H4WvpXwDs5cqm_7BG0xT66HSplg" + } + ] + } +} diff --git a/evidence/research-20261029-final/load-fixed1-20261029110437.txt b/evidence/research-20261029-final/load-fixed1-20261029110437.txt new file mode 100644 index 00000000..92c58b8e --- /dev/null +++ b/evidence/research-20261029-final/load-fixed1-20261029110437.txt @@ -0,0 +1,3 @@ +time="2026-10-29T11:05:47Z" level=warning msg="setup registration: 503; abandoning synthetic actor" source=console +time="2026-10-29T11:05:48Z" level=warning msg="setup registration: 503; abandoning synthetic actor" source=console +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":4410},{"fails":0,"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":450},{"path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":4386,"fails":0,"name":"history readable"}],"name":"","path":""},"options":{"noColor":false,"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":53455.947116},"metrics":{"application_errors{status:503}":{"values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default"},"iteration_duration":{"values":{"p(99)":994.0872749499946,"max":2097.024005,"avg":222.51865749338796,"p(50)":181.8969165,"p(95)":448.8924635},"type":"trend","contains":"time"},"vus":{"type":"gauge","contains":"default","values":{"min":0,"max":32,"value":32}},"http_reqs":{"type":"counter","contains":"default","values":{"count":9296,"rate":173.9002019705605}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":5.401903,"avg":0.010837729238382096,"p(50)":0,"p(95)":0}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.18664502474182468,"p(50)":0.168196,"p(95)":0.35287175,"p(99)":0.6798374499999994,"max":2.701782}},"checks":{"values":{"rate":1,"passes":9246,"fails":0},"type":"rate","contains":"default"},"attempted_messages":{"type":"counter","contains":"default","values":{"count":4242,"rate":79.35506204379492}},"application_errors{status:0}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"count":0,"rate":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":851313,"rate":15925.505877814518}},"vus_max":{"values":{"max":32,"value":32,"min":32},"type":"gauge","contains":"default"},"http_req_failed":{"values":{"rate":0.0002151462994836489,"passes":2,"fails":9294},"type":"rate","contains":"default"},"data_received":{"type":"counter","contains":"data","values":{"count":12713523,"rate":237831.77898637758}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(50)":85.33531500000001,"p(95)":200.28237675,"p(99)":518.9361790499993,"max":7289.852967,"avg":105.50648479292175}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":4242,"rate":79.35506204379492}},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":114.11333843800108,"p(50)":91.8974085,"p(95)":221.84451689999997,"p(99)":570.8439318800006,"max":2008.877224}},"measured_operations":{"values":{"count":8916,"rate":166.79154483320968},"type":"counter","contains":"default"},"iterations":{"type":"counter","contains":"default","values":{"count":4386,"rate":82.04886895900154}},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":55.030213,"avg":0.12879976473752153}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(95)":200.60701310000002,"p(99)":519.1186737799997,"max":7290.221682,"avg":105.96144836711845,"p(50)":85.7954265},"type":"trend"},"http_req_receiving":{"contains":"time","values":{"max":10.663606,"avg":0.24584906777108384,"p(50)":0.17332350000000002,"p(95)":0.6394920000000001,"p(99)":1.2738066999999884},"type":"trend"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.0015902999999999957,"max":513.246557,"avg":0.19672042340792084,"p(50)":0.0012205,"p(95)":0.001436}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":200.6005985,"p(99)":519.0985366999993,"max":7290.221682,"avg":105.9389788854345,"p(50)":85.7931045}}},"setup_data":[{"token":"H8U4mmxMOeylShMDdiLrr72zztAMv0tQOcSpwi9hrPU","chat":"58fad9fc-0cd2-4def-bf4f-d3620a5e3e5e"},{"chat":"2940388e-bd6b-4778-9262-7343cab570d2","token":"PB3oFGkJqjqxyIWK7HX6iWolj855xuVelLm6qLjq33U"},{"chat":"2661bde6-5999-40df-baf3-a2f8780512eb","token":"YN7yfBsma4LZYQhGBeBTwhx1RmtBktHsBagLE0OjG7Q"},{"token":"SgVP99a72A3Er3UbeSDQnb3NBg3mqDFhykUeDiS1OP8","chat":"d0353044-8ed1-4542-beaa-9ae09d88d368"},{"chat":"e59639ee-af0e-4c9b-b7f5-b110585de2f1","token":"VUV735UMNw83g39npVOjk0inHkWdK_v6ly445iic3WM"},{"chat":"8082db8a-a626-4982-9206-16a6f23f940d","token":"Ys3PGxAYi60O6jiITGZzs79EqDI_j-nz_Ai3cmMmvNY"},{"chat":"c3d7bc6d-a3b7-4e52-8291-e06b4dcb98b6","token":"njG8Z5TqNpxvfONk95PqWmhVNL8K9QlCDqcJ9cKpnA4"},{"chat":"ee800f84-62e2-4ef5-b9c3-fe84204d6a0b","token":"M7EwIgJ2t25tj7w82K5P1fMI9vkhVCYculeIjcIRiFE"},{"chat":"f9d45edf-7c49-410e-8d6c-f49f84e00141","token":"dIHwBjYIzUBQ4vN2WGzQYIPS-FDnt4YTP7jSsGMvz04"},{"chat":"6c65c749-c699-4b05-bb7c-37d4f54ec17c","token":"QlS_zXWOF8JpA_eTFTViFzFSWR6p7JyDoaBvdSAK56A"},{"chat":"8c4c1c95-701e-4a41-865e-a24b61176191","token":"7KgeMNgLrJr84EpFXMWiCgwEAnexwVnpbu7pCvlrBFk"},{"chat":"0d782d99-5416-479b-b3c3-4853efd0cee5","token":"3DVrz1eH8UJwga_LlmdGWqchaFLtGmo7834qeb66HYw"},{"token":"VYz7O7dq8bvIb3xvnXyIUKM72wF1pWaOEINVUHly92A","chat":"7785e1b5-daba-4949-8e7f-664dc45dcf70"},{"chat":"842f3193-2521-4417-bca9-9dbb48da7c26","token":"1hHpv9HJy7QoecF3gYnjpvDIHaQamo2oC_Vhfx99ogI"},{"chat":"277e221c-7e6f-48ef-854f-0998fdfde031","token":"QbgZb2Kkg3TevlCJgrHGajkOCdDJ0cdwWHDb27fj5Sw"},{"chat":"96511043-5ba3-4cd8-a17a-7feae0fa48f5","token":"VPwy8KTykHPZUKZ7H4WvpXwDs5cqm_7BG0xT66HSplg"}]}} diff --git a/evidence/research-20261029-final/load-fixed2-20261029110639.json b/evidence/research-20261029-final/load-fixed2-20261029110639.json new file mode 100644 index 00000000..544157c2 --- /dev/null +++ b/evidence/research-20261029-final/load-fixed2-20261029110639.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "state": { + "isStdErrTTY": false, + "testRunDurationMs": 45089.877687, + "isStdOutTTY": false + }, + "metrics": { + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.004363107502120955, + "passes": 36, + "fails": 8215 + } + }, + "data_sent": { + "values": { + "count": 756454, + "rate": 16776.581326103165 + }, + "type": "counter", + "contains": "data" + }, + "message_latency_ms": { + "values": { + "p(99)": 350.0392311900002, + "max": 7476.430483, + "avg": 118.41393109545463, + "p(50)": 95.44093000000001, + "p(95)": 172.7375654 + }, + "type": "trend", + "contains": "time" + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "rate": 82.94544567102011, + "count": 3740 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.2448521322263965, + "p(50)": 0.124512, + "p(95)": 0.7444295000000001, + "p(99)": 2.853361, + "max": 11.145533 + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 118.13134720821714, + "p(50)": 79.858031, + "p(95)": 162.8672555, + "p(99)": 304.042258, + "max": 8878.405299 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 3725, + "rate": 82.61277677127002 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0, + "p(99)": 0, + "max": 47.58753, + "avg": 0.11403234735183615, + "p(50)": 0 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.9956113616969401, + "passes": 8167, + "fails": 36 + } + }, + "http_req_receiving": { + "values": { + "p(99)": 3.6444775, + "max": 12.034562, + "avg": 0.4018474326748282, + "p(50)": 0.162811, + "p(95)": 1.5399995 + }, + "type": "trend", + "contains": "time" + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 79.686114, + "p(95)": 160.01444709999998, + "p(99)": 250.48234031999905, + "max": 7045.594857, + "avg": 96.09753803262318 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 3891, + "rate": 86.29431259517092 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 7863, + "rate": 174.38503724899226 + } + }, + "http_req_waiting": { + "contains": "time", + "values": { + "max": 8878.23761, + "avg": 117.48464764331604, + "p(50)": 79.133728, + "p(95)": 162.3500035, + "p(99)": 303.5276025 + }, + "type": "trend" + }, + "application_errors{status:503}": { + "contains": "default", + "values": { + "count": 24, + "rate": 0.532270239600129 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter" + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0.000776, + "p(95)": 0.001311, + "p(99)": 0.004868, + "max": 1031.861751, + "avg": 0.44426853799539207 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "max": 32, + "value": 32, + "min": 32 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 11238060, + "rate": 249236.8703683594 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 8251, + "rate": 182.99007278919436 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 1006.938944, + "avg": 0.2605599047388195 + } + }, + "iteration_duration": { + "values": { + "max": 9008.140023, + "avg": 250.82069100796707, + "p(50)": 170.736861, + "p(95)": 335.9246815, + "p(99)": 1694.5916108999495 + }, + "type": "trend", + "contains": "time" + }, + "application_errors{status:429}": { + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default" + }, + "failed_writes": { + "contains": "default", + "values": { + "count": 15, + "rate": 0.3326688997500806 + }, + "type": "counter" + }, + "application_errors": { + "values": { + "count": 36, + "rate": 0.7984053594001935 + }, + "type": "counter", + "contains": "default" + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "max": 32, + "value": 32, + "min": 0 + } + } + }, + "setup_data": [ + { + "chat": "c66108b5-5753-4a29-a047-0feb050dd9ab", + "token": "FcDsP4lRE-mLd2BAJIdKtiGWpUSAlWQrukJpiV9eYnI" + }, + { + "chat": "318f1b8e-9509-4d3d-bbce-d2977cedaf46", + "token": "mHs7XPex06v8AK3pLYXUvcEWz9A7fRJux7OPcOLOLVg" + }, + { + "chat": "36259faa-accc-4233-90fb-d2e42fdb31bd", + "token": "Lfp_B9VGErvjdKXQ6YEBAHENc8FHZlBqwSI30KOwG1Q" + }, + { + "chat": "a02a3b81-8c98-43aa-8a70-b8634f59b543", + "token": "Nk3H9TkrJFlTg9S1dsmZZBJRQNoCd23Y_jIEn4s4gjc" + }, + { + "chat": "29d68106-aec5-4e86-89c9-2e896facbf84", + "token": "BPKUhicgsLvk2WhFuKvOt5wkxeujm0lT8WTD3M5TdmA" + }, + { + "chat": "e645c69f-06f9-46d6-a713-f6f09e00e9ac", + "token": "NTguC82hZev-jYJ6b2lTLHBsjF2Nk9MNiMdwxFwzBJY" + }, + { + "chat": "bc413188-fd7b-4ffd-b02e-69d4bf7cd396", + "token": "lVyq3lsOrULGkfQV5UcHBP2nB6p5CXb1miyfwauVF1A" + }, + { + "chat": "1da88109-0510-4b23-9a16-6e125f11c1cb", + "token": "6OGJ5uAENszz8IpoZWem4gDzSRLyWISYuBEJ2YJC4aU" + }, + { + "chat": "e269124a-72dd-4321-81e6-cacb559f1daa", + "token": "nwaTJBaJMtYr7FMF97dzsKFlcFrnoQofK722Tyw3w1U" + }, + { + "chat": "b85d0ba2-cb3f-44e6-a50c-494bfb3f41de", + "token": "GPCxZmS6y_FRwGlj4HUDthKCYskPae8xgmf-fWvR794" + }, + { + "chat": "f6f1299c-8194-4769-9776-c9098007f855", + "token": "8yTBe7GKLrqL97U5Yruoy2quiXV_ae-xci4cmAqMal0" + }, + { + "chat": "ad6ed954-0246-4ac0-8614-0231a0785ca5", + "token": "PUnNe5Cavyb8UlfuOZ1Y0W_ar70yzUsJIiVRTX9ly28" + }, + { + "chat": "ab55adb9-1a5f-4774-9989-26b84b0c00e9", + "token": "zPMXRF_E3Trp3RgZXApa5cPH5ZbR8HPMDuS_dFL8whI" + }, + { + "chat": "230c0fc7-0dc6-4800-b89c-a0e83b3049d2", + "token": "hjqzpxMeP4zj5_2VtqC3Waq9K9F0gwkMKp9WxV_GH3I" + }, + { + "token": "eaFjeetUIDepBH04yI00i4an3wq9TyEedV-FYoB7hqY", + "chat": "6483a57e-5e03-45f0-ae1f-314a456c7f16" + }, + { + "chat": "77280141-7873-43ed-a2f2-c952824ee44e", + "token": "BJDsxzPF2KYe3jBlboUlUoTb0nm-9kULeSX84jU4GxA" + } + ], + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 3896, + "fails": 15, + "name": "message confirmed" + }, + { + "passes": 399, + "fails": 2, + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa" + }, + { + "passes": 3872, + "fails": 19, + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8" + } + ] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + } + } +} diff --git a/evidence/research-20261029-final/load-fixed2-20261029110639.txt b/evidence/research-20261029-final/load-fixed2-20261029110639.txt new file mode 100644 index 00000000..e407c75d --- /dev/null +++ b/evidence/research-20261029-final/load-fixed2-20261029110639.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"state":{"isStdErrTTY":false,"testRunDurationMs":45089.877687,"isStdOutTTY":false},"metrics":{"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.004363107502120955,"passes":36,"fails":8215}},"data_sent":{"values":{"count":756454,"rate":16776.581326103165},"type":"counter","contains":"data"},"message_latency_ms":{"values":{"p(99)":350.0392311900002,"max":7476.430483,"avg":118.41393109545463,"p(50)":95.44093000000001,"p(95)":172.7375654},"type":"trend","contains":"time"},"attempted_messages":{"type":"counter","contains":"default","values":{"rate":82.94544567102011,"count":3740}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.2448521322263965,"p(50)":0.124512,"p(95)":0.7444295000000001,"p(99)":2.853361,"max":11.145533}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":118.13134720821714,"p(50)":79.858031,"p(95)":162.8672555,"p(99)":304.042258,"max":8878.405299}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":3725,"rate":82.61277677127002}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":47.58753,"avg":0.11403234735183615,"p(50)":0}},"checks":{"type":"rate","contains":"default","values":{"rate":0.9956113616969401,"passes":8167,"fails":36}},"http_req_receiving":{"values":{"p(99)":3.6444775,"max":12.034562,"avg":0.4018474326748282,"p(50)":0.162811,"p(95)":1.5399995},"type":"trend","contains":"time"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":79.686114,"p(95)":160.01444709999998,"p(99)":250.48234031999905,"max":7045.594857,"avg":96.09753803262318}},"iterations":{"type":"counter","contains":"default","values":{"count":3891,"rate":86.29431259517092}},"measured_operations":{"type":"counter","contains":"default","values":{"count":7863,"rate":174.38503724899226}},"http_req_waiting":{"contains":"time","values":{"max":8878.23761,"avg":117.48464764331604,"p(50)":79.133728,"p(95)":162.3500035,"p(99)":303.5276025},"type":"trend"},"application_errors{status:503}":{"contains":"default","values":{"count":24,"rate":0.532270239600129},"thresholds":{"count>=0":{"ok":true}},"type":"counter"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.000776,"p(95)":0.001311,"p(99)":0.004868,"max":1031.861751,"avg":0.44426853799539207}},"vus_max":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"data_received":{"type":"counter","contains":"data","values":{"count":11238060,"rate":249236.8703683594}},"http_reqs":{"type":"counter","contains":"default","values":{"count":8251,"rate":182.99007278919436}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":1006.938944,"avg":0.2605599047388195}},"iteration_duration":{"values":{"max":9008.140023,"avg":250.82069100796707,"p(50)":170.736861,"p(95)":335.9246815,"p(99)":1694.5916108999495},"type":"trend","contains":"time"},"application_errors{status:429}":{"values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default"},"failed_writes":{"contains":"default","values":{"count":15,"rate":0.3326688997500806},"type":"counter"},"application_errors":{"values":{"count":36,"rate":0.7984053594001935},"type":"counter","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":0}}},"setup_data":[{"chat":"c66108b5-5753-4a29-a047-0feb050dd9ab","token":"FcDsP4lRE-mLd2BAJIdKtiGWpUSAlWQrukJpiV9eYnI"},{"chat":"318f1b8e-9509-4d3d-bbce-d2977cedaf46","token":"mHs7XPex06v8AK3pLYXUvcEWz9A7fRJux7OPcOLOLVg"},{"chat":"36259faa-accc-4233-90fb-d2e42fdb31bd","token":"Lfp_B9VGErvjdKXQ6YEBAHENc8FHZlBqwSI30KOwG1Q"},{"chat":"a02a3b81-8c98-43aa-8a70-b8634f59b543","token":"Nk3H9TkrJFlTg9S1dsmZZBJRQNoCd23Y_jIEn4s4gjc"},{"chat":"29d68106-aec5-4e86-89c9-2e896facbf84","token":"BPKUhicgsLvk2WhFuKvOt5wkxeujm0lT8WTD3M5TdmA"},{"chat":"e645c69f-06f9-46d6-a713-f6f09e00e9ac","token":"NTguC82hZev-jYJ6b2lTLHBsjF2Nk9MNiMdwxFwzBJY"},{"chat":"bc413188-fd7b-4ffd-b02e-69d4bf7cd396","token":"lVyq3lsOrULGkfQV5UcHBP2nB6p5CXb1miyfwauVF1A"},{"chat":"1da88109-0510-4b23-9a16-6e125f11c1cb","token":"6OGJ5uAENszz8IpoZWem4gDzSRLyWISYuBEJ2YJC4aU"},{"chat":"e269124a-72dd-4321-81e6-cacb559f1daa","token":"nwaTJBaJMtYr7FMF97dzsKFlcFrnoQofK722Tyw3w1U"},{"chat":"b85d0ba2-cb3f-44e6-a50c-494bfb3f41de","token":"GPCxZmS6y_FRwGlj4HUDthKCYskPae8xgmf-fWvR794"},{"chat":"f6f1299c-8194-4769-9776-c9098007f855","token":"8yTBe7GKLrqL97U5Yruoy2quiXV_ae-xci4cmAqMal0"},{"chat":"ad6ed954-0246-4ac0-8614-0231a0785ca5","token":"PUnNe5Cavyb8UlfuOZ1Y0W_ar70yzUsJIiVRTX9ly28"},{"chat":"ab55adb9-1a5f-4774-9989-26b84b0c00e9","token":"zPMXRF_E3Trp3RgZXApa5cPH5ZbR8HPMDuS_dFL8whI"},{"chat":"230c0fc7-0dc6-4800-b89c-a0e83b3049d2","token":"hjqzpxMeP4zj5_2VtqC3Waq9K9F0gwkMKp9WxV_GH3I"},{"token":"eaFjeetUIDepBH04yI00i4an3wq9TyEedV-FYoB7hqY","chat":"6483a57e-5e03-45f0-ae1f-314a456c7f16"},{"chat":"77280141-7873-43ed-a2f2-c952824ee44e","token":"BJDsxzPF2KYe3jBlboUlUoTb0nm-9kULeSX84jU4GxA"}],"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":3896,"fails":15,"name":"message confirmed"},{"passes":399,"fails":2,"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa"},{"passes":3872,"fails":19,"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8"}]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false}}} diff --git a/evidence/research-20261029-final/load-fixed4-20261029110815.json b/evidence/research-20261029-final/load-fixed4-20261029110815.json new file mode 100644 index 00000000..33939d04 --- /dev/null +++ b/evidence/research-20261029-final/load-fixed4-20261029110815.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "metrics": { + "attempted_messages": { + "values": { + "count": 2790, + "rate": 51.763747376829826 + }, + "type": "counter", + "contains": "default" + }, + "data_sent": { + "values": { + "count": 567733, + "rate": 10533.328885121766 + }, + "type": "counter", + "contains": "data" + }, + "iterations": { + "contains": "default", + "values": { + "count": 2875, + "rate": 53.3407791069483 + }, + "type": "counter" + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.37676321653027833, + "p(50)": 0.000881, + "p(95)": 0.0014035500000000002, + "p(99)": 0.01542993999999998, + "max": 1074.405946 + } + }, + "http_req_connecting": { + "contains": "time", + "values": { + "max": 16.206067, + "avg": 0.02185257872340426, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0 + }, + "type": "trend" + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 677.489221160001, + "max": 1574.730015, + "avg": 157.03332343508137, + "p(50)": 112.71044, + "p(95)": 441.5516142 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0.1301345, + "p(95)": 0.4516536500000001, + "p(99)": 1.8935093399999887, + "max": 26.838941, + "avg": 0.2181190584288052 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 333.28199130747777, + "p(50)": 264.544507, + "p(95)": 821.051293599999, + "p(99)": 1135.339405979999, + "max": 3755.833063 + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 198.3693728301075, + "p(50)": 138.39813800000002, + "p(95)": 579.4783116, + "p(99)": 748.0037995700006, + "max": 2216.161919 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 5868, + "rate": 108.87084932159047 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "rate": 113.36075142381011, + "count": 6110 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 112.06156849999999, + "p(95)": 447.6265996500002, + "p(99)": 691.4704105999998, + "max": 2215.852134, + "avg": 159.3341722936168 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.9983503794127351, + "passes": 6052, + "fails": 10 + } + }, + "vus_max": { + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + }, + "type": "gauge" + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 692.0658116299999, + "max": 2216.161919, + "avg": 159.9462934507359, + "p(50)": 112.81320550000001, + "p(95)": 449.4352676500003 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "rate": 0, + "count": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.0016366612111292963, + "passes": 10, + "fails": 6100 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 8339967, + "rate": 154734.03043695245 + } + }, + "failed_writes": { + "type": "counter", + "contains": "default", + "values": { + "rate": 0.12987320130387411, + "count": 7 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 10, + "rate": 0.18553314471982016 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.18011543404255315, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 57.900152 + } + }, + "confirmed_messages": { + "values": { + "count": 2783, + "rate": 51.63387417552595 + }, + "type": "counter", + "contains": "default" + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 2.801295119999995, + "max": 182.062348, + "avg": 0.39400209869067115, + "p(50)": 0.16825299999999999, + "p(95)": 1.12102205 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "rate": 0, + "count": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "rate": 0.16697983024783813, + "count": 9 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + } + }, + "setup_data": [ + { + "token": "qg15snR55dLe08IM6yLlsvRnZ_bveLUL8SBZHyy-5LM", + "chat": "1cbe40f2-3e3b-459c-b8ec-bf4043fe5ebd" + }, + { + "chat": "b73d0191-1347-4d15-842c-2a1099817fe7", + "token": "c6yuW-GBbG7ShfVY6LQwdDf92-BEuFGQ2YQKg-PFXjE" + }, + { + "chat": "ed7b8f53-4240-4624-85e8-aec3cf86808e", + "token": "mXWVPeHhbRlM_8xfWtav5rNj9noEP76rSfwRXIcMgJo" + }, + { + "chat": "00ddd329-bf41-4e08-b2ec-a36bdb5a2626", + "token": "rWciKWmJ3pkitGL3JLUm4IgmsPNnkLCW46Tua0Zr8iI" + }, + { + "chat": "34346afe-1d2d-4896-aca2-adc1c3da1ffa", + "token": "zJT9aTtQwBs0KG-Cf6uVvit5Mq8s9YpPn-FSEkLJxQ8" + }, + { + "chat": "082f5414-924a-458f-bf9a-50e664de36bb", + "token": "xbU5qTMqMdQlMUpxqJebtqf1q08HHVxH3o-iAo6guYA" + }, + { + "chat": "8458b0f8-3d65-4d8f-8a8e-0c4dd71657e3", + "token": "xj-2Bjrvi6QIt1agqcVgDUPqAWUT_eQt78Go28lgKqw" + }, + { + "chat": "8f094ab1-b144-4f7f-aa0d-2fae7d5a429e", + "token": "_ygQviOREt1DFyFMR_7QakcGuuDdjImMtfvnG0OWrQI" + }, + { + "chat": "e9754d40-c8bc-43d8-9b0d-90a680c95d94", + "token": "11x3YBEAgl4pVBb_EBmNOfoPDUcy7P06onxltDIdQ1s" + }, + { + "chat": "741e3291-a847-462a-88eb-bd338cd36be1", + "token": "upO-FdZoHTiMczLRGpZFBd7X2gd8i8ZT4THkqXMg7Yw" + }, + { + "chat": "d83a9171-d3d2-4cdb-903c-30b8873741b0", + "token": "WCxrgkqaW6xmcLvrgvqvJePKT3koKINNV_OEPH0hOlY" + }, + { + "chat": "7548aae3-6ab0-4241-8c2e-9e27719ce2d6", + "token": "sSYiF3-FgYvznpa62bpJi9YF-hL5106E8CpGQyIkW30" + }, + { + "chat": "275276ee-2b06-4dc0-8598-5b1a6bf0fdd9", + "token": "B0grJ61_RoM3fQypZAThVSEDZjX-nripdrEIOOkgWQ0" + }, + { + "chat": "6ecc0bab-29f3-4081-b0e7-b14767c679e9", + "token": "IIW2GCNhRONt-b8rk8XPlNfv7oYw_jbuikb907fZtgs" + }, + { + "chat": "d18d951c-064e-441f-9a46-58cf273c84f6", + "token": "vMDMMfy3GsS5qh3PBTQqZne9Pd1aVWnM0Mw3-RT7oAQ" + }, + { + "token": "nV7FhntWMWjl6Z71QvAgVxNWXUxIUl8GGi088xYJghg", + "chat": "3f0ca8f4-98f5-41cb-8816-c1d489fad463" + } + ], + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 2881, + "fails": 7, + "name": "message confirmed" + }, + { + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 299, + "fails": 0, + "name": "retry returns original", + "path": "::retry returns original" + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 2872, + "fails": 3 + } + ] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 53898.725293 + } + } +} diff --git a/evidence/research-20261029-final/load-fixed4-20261029110815.txt b/evidence/research-20261029-final/load-fixed4-20261029110815.txt new file mode 100644 index 00000000..698db292 --- /dev/null +++ b/evidence/research-20261029-final/load-fixed4-20261029110815.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"metrics":{"attempted_messages":{"values":{"count":2790,"rate":51.763747376829826},"type":"counter","contains":"default"},"data_sent":{"values":{"count":567733,"rate":10533.328885121766},"type":"counter","contains":"data"},"iterations":{"contains":"default","values":{"count":2875,"rate":53.3407791069483},"type":"counter"},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.37676321653027833,"p(50)":0.000881,"p(95)":0.0014035500000000002,"p(99)":0.01542993999999998,"max":1074.405946}},"http_req_connecting":{"contains":"time","values":{"max":16.206067,"avg":0.02185257872340426,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":677.489221160001,"max":1574.730015,"avg":157.03332343508137,"p(50)":112.71044,"p(95)":441.5516142}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.1301345,"p(95)":0.4516536500000001,"p(99)":1.8935093399999887,"max":26.838941,"avg":0.2181190584288052}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":333.28199130747777,"p(50)":264.544507,"p(95)":821.051293599999,"p(99)":1135.339405979999,"max":3755.833063}},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":198.3693728301075,"p(50)":138.39813800000002,"p(95)":579.4783116,"p(99)":748.0037995700006,"max":2216.161919}},"measured_operations":{"type":"counter","contains":"default","values":{"count":5868,"rate":108.87084932159047}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":113.36075142381011,"count":6110}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(50)":112.06156849999999,"p(95)":447.6265996500002,"p(99)":691.4704105999998,"max":2215.852134,"avg":159.3341722936168}},"checks":{"type":"rate","contains":"default","values":{"rate":0.9983503794127351,"passes":6052,"fails":10}},"vus_max":{"contains":"default","values":{"value":32,"min":32,"max":32},"type":"gauge"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":692.0658116299999,"max":2216.161919,"avg":159.9462934507359,"p(50)":112.81320550000001,"p(95)":449.4352676500003}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"rate":0,"count":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.0016366612111292963,"passes":10,"fails":6100}},"data_received":{"type":"counter","contains":"data","values":{"count":8339967,"rate":154734.03043695245}},"failed_writes":{"type":"counter","contains":"default","values":{"rate":0.12987320130387411,"count":7}},"application_errors":{"type":"counter","contains":"default","values":{"count":10,"rate":0.18553314471982016}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0.18011543404255315,"p(50)":0,"p(95)":0,"p(99)":0,"max":57.900152}},"confirmed_messages":{"values":{"count":2783,"rate":51.63387417552595},"type":"counter","contains":"default"},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":2.801295119999995,"max":182.062348,"avg":0.39400209869067115,"p(50)":0.16825299999999999,"p(95)":1.12102205}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"rate":0,"count":0},"thresholds":{"count>=0":{"ok":true}}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"rate":0.16697983024783813,"count":9},"thresholds":{"count>=0":{"ok":true}}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}}},"setup_data":[{"token":"qg15snR55dLe08IM6yLlsvRnZ_bveLUL8SBZHyy-5LM","chat":"1cbe40f2-3e3b-459c-b8ec-bf4043fe5ebd"},{"chat":"b73d0191-1347-4d15-842c-2a1099817fe7","token":"c6yuW-GBbG7ShfVY6LQwdDf92-BEuFGQ2YQKg-PFXjE"},{"chat":"ed7b8f53-4240-4624-85e8-aec3cf86808e","token":"mXWVPeHhbRlM_8xfWtav5rNj9noEP76rSfwRXIcMgJo"},{"chat":"00ddd329-bf41-4e08-b2ec-a36bdb5a2626","token":"rWciKWmJ3pkitGL3JLUm4IgmsPNnkLCW46Tua0Zr8iI"},{"chat":"34346afe-1d2d-4896-aca2-adc1c3da1ffa","token":"zJT9aTtQwBs0KG-Cf6uVvit5Mq8s9YpPn-FSEkLJxQ8"},{"chat":"082f5414-924a-458f-bf9a-50e664de36bb","token":"xbU5qTMqMdQlMUpxqJebtqf1q08HHVxH3o-iAo6guYA"},{"chat":"8458b0f8-3d65-4d8f-8a8e-0c4dd71657e3","token":"xj-2Bjrvi6QIt1agqcVgDUPqAWUT_eQt78Go28lgKqw"},{"chat":"8f094ab1-b144-4f7f-aa0d-2fae7d5a429e","token":"_ygQviOREt1DFyFMR_7QakcGuuDdjImMtfvnG0OWrQI"},{"chat":"e9754d40-c8bc-43d8-9b0d-90a680c95d94","token":"11x3YBEAgl4pVBb_EBmNOfoPDUcy7P06onxltDIdQ1s"},{"chat":"741e3291-a847-462a-88eb-bd338cd36be1","token":"upO-FdZoHTiMczLRGpZFBd7X2gd8i8ZT4THkqXMg7Yw"},{"chat":"d83a9171-d3d2-4cdb-903c-30b8873741b0","token":"WCxrgkqaW6xmcLvrgvqvJePKT3koKINNV_OEPH0hOlY"},{"chat":"7548aae3-6ab0-4241-8c2e-9e27719ce2d6","token":"sSYiF3-FgYvznpa62bpJi9YF-hL5106E8CpGQyIkW30"},{"chat":"275276ee-2b06-4dc0-8598-5b1a6bf0fdd9","token":"B0grJ61_RoM3fQypZAThVSEDZjX-nripdrEIOOkgWQ0"},{"chat":"6ecc0bab-29f3-4081-b0e7-b14767c679e9","token":"IIW2GCNhRONt-b8rk8XPlNfv7oYw_jbuikb907fZtgs"},{"chat":"d18d951c-064e-441f-9a46-58cf273c84f6","token":"vMDMMfy3GsS5qh3PBTQqZne9Pd1aVWnM0Mw3-RT7oAQ"},{"token":"nV7FhntWMWjl6Z71QvAgVxNWXUxIUl8GGi088xYJghg","chat":"3f0ca8f4-98f5-41cb-8816-c1d489fad463"}],"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":2881,"fails":7,"name":"message confirmed"},{"id":"f737ff9008ff036f7a4b775b05a953fa","passes":299,"fails":0,"name":"retry returns original","path":"::retry returns original"},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":2872,"fails":3}]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":53898.725293}}} diff --git a/evidence/research-20261029-final/load-growing2-20261029111200.json b/evidence/research-20261029-final/load-growing2-20261029111200.json new file mode 100644 index 00000000..27ce7e4f --- /dev/null +++ b/evidence/research-20261029-final/load-growing2-20261029111200.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "metrics": { + "confirmed_messages": { + "values": { + "count": 1198, + "rate": 23.529679326482384 + }, + "type": "counter", + "contains": "default" + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 108.69036763592449, + "p(50)": 46.2625695, + "p(95)": 347.8488570999995, + "p(99)": 559.5331142800044, + "max": 5685.060447 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 32.998023, + "avg": 0.031332127966013895 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 528.727421, + "max": 6909.018767, + "avg": 101.19088046036686, + "p(50)": 44.942618, + "p(95)": 299.96549000000005 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.2959491825471207, + "passes": 2842, + "fails": 6761 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 4554, + "rate": 89.44420672187043 + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 300.3332265, + "p(99)": 532.1885824999999, + "max": 6909.282275, + "avg": 101.79095922432899, + "p(50)": 45.646539 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "max": 8850.488329, + "avg": 206.99840641309893, + "p(50)": 101.834915, + "p(95)": 513.8149045999997, + "p(99)": 2185.7408070499964 + } + }, + "measured_operations": { + "values": { + "count": 9238, + "rate": 181.44171754427734 + }, + "type": "counter", + "contains": "default" + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 9651, + "rate": 189.55336826367403 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0.000764, + "p(95)": 0.001335, + "p(99)": 0.0027064999999999997, + "max": 255.45403, + "avg": 0.17973057144337523 + } + }, + "http_req_sending": { + "values": { + "avg": 0.1988478163920834, + "p(50)": 0.124926, + "p(95)": 0.420881, + "p(99)": 2.006459, + "max": 16.513069 + }, + "type": "trend", + "contains": "time" + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0, + "p(99)": 0, + "max": 250.443313, + "avg": 0.13779117407522537, + "p(50)": 0 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.7005491658895451, + "passes": 6761, + "fails": 2890 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 6761, + "rate": 132.7914540286706 + } + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 6754, + "rate": 132.6539684232571 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_duration{expected_response:true}": { + "contains": "time", + "values": { + "p(99)": 491.57760301000013, + "max": 6909.282275, + "avg": 173.62529970069215, + "p(50)": 137.42771249999998, + "p(95)": 393.88058744999995 + }, + "type": "trend" + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "rate": 92.66529804870108, + "count": 4718 + } + }, + "data_sent": { + "contains": "data", + "values": { + "count": 824854, + "rate": 16200.793081107095 + }, + "type": "counter" + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 5369158, + "rate": 105454.56259867904 + } + }, + "application_errors{status:429}": { + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "failed_writes": { + "type": "counter", + "contains": "default", + "values": { + "rate": 65.91452739538805, + "count": 3356 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0.144285, + "p(95)": 1.4200315, + "p(99)": 3.5102095, + "max": 258.830876, + "avg": 0.401230947570202 + } + } + }, + "setup_data": [ + { + "chat": "60b6c42c-bb2b-47f0-8440-f78ce6b0f5a3", + "token": "KBg__tDt9tv80-UWsIb2xZOa3VRpJKQqLsSNytC1UyU" + }, + { + "chat": "d18dbfd6-372b-443f-8f86-c6cc393146a0", + "token": "8ZE10fYr29wNL87Gsa4Cja1l3wITHrJ7bu3pIJ5rO7g" + }, + { + "chat": "bd00a62a-e05e-430a-8b22-e031aa91c2f0", + "token": "WPou0EVIhqgxSvans3Snm27twDrQBEPJ2IR_qhLPhvM" + }, + { + "token": "YFvO2vu0_9z7F1ETpwJzDFuc33aBvrrBRg91PKnSGrs", + "chat": "20265296-072f-4e4e-9774-b0359e871ab4" + }, + { + "chat": "6e647ef2-9b39-4f8e-bd5f-ebf84b7378c1", + "token": "cws4KnQHlgqvpS_Y9yRiGP_u7ao5Oz-GMfx7WnWnI3w" + }, + { + "chat": "5dbc3f79-6559-40c4-9af3-4f53ace94d94", + "token": "aCWxmrYIE8lfb-8QZRdjFY_hwdfT-fnBnXEwBCiCIX8" + }, + { + "chat": "35fe28ed-e3f3-40f3-962b-95ea8294d3e4", + "token": "HO6bWtmUTTJOSacdXY6wZg8lADiOA9dMf7Mj2XS6WN0" + }, + { + "chat": "b6be36fa-a0cd-47b0-951b-3a286bd228cd", + "token": "vgeSW2_KQde5MMGMYhKhuSB8z0VvyNbzEdnxZE9F-7w" + }, + { + "token": "M_HXY61_jDGVyuO8GlbpuAQqH0GTFVb8qvQtljKTZes", + "chat": "4d80528f-8f90-4a56-9b4a-dd519e94804c" + }, + { + "chat": "1d75172e-ceef-4d2b-a88d-120f4ac81ae2", + "token": "rgBPMQiVcl1BMHlapF-ag4BfR8sUYfTLpbLwlW9ZZ_E" + }, + { + "chat": "71d0b00a-0ed6-4eea-a5bf-3b94df4be281", + "token": "JwQ9RFQxDsB2ECNUr29jel2Br90idTb3na8d0jMgpiY" + }, + { + "chat": "4c99bd9f-951a-4d5c-a1dd-ca2fc0d53151", + "token": "RzhQkd_g_o1vUGFMecJQANVji2PWTqPJy9l5o1dhkps" + }, + { + "chat": "f7c6e5d8-dc55-477e-bc6c-98ebf4d2a0b5", + "token": "Rzy-mgHjltDgSRJlxvL_S4FQQnPk5dPlkcxX3CWBvOQ" + }, + { + "chat": "428e1aed-b1e4-4757-b676-9526cadcfa02", + "token": "QMDJrzFT4uRQs3FF-Rh91bKwminIPfs4yD0WZDCfTko" + }, + { + "chat": "26d61bb6-d0ac-4394-a60b-240c5ac4ec21", + "token": "CNQ78KUZrADoK1-PkDIH2GFdX_tUHNQtqa3E1lWPd8o" + }, + { + "chat": "a2099fa1-4296-445b-9589-4841ff12a150", + "token": "2fc7jn0fu8v3kXCtOU5Ras4aq1cZD28ZCh3poX3iY48" + } + ], + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "fails": 3356, + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 1379 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 98, + "fails": 52 + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 1365, + "fails": 3353 + } + ] + }, + "options": { + "noColor": false, + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "" + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 50914.421033 + } + } +} diff --git a/evidence/research-20261029-final/load-growing2-20261029111200.txt b/evidence/research-20261029-final/load-growing2-20261029111200.txt new file mode 100644 index 00000000..007a95ef --- /dev/null +++ b/evidence/research-20261029-final/load-growing2-20261029111200.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"metrics":{"confirmed_messages":{"values":{"count":1198,"rate":23.529679326482384},"type":"counter","contains":"default"},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":108.69036763592449,"p(50)":46.2625695,"p(95)":347.8488570999995,"p(99)":559.5331142800044,"max":5685.060447}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":32.998023,"avg":0.031332127966013895}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":528.727421,"max":6909.018767,"avg":101.19088046036686,"p(50)":44.942618,"p(95)":299.96549000000005}},"checks":{"type":"rate","contains":"default","values":{"rate":0.2959491825471207,"passes":2842,"fails":6761}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":4554,"rate":89.44420672187043}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":300.3332265,"p(99)":532.1885824999999,"max":6909.282275,"avg":101.79095922432899,"p(50)":45.646539}},"iteration_duration":{"type":"trend","contains":"time","values":{"max":8850.488329,"avg":206.99840641309893,"p(50)":101.834915,"p(95)":513.8149045999997,"p(99)":2185.7408070499964}},"measured_operations":{"values":{"count":9238,"rate":181.44171754427734},"type":"counter","contains":"default"},"http_reqs":{"type":"counter","contains":"default","values":{"count":9651,"rate":189.55336826367403}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.000764,"p(95)":0.001335,"p(99)":0.0027064999999999997,"max":255.45403,"avg":0.17973057144337523}},"http_req_sending":{"values":{"avg":0.1988478163920834,"p(50)":0.124926,"p(95)":0.420881,"p(99)":2.006459,"max":16.513069},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":250.443313,"avg":0.13779117407522537,"p(50)":0}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.7005491658895451,"passes":6761,"fails":2890}},"application_errors":{"type":"counter","contains":"default","values":{"count":6761,"rate":132.7914540286706}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":6754,"rate":132.6539684232571},"thresholds":{"count>=0":{"ok":true}}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(99)":491.57760301000013,"max":6909.282275,"avg":173.62529970069215,"p(50)":137.42771249999998,"p(95)":393.88058744999995},"type":"trend"},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"iterations":{"type":"counter","contains":"default","values":{"rate":92.66529804870108,"count":4718}},"data_sent":{"contains":"data","values":{"count":824854,"rate":16200.793081107095},"type":"counter"},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"data_received":{"type":"counter","contains":"data","values":{"count":5369158,"rate":105454.56259867904}},"application_errors{status:429}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"count":0,"rate":0}},"failed_writes":{"type":"counter","contains":"default","values":{"rate":65.91452739538805,"count":3356}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.144285,"p(95)":1.4200315,"p(99)":3.5102095,"max":258.830876,"avg":0.401230947570202}}},"setup_data":[{"chat":"60b6c42c-bb2b-47f0-8440-f78ce6b0f5a3","token":"KBg__tDt9tv80-UWsIb2xZOa3VRpJKQqLsSNytC1UyU"},{"chat":"d18dbfd6-372b-443f-8f86-c6cc393146a0","token":"8ZE10fYr29wNL87Gsa4Cja1l3wITHrJ7bu3pIJ5rO7g"},{"chat":"bd00a62a-e05e-430a-8b22-e031aa91c2f0","token":"WPou0EVIhqgxSvans3Snm27twDrQBEPJ2IR_qhLPhvM"},{"token":"YFvO2vu0_9z7F1ETpwJzDFuc33aBvrrBRg91PKnSGrs","chat":"20265296-072f-4e4e-9774-b0359e871ab4"},{"chat":"6e647ef2-9b39-4f8e-bd5f-ebf84b7378c1","token":"cws4KnQHlgqvpS_Y9yRiGP_u7ao5Oz-GMfx7WnWnI3w"},{"chat":"5dbc3f79-6559-40c4-9af3-4f53ace94d94","token":"aCWxmrYIE8lfb-8QZRdjFY_hwdfT-fnBnXEwBCiCIX8"},{"chat":"35fe28ed-e3f3-40f3-962b-95ea8294d3e4","token":"HO6bWtmUTTJOSacdXY6wZg8lADiOA9dMf7Mj2XS6WN0"},{"chat":"b6be36fa-a0cd-47b0-951b-3a286bd228cd","token":"vgeSW2_KQde5MMGMYhKhuSB8z0VvyNbzEdnxZE9F-7w"},{"token":"M_HXY61_jDGVyuO8GlbpuAQqH0GTFVb8qvQtljKTZes","chat":"4d80528f-8f90-4a56-9b4a-dd519e94804c"},{"chat":"1d75172e-ceef-4d2b-a88d-120f4ac81ae2","token":"rgBPMQiVcl1BMHlapF-ag4BfR8sUYfTLpbLwlW9ZZ_E"},{"chat":"71d0b00a-0ed6-4eea-a5bf-3b94df4be281","token":"JwQ9RFQxDsB2ECNUr29jel2Br90idTb3na8d0jMgpiY"},{"chat":"4c99bd9f-951a-4d5c-a1dd-ca2fc0d53151","token":"RzhQkd_g_o1vUGFMecJQANVji2PWTqPJy9l5o1dhkps"},{"chat":"f7c6e5d8-dc55-477e-bc6c-98ebf4d2a0b5","token":"Rzy-mgHjltDgSRJlxvL_S4FQQnPk5dPlkcxX3CWBvOQ"},{"chat":"428e1aed-b1e4-4757-b676-9526cadcfa02","token":"QMDJrzFT4uRQs3FF-Rh91bKwminIPfs4yD0WZDCfTko"},{"chat":"26d61bb6-d0ac-4394-a60b-240c5ac4ec21","token":"CNQ78KUZrADoK1-PkDIH2GFdX_tUHNQtqa3E1lWPd8o"},{"chat":"a2099fa1-4296-445b-9589-4841ff12a150","token":"2fc7jn0fu8v3kXCtOU5Ras4aq1cZD28ZCh3poX3iY48"}],"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":3356,"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":1379},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":98,"fails":52},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":1365,"fails":3353}]},"options":{"noColor":false,"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":50914.421033}}} diff --git a/evidence/research-20261029-final/load-growing4-20261029111342.json b/evidence/research-20261029-final/load-growing4-20261029111342.json new file mode 100644 index 00000000..b1119767 --- /dev/null +++ b/evidence/research-20261029-final/load-growing4-20261029111342.json @@ -0,0 +1,373 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "passes": 2435, + "fails": 0, + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e" + }, + { + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 257, + "fails": 0, + "name": "retry returns original", + "path": "::retry returns original" + }, + { + "fails": 0, + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 2425 + } + ] + }, + "options": { + "noColor": false, + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "" + }, + "state": { + "isStdErrTTY": false, + "testRunDurationMs": 51404.879007, + "isStdOutTTY": false + }, + "metrics": { + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "max": 1146.897122, + "avg": 190.30279135237166, + "p(50)": 114.618387, + "p(95)": 667.2456056000004, + "p(99)": 933.54675704 + } + }, + "confirmed_messages": { + "contains": "default", + "values": { + "count": 2319, + "rate": 45.11244933937522 + }, + "type": "counter" + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "vus": { + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + }, + "type": "gauge" + }, + "iteration_duration": { + "contains": "time", + "values": { + "p(99)": 1443.3416365199994, + "max": 1863.623413, + "avg": 402.7049130078351, + "p(50)": 296.913235, + "p(95)": 1010.3944568 + }, + "type": "trend" + }, + "http_req_waiting": { + "contains": "time", + "values": { + "p(95)": 666.1086130000003, + "p(99)": 933.1889214, + "max": 1143.40204, + "avg": 189.51302138025207, + "p(50)": 113.692636 + }, + "type": "trend" + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 4.379571959999983, + "max": 214.94892, + "avg": 0.4611384611810247, + "p(50)": 0.178007, + "p(95)": 1.4489760000000012 + } + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.32863151093901344, + "p(50)": 0.15359, + "p(95)": 0.9729462000000001, + "p(99)": 3.6155539599999913, + "max": 42.797223 + } + }, + "http_req_tls_handshaking": { + "contains": "time", + "values": { + "avg": 0.26630205479186836, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 220.841301 + }, + "type": "trend" + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 16.054407, + "avg": 0.05068375062923525 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 1, + "passes": 5117, + "fails": 0 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 2425, + "rate": 47.17451041310259 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 484808, + "rate": 9431.16702860018 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0, + "passes": 0, + "fails": 5165 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 7050343, + "rate": 137153.18732760617 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 5165, + "rate": 100.47684382831953 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 667.2456056000004, + "p(99)": 933.54675704, + "max": 1146.897122, + "avg": 190.30279135237166, + "p(50)": 114.618387 + } + }, + "http_req_blocked": { + "values": { + "max": 1046.463791, + "avg": 0.5203352913843139, + "p(50)": 0.000982, + "p(95)": 0.0016316000000000004, + "p(99)": 0.023012799999999917 + }, + "type": "trend", + "contains": "time" + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 2319, + "rate": 45.11244933937522 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 4882, + "rate": 94.97152982959457 + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 1002.1604266600006, + "max": 1146.897122, + "avg": 227.4769499275549, + "p(50)": 136.678739, + "p(95)": 800.6695819 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + } + }, + "setup_data": [ + { + "token": "lpZ0VpymuFDLCT3e760KOu_43GCenXd50r0ODc6ke54", + "chat": "4db8c4c4-06a6-4880-bcf4-8c5cc7d513bc" + }, + { + "chat": "539f8a9c-dec4-45cd-8941-cc75d54f9986", + "token": "vNJuePDsneXwlvqeKFToIKkfj48lfb0RyRhpatAs2j4" + }, + { + "chat": "e19d89eb-be90-4359-81f0-6d5cf73b4619", + "token": "EloM5f0iM0OIP2wjcryeizKtzRmkJk46iVhYx3WwnDw" + }, + { + "chat": "710e5064-15f7-44df-b819-a0a404551a94", + "token": "Hx26gzSmf_EiCldr-WzMqUVRi_33rtoCa8K8PnXAIEg" + }, + { + "chat": "638f0fdf-2909-4b0f-a69a-f608192d77fa", + "token": "PhMxEPkvvP6-L0qUus3OWDU0TmO3BVskDroOH4efo04" + }, + { + "token": "u7XcpOYIlVn8c29vF1VEto-uzc1SSmUBFjmtoL9sIBc", + "chat": "cc21bcb6-ca85-49c8-82ba-30b3e9da46a0" + }, + { + "chat": "04d17b6a-ab3f-4dbc-a62e-ab635e909382", + "token": "ov_WvOJCgSHKESmCsYx6aMQYkvTt9VudL-zuTjjXy6Q" + }, + { + "token": "i6c-KVbdhw8xH19kn2_Bkg5Kp38FquQH260Fw-iTd-8", + "chat": "0e816a28-b0f3-46ee-be25-a40124f8c3f3" + }, + { + "chat": "4d54402e-8975-4889-8fa2-b44eaf87e2c3", + "token": "QHSLNvqtELJRkiGHCVmGOD1ejHnnzxcGQAuVPj-eziE" + }, + { + "chat": "632a6c93-18df-4974-bdf2-5110a522e2ae", + "token": "Geq7bTpG20zBeX_s23U9X8xN317XATH2eweGy-RieXg" + }, + { + "chat": "0e36bcac-e990-4156-89da-8a3c492d8526", + "token": "xlmKVl2sNpDN3Kum5iWG4dEMmJ9LFqJiGilDm2Tu88k" + }, + { + "chat": "9a7b7de4-91e0-4e03-937f-a3fa72949b07", + "token": "VSkcBGRfrwf2fxYtV_oSBuGUcvORHVzN95aIYOn8POM" + }, + { + "chat": "7d6db047-612d-4285-af7b-427f03870fe9", + "token": "wP80c5-mOKlckO-sYPt_5gKpMdl4XK6w6PfLLLQdLBM" + }, + { + "chat": "6b80359e-4a85-42e8-95af-8eae5815f785", + "token": "ZtmOXFduW3drJEFi5Ri1IMe9zfqgYkNW2kjc5Vwsl8Q" + }, + { + "chat": "5f588e80-3f9e-4fbf-8d0e-8556ec93babf", + "token": "8jGgpeZ4g7g2ZtdEbW1nQYXDiDvQPJ2aq5jQ1M46eps" + }, + { + "chat": "51ffcb94-a4c8-4c56-834a-5dc599361c19", + "token": "HJhusJ2jIywrswbUA2dSKjGwY1ZMRrRzT-MwHfE7liI" + } + ] + } +} diff --git a/evidence/research-20261029-final/load-growing4-20261029111342.txt b/evidence/research-20261029-final/load-growing4-20261029111342.txt new file mode 100644 index 00000000..f863721c --- /dev/null +++ b/evidence/research-20261029-final/load-growing4-20261029111342.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":2435,"fails":0,"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e"},{"id":"f737ff9008ff036f7a4b775b05a953fa","passes":257,"fails":0,"name":"retry returns original","path":"::retry returns original"},{"fails":0,"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":2425}]},"options":{"noColor":false,"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdErrTTY":false,"testRunDurationMs":51404.879007,"isStdOutTTY":false},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"max":1146.897122,"avg":190.30279135237166,"p(50)":114.618387,"p(95)":667.2456056000004,"p(99)":933.54675704}},"confirmed_messages":{"contains":"default","values":{"count":2319,"rate":45.11244933937522},"type":"counter"},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"vus":{"contains":"default","values":{"value":32,"min":0,"max":32},"type":"gauge"},"iteration_duration":{"contains":"time","values":{"p(99)":1443.3416365199994,"max":1863.623413,"avg":402.7049130078351,"p(50)":296.913235,"p(95)":1010.3944568},"type":"trend"},"http_req_waiting":{"contains":"time","values":{"p(95)":666.1086130000003,"p(99)":933.1889214,"max":1143.40204,"avg":189.51302138025207,"p(50)":113.692636},"type":"trend"},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":4.379571959999983,"max":214.94892,"avg":0.4611384611810247,"p(50)":0.178007,"p(95)":1.4489760000000012}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.32863151093901344,"p(50)":0.15359,"p(95)":0.9729462000000001,"p(99)":3.6155539599999913,"max":42.797223}},"http_req_tls_handshaking":{"contains":"time","values":{"avg":0.26630205479186836,"p(50)":0,"p(95)":0,"p(99)":0,"max":220.841301},"type":"trend"},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":16.054407,"avg":0.05068375062923525}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":5117,"fails":0}},"iterations":{"type":"counter","contains":"default","values":{"count":2425,"rate":47.17451041310259}},"data_sent":{"type":"counter","contains":"data","values":{"count":484808,"rate":9431.16702860018}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":5165}},"data_received":{"type":"counter","contains":"data","values":{"count":7050343,"rate":137153.18732760617}},"http_reqs":{"type":"counter","contains":"default","values":{"count":5165,"rate":100.47684382831953}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":667.2456056000004,"p(99)":933.54675704,"max":1146.897122,"avg":190.30279135237166,"p(50)":114.618387}},"http_req_blocked":{"values":{"max":1046.463791,"avg":0.5203352913843139,"p(50)":0.000982,"p(95)":0.0016316000000000004,"p(99)":0.023012799999999917},"type":"trend","contains":"time"},"attempted_messages":{"type":"counter","contains":"default","values":{"count":2319,"rate":45.11244933937522}},"measured_operations":{"type":"counter","contains":"default","values":{"count":4882,"rate":94.97152982959457}},"message_latency_ms":{"type":"trend","contains":"time","values":{"p(99)":1002.1604266600006,"max":1146.897122,"avg":227.4769499275549,"p(50)":136.678739,"p(95)":800.6695819}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}}},"setup_data":[{"token":"lpZ0VpymuFDLCT3e760KOu_43GCenXd50r0ODc6ke54","chat":"4db8c4c4-06a6-4880-bcf4-8c5cc7d513bc"},{"chat":"539f8a9c-dec4-45cd-8941-cc75d54f9986","token":"vNJuePDsneXwlvqeKFToIKkfj48lfb0RyRhpatAs2j4"},{"chat":"e19d89eb-be90-4359-81f0-6d5cf73b4619","token":"EloM5f0iM0OIP2wjcryeizKtzRmkJk46iVhYx3WwnDw"},{"chat":"710e5064-15f7-44df-b819-a0a404551a94","token":"Hx26gzSmf_EiCldr-WzMqUVRi_33rtoCa8K8PnXAIEg"},{"chat":"638f0fdf-2909-4b0f-a69a-f608192d77fa","token":"PhMxEPkvvP6-L0qUus3OWDU0TmO3BVskDroOH4efo04"},{"token":"u7XcpOYIlVn8c29vF1VEto-uzc1SSmUBFjmtoL9sIBc","chat":"cc21bcb6-ca85-49c8-82ba-30b3e9da46a0"},{"chat":"04d17b6a-ab3f-4dbc-a62e-ab635e909382","token":"ov_WvOJCgSHKESmCsYx6aMQYkvTt9VudL-zuTjjXy6Q"},{"token":"i6c-KVbdhw8xH19kn2_Bkg5Kp38FquQH260Fw-iTd-8","chat":"0e816a28-b0f3-46ee-be25-a40124f8c3f3"},{"chat":"4d54402e-8975-4889-8fa2-b44eaf87e2c3","token":"QHSLNvqtELJRkiGHCVmGOD1ejHnnzxcGQAuVPj-eziE"},{"chat":"632a6c93-18df-4974-bdf2-5110a522e2ae","token":"Geq7bTpG20zBeX_s23U9X8xN317XATH2eweGy-RieXg"},{"chat":"0e36bcac-e990-4156-89da-8a3c492d8526","token":"xlmKVl2sNpDN3Kum5iWG4dEMmJ9LFqJiGilDm2Tu88k"},{"chat":"9a7b7de4-91e0-4e03-937f-a3fa72949b07","token":"VSkcBGRfrwf2fxYtV_oSBuGUcvORHVzN95aIYOn8POM"},{"chat":"7d6db047-612d-4285-af7b-427f03870fe9","token":"wP80c5-mOKlckO-sYPt_5gKpMdl4XK6w6PfLLLQdLBM"},{"chat":"6b80359e-4a85-42e8-95af-8eae5815f785","token":"ZtmOXFduW3drJEFi5Ri1IMe9zfqgYkNW2kjc5Vwsl8Q"},{"chat":"5f588e80-3f9e-4fbf-8d0e-8556ec93babf","token":"8jGgpeZ4g7g2ZtdEbW1nQYXDiDvQPJ2aq5jQ1M46eps"},{"chat":"51ffcb94-a4c8-4c56-834a-5dc599361c19","token":"HJhusJ2jIywrswbUA2dSKjGwY1ZMRrRzT-MwHfE7liI"}]}} diff --git a/evidence/research-20261029-final/load-saturation8-20261029111530.txt b/evidence/research-20261029-final/load-saturation8-20261029111530.txt new file mode 100644 index 00000000..0482bd68 --- /dev/null +++ b/evidence/research-20261029-final/load-saturation8-20261029111530.txt @@ -0,0 +1,7 @@ +time="2026-10-29T11:16:18Z" level=warning msg="setup chat: 503; abandoning synthetic actor" source=console +time="2026-10-29T11:16:21Z" level=warning msg="setup chat: 503; abandoning synthetic actor" source=console +time="2026-10-29T11:16:22Z" level=warning msg="setup registration: 503; abandoning synthetic actor" source=console +time="2026-10-29T11:16:23Z" level=warning msg="setup registration: 503; abandoning synthetic actor" source=console +time="2026-10-29T11:16:24Z" level=warning msg="setup registration: 503; abandoning synthetic actor" source=console +{"profile":{"vus":8,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"checks":[],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTimeUnit":"","noColor":false,"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"]},"state":{"testRunDurationMs":12302.057988,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":12.116370299999957,"p(99)":34.733594859999975,"max":40.387901,"avg":2.692526733333333,"p(50)":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":210.89978449999998,"p(50)":197.485976,"p(95)":334.97417769999987,"p(99)":386.62928674,"max":399.543064}},"http_req_tls_handshaking":{"contains":"time","values":{"p(99)":41.55609525999997,"max":48.321041,"avg":3.2214027333333335,"p(50)":0,"p(95)":14.496312299999948},"type":"trend"},"http_req_failed":{"values":{"rate":0.3333333333333333,"passes":5,"fails":10},"type":"rate","contains":"default"},"http_req_duration":{"contains":"time","values":{"avg":427.1935672000001,"p(50)":195.27623,"p(95)":2106.8020447,"p(99)":2112.8369009400003,"max":2114.345615},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.4652859999999999,"p(50)":0.476251,"p(95)":0.7287704999999995,"p(99)":0.9538652999999997,"max":1.010139}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.3033577333333333,"p(50)":0.165485,"p(95)":0.7939931999999986,"p(99)":1.5388234399999994,"max":1.725031}},"data_sent":{"type":"counter","contains":"data","values":{"count":2996,"rate":243.5364881975388}},"vus_max":{"type":"gauge","contains":"default","values":{"min":8,"max":8,"value":8}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":426.42492346666666,"p(50)":194.527747,"p(95)":2106.0141127999996,"p(99)":2111.6633233599996,"max":2113.075626}},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"count":15,"rate":1.2193081852346737}},"application_errors{status:0}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"count":0,"rate":0}},"vus":{"type":"gauge","contains":"default","values":{"value":0,"min":0,"max":0}},"data_received":{"type":"counter","contains":"data","values":{"count":8858,"rate":720.0421269872493}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":264.7855810999991,"p(99)":759.0491506199995,"max":882.615043,"avg":58.84199013333333,"p(50)":0.000989}}}}} +time="2026-10-29T11:16:28Z" level=error msg="Error: synthetic actor setup exhausted retries\n\tat setup (file:///scripts/scaling.js:46:26(235))\n" hint="script exception" diff --git a/evidence/research-20261029-final/matrix.png b/evidence/research-20261029-final/matrix.png new file mode 100644 index 0000000000000000000000000000000000000000..cf642b9462fd6e5730725ecb1619308e74dca690 GIT binary patch literal 82178 zcmb5WWl)=8*ENb$tQ07;6fH%Hx428u1P?BSQrz7gDnRi-C{A&LyIUy|97=E+3Iqy8 ziaUHa&-)zMiYp=C7QJU&XB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6PZU z5nBP?PZfJvkT4`O$7kzONu*nIEQIVwm2d*w1+#8KQ~@OtZdn8DR6$J0p2CeCRoU=y z@#^kfn2uNCFltv9B~DDCp|n;H3R$h?1d`9w=X!yhrr!15&KczCihR6=ajDm!L>*{U zxzf8mhFd#oP9c4~U7JOBM`85mkVxHKrC zY8AOi)mhM=f~{rI<*g}A1oCL5;<;cXXQIOVzC`x@G@aGAV{Qvw2A6@Gn7Hb z^{>BsVk*rx$%?&ewm?|WMW!;7!`-xk^DLFIHFh+e%uF)?*8iAb66nFM9sLrESsJJ= zDqJ7xQzw_pWR~JTf&4A<7_bADnk9M-<y;xX}@#Y(CX_a@-4U?Ku zm!3_Y78UcJK+!GgytxA8fhda62(DJah-0JrTvoc}n=;l7UH^5-g(WfoOga*Qojlkc z>REFsm{Ad=R*fS;lspWZPrY5O=@cH)fB$NH_cJFTYe=zv>bRg!cV?R<45GSpoW$sm zKPk99S7*q_Ac0#k+#2hD)h1}WR}<@xCmk&2GKio?kKebvql^*YQ{rR$%#NADwPF>66G*-{4@xD#hB{(F+s zyHRe$pYYceXfzvPZN_=4^@q=pBU)o;(z4W{tK8UKk3#Ra>-dGyd0DY7M`; z+d6QEqz0D=(YZbEY<)RaqIwY=U3dFHmTV}$xHzWO-D2srZ``k{HJrF*KQImAZo_a$ zvLTGM78dmKXQuXCW>ww8FZj*I(zxH#N62{UxYBtJV-zfA;aV r$yz$+zeBgz@a%K`kDU(t)5aC%SLn14Co74adD0g<_G}mW98UWOAe1sO literal 0 HcmV?d00001 diff --git a/evidence/research-20261029-final/matrix.svg b/evidence/research-20261029-final/matrix.svg new file mode 100644 index 00000000..c6c277d3 --- /dev/null +++ b/evidence/research-20261029-final/matrix.svg @@ -0,0 +1,1667 @@ + + + + + + + + 2026-10-29T15:23:04.427382 + image/svg+xml + + + Matplotlib v3.10.8, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/evidence/research-20261029-final/node-capacity.json b/evidence/research-20261029-final/node-capacity.json new file mode 100644 index 00000000..16a112b0 --- /dev/null +++ b/evidence/research-20261029-final/node-capacity.json @@ -0,0 +1,95 @@ +[ + { + "name": "dev.asisti.tech", + "capacity": { + "cpu": "4", + "ephemeral-storage": "82447384Ki", + "hugepages-1Gi": "0", + "hugepages-2Mi": "0", + "memory": "8026472Ki", + "pods": "110" + }, + "allocatable": { + "cpu": "4", + "ephemeral-storage": "81398808Ki", + "hugepages-1Gi": "0", + "hugepages-2Mi": "0", + "memory": "7924072Ki", + "pods": "110" + }, + "nodeInfo": { + "architecture": "amd64", + "containerRuntimeVersion": "containerd://1.7.29", + "kernelVersion": "6.8.0-139-generic", + "kubeProxyVersion": "", + "kubeletVersion": "v1.33.13", + "operatingSystem": "linux", + "osImage": "Ubuntu 24.04.4 LTS", + "swap": { + "capacity": 4109365248 + } + } + }, + { + "name": "marlosrv0", + "capacity": { + "cpu": "6", + "ephemeral-storage": "980227752Ki", + "hugepages-1Gi": "0", + "hugepages-2Mi": "0", + "memory": "32703800Ki", + "pods": "110" + }, + "allocatable": { + "cpu": "6", + "ephemeral-storage": "979179176Ki", + "hugepages-1Gi": "0", + "hugepages-2Mi": "0", + "memory": "32601400Ki", + "pods": "110" + }, + "nodeInfo": { + "architecture": "amd64", + "containerRuntimeVersion": "containerd://1.7.29", + "kernelVersion": "6.8.0-147-generic", + "kubeProxyVersion": "", + "kubeletVersion": "v1.33.13", + "operatingSystem": "linux", + "osImage": "Ubuntu 24.04.5 LTS", + "swap": { + "capacity": 8589930496 + } + } + }, + { + "name": "srv0.agapov.space", + "capacity": { + "cpu": "4", + "ephemeral-storage": "82447384Ki", + "hugepages-1Gi": "0", + "hugepages-2Mi": "0", + "memory": "8026556Ki", + "pods": "110" + }, + "allocatable": { + "cpu": "4", + "ephemeral-storage": "81398808Ki", + "hugepages-1Gi": "0", + "hugepages-2Mi": "0", + "memory": "7924156Ki", + "pods": "110" + }, + "nodeInfo": { + "architecture": "amd64", + "containerRuntimeVersion": "containerd://1.7.29", + "kernelVersion": "6.8.0-139-generic", + "kubeProxyVersion": "", + "kubeletVersion": "v1.33.13", + "operatingSystem": "linux", + "osImage": "Ubuntu 24.04.4 LTS", + "swap": { + "capacity": 4109365248 + } + } + } +] diff --git a/evidence/research-20261029-final/nodes.txt b/evidence/research-20261029-final/nodes.txt new file mode 100644 index 00000000..461dea77 --- /dev/null +++ b/evidence/research-20261029-final/nodes.txt @@ -0,0 +1,4 @@ +NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME +dev.asisti.tech Ready 252d v1.33.13 100.99.166.40 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 +marlosrv0 Ready 254d v1.33.13 192.168.1.37 Ubuntu 24.04.5 LTS 6.8.0-147-generic containerd://1.7.29 +srv0.agapov.space Ready 246d v1.33.13 100.108.186.94 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 diff --git a/evidence/research-20261029-final/pods-growing2-20261029111200.txt b/evidence/research-20261029-final/pods-growing2-20261029111200.txt new file mode 100644 index 00000000..6321425e --- /dev/null +++ b/evidence/research-20261029-final/pods-growing2-20261029111200.txt @@ -0,0 +1,3 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-855b9f4fb5-jmv88 1/1 Running 0 4m6s 10.1.25.91 dev.asisti.tech +api-855b9f4fb5-l4wp7 1/1 Running 0 39s 10.1.112.76 marlosrv0 diff --git a/evidence/research-20261029-final/pods-growing4-20261029111342.txt b/evidence/research-20261029-final/pods-growing4-20261029111342.txt new file mode 100644 index 00000000..fa1a526c --- /dev/null +++ b/evidence/research-20261029-final/pods-growing4-20261029111342.txt @@ -0,0 +1,5 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-855b9f4fb5-jmv88 1/1 Running 0 5m46s 10.1.25.91 dev.asisti.tech +api-855b9f4fb5-k58mh 1/1 Running 0 37s 10.1.25.113 dev.asisti.tech +api-855b9f4fb5-l4wp7 1/1 Running 0 2m19s 10.1.112.76 marlosrv0 +api-855b9f4fb5-sw875 1/1 Running 0 37s 10.1.131.11 srv0.agapov.space diff --git a/evidence/research-20261029-final/pods-saturation8-20261029111530.txt b/evidence/research-20261029-final/pods-saturation8-20261029111530.txt new file mode 100644 index 00000000..06b7e451 --- /dev/null +++ b/evidence/research-20261029-final/pods-saturation8-20261029111530.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-6fc45595fc-bc4qf 1/1 Running 0 36s 10.1.112.98 marlosrv0 diff --git a/evidence/research-20261029-final/profiles.csv b/evidence/research-20261029-final/profiles.csv new file mode 100644 index 00000000..35916c17 --- /dev/null +++ b/evidence/research-20261029-final/profiles.csv @@ -0,0 +1,8 @@ +profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool,vus,duration +fixed1,fixed1-20261029110437,1,1000,512,8,32,30 +fixed2,fixed2-20261029110639,2,500,256,8,32,30 +fixed4,fixed4-20261029110815,4,250,128,8,32,30 +growing1,growing1-20261029111013,1,250,128,8,32,30 +growing2,growing2-20261029111200,2,250,128,8,32,30 +growing4,growing4-20261029111342,4,250,128,8,32,30 +saturation8,saturation8-20261029111530,1,1000,512,8,8,30 diff --git a/evidence/research-20261029-final/resources-fixed1-20261029110437.txt b/evidence/research-20261029-final/resources-fixed1-20261029110437.txt new file mode 100644 index 00000000..273f08d8 --- /dev/null +++ b/evidence/research-20261029-final/resources-fixed1-20261029110437.txt @@ -0,0 +1,97 @@ +UTC 2026-10-29T11:05:39Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-5df5c 3m 22Mi +postgres-0 5m 30Mi +valkey-0 7m 9Mi +valkey-1 5m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:05:52Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-5df5c 2m 22Mi +postgres-0 5m 30Mi +valkey-0 7m 9Mi +valkey-1 5m 13Mi +valkey-2 5m 3Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:05:58Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-5df5c 2m 22Mi +postgres-0 5m 30Mi +valkey-0 7m 9Mi +valkey-1 5m 13Mi +valkey-2 5m 3Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:06:05Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-5df5c 233m 10Mi +load-fixed1-20261029110437-h46fd 56m 19Mi +postgres-0 10m 31Mi +valkey-0 21m 8Mi +valkey-1 5m 13Mi +valkey-2 6m 3Mi +active|Client|ClientRead|1 +active|IO|WalSync|1 +active|Lock|transactionid|1 +active|||2 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|3 +UTC 2026-10-29T11:06:12Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-5df5c 233m 10Mi +load-fixed1-20261029110437-h46fd 56m 19Mi +postgres-0 10m 31Mi +valkey-0 21m 8Mi +valkey-1 5m 13Mi +valkey-2 6m 3Mi +active|||3 +idle|Client|ClientRead|6 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:06:19Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-5df5c 233m 10Mi +load-fixed1-20261029110437-h46fd 227m 28Mi +postgres-0 328m 49Mi +valkey-0 21m 8Mi +valkey-1 13m 14Mi +valkey-2 48m 3Mi +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|7 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:06:26Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-5df5c 233m 10Mi +load-fixed1-20261029110437-h46fd 227m 28Mi +postgres-0 328m 49Mi +valkey-0 21m 8Mi +valkey-1 13m 14Mi +valkey-2 48m 3Mi +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|3 +idle in transaction|Client|ClientRead|5 +UTC 2026-10-29T11:06:32Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-5df5c 562m 15Mi +load-fixed1-20261029110437-h46fd 277m 30Mi +postgres-0 654m 50Mi +valkey-0 115m 8Mi +valkey-1 107m 14Mi +valkey-2 85m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:06:38Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-5df5c 562m 15Mi +postgres-0 654m 50Mi +valkey-0 115m 8Mi +valkey-1 107m 14Mi +valkey-2 85m 3Mi diff --git a/evidence/research-20261029-final/resources-fixed2-20261029110639.txt b/evidence/research-20261029-final/resources-fixed2-20261029110639.txt new file mode 100644 index 00000000..db6fd787 --- /dev/null +++ b/evidence/research-20261029-final/resources-fixed2-20261029110639.txt @@ -0,0 +1,99 @@ +UTC 2026-10-29T11:07:23Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-6prkx 17m 22Mi +api-7f5b6b9d85-kc6g9 3m 22Mi +postgres-0 10m 35Mi +valkey-0 8m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:07:30Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-6prkx 2m 22Mi +api-7f5b6b9d85-kc6g9 35m 58Mi +postgres-0 14m 36Mi +valkey-0 7m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|3 +idle|||1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:07:36Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-6prkx 2m 22Mi +api-7f5b6b9d85-kc6g9 35m 58Mi +postgres-0 14m 36Mi +valkey-0 7m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:07:42Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-6prkx 2m 22Mi +api-7f5b6b9d85-kc6g9 35m 58Mi +postgres-0 14m 36Mi +valkey-0 7m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|IO|WalSync|1 +active|Lock|transactionid|2 +active|||2 +idle|Client|ClientRead|7 +idle|||1 +idle in transaction|Client|ClientRead|4 +idle in transaction|||1 +UTC 2026-10-29T11:07:49Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-6prkx 143m 14Mi +api-7f5b6b9d85-kc6g9 35m 58Mi +load-fixed2-20261029110639-p24fl 151m 26Mi +postgres-0 14m 36Mi +valkey-0 52m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||4 +idle|Client|ClientRead|8 +idle|||1 +idle in transaction|Client|ClientRead|5 +UTC 2026-10-29T11:07:56Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-6prkx 143m 14Mi +api-7f5b6b9d85-kc6g9 35m 58Mi +load-fixed2-20261029110639-p24fl 151m 26Mi +postgres-0 14m 36Mi +valkey-0 52m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||2 +idle|Client|ClientRead|12 +idle in transaction|Client|ClientRead|3 +idle in transaction|||1 +UTC 2026-10-29T11:08:03Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-6prkx 394m 14Mi +api-7f5b6b9d85-kc6g9 319m 13Mi +load-fixed2-20261029110639-p24fl 361m 30Mi +postgres-0 454m 71Mi +valkey-0 52m 9Mi +valkey-1 68m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|12 +idle in transaction|Client|ClientRead|5 +UTC 2026-10-29T11:08:10Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-6prkx 394m 14Mi +api-7f5b6b9d85-kc6g9 319m 13Mi +load-fixed2-20261029110639-p24fl 361m 30Mi +postgres-0 454m 71Mi +valkey-0 52m 9Mi +valkey-1 68m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|16 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-final/resources-fixed4-20261029110815.txt b/evidence/research-20261029-final/resources-fixed4-20261029110815.txt new file mode 100644 index 00000000..4072fe8c --- /dev/null +++ b/evidence/research-20261029-final/resources-fixed4-20261029110815.txt @@ -0,0 +1,131 @@ +UTC 2026-10-29T11:09:13Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-gsprd 2m 23Mi +api-855b9f4fb5-jmv88 2m 22Mi +api-855b9f4fb5-sts4n 3m 22Mi +api-855b9f4fb5-wk5f7 2m 22Mi +postgres-0 11m 40Mi +valkey-0 8m 9Mi +valkey-1 6m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:09:20Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-gsprd 2m 23Mi +api-855b9f4fb5-jmv88 3m 22Mi +api-855b9f4fb5-sts4n 2m 22Mi +api-855b9f4fb5-wk5f7 2m 22Mi +postgres-0 7m 40Mi +valkey-0 9m 9Mi +valkey-1 6m 14Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:09:26Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-gsprd 2m 23Mi +api-855b9f4fb5-jmv88 3m 22Mi +api-855b9f4fb5-sts4n 2m 22Mi +api-855b9f4fb5-wk5f7 2m 22Mi +postgres-0 7m 40Mi +valkey-0 9m 9Mi +valkey-1 6m 14Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:09:32Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-gsprd 2m 23Mi +api-855b9f4fb5-jmv88 28m 58Mi +api-855b9f4fb5-sts4n 38m 61Mi +api-855b9f4fb5-wk5f7 31m 61Mi +load-fixed4-20261029110815-p6tfm 23m 17Mi +postgres-0 25m 44Mi +valkey-0 10m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|9 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:09:39Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-gsprd 2m 23Mi +api-855b9f4fb5-jmv88 28m 58Mi +api-855b9f4fb5-sts4n 38m 61Mi +api-855b9f4fb5-wk5f7 31m 61Mi +load-fixed4-20261029110815-p6tfm 23m 17Mi +postgres-0 25m 44Mi +valkey-0 10m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|26 +idle|||1 +idle in transaction|Client|ClientRead|5 +UTC 2026-10-29T11:09:46Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-gsprd 54m 40Mi +api-855b9f4fb5-jmv88 41m 40Mi +api-855b9f4fb5-sts4n 75m 11Mi +api-855b9f4fb5-wk5f7 92m 9Mi +load-fixed4-20261029110815-p6tfm 136m 25Mi +postgres-0 213m 110Mi +valkey-0 47m 9Mi +valkey-1 21m 14Mi +valkey-2 20m 3Mi +active|IO|WalSync|1 +active|Lock|transactionid|1 +active|||1 +idle|Client|ClientRead|26 +idle|||1 +idle in transaction|Client|ClientRead|4 +UTC 2026-10-29T11:09:52Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-gsprd 54m 40Mi +api-855b9f4fb5-jmv88 41m 40Mi +api-855b9f4fb5-sts4n 75m 11Mi +api-855b9f4fb5-wk5f7 92m 9Mi +load-fixed4-20261029110815-p6tfm 136m 25Mi +postgres-0 213m 110Mi +valkey-0 47m 9Mi +valkey-1 21m 14Mi +valkey-2 20m 3Mi +active|||1 +idle|Client|ClientRead|25 +idle in transaction|Client|ClientRead|8 +UTC 2026-10-29T11:10:00Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-gsprd 170m 11Mi +api-855b9f4fb5-jmv88 197m 12Mi +api-855b9f4fb5-sts4n 229m 12Mi +api-855b9f4fb5-wk5f7 191m 10Mi +load-fixed4-20261029110815-p6tfm 264m 29Mi +postgres-0 765m 113Mi +valkey-0 138m 9Mi +valkey-1 92m 14Mi +valkey-2 49m 3Mi +active|Client|ClientRead|1 +active|||1 +idle|Client|ClientRead|24 +idle in transaction|Client|ClientRead|6 +idle in transaction|IO|WalSync|1 +idle in transaction|LWLock|WALWrite|1 +UTC 2026-10-29T11:10:08Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-gsprd 170m 11Mi +api-855b9f4fb5-jmv88 197m 12Mi +api-855b9f4fb5-sts4n 229m 12Mi +api-855b9f4fb5-wk5f7 191m 10Mi +load-fixed4-20261029110815-p6tfm 264m 29Mi +postgres-0 765m 113Mi +valkey-0 138m 9Mi +valkey-1 92m 14Mi +valkey-2 49m 3Mi +active|||1 +idle|Client|ClientRead|32 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-final/resources-growing1-20261029111013.txt b/evidence/research-20261029-final/resources-growing1-20261029111013.txt new file mode 100644 index 00000000..c5df5753 --- /dev/null +++ b/evidence/research-20261029-final/resources-growing1-20261029111013.txt @@ -0,0 +1,96 @@ +UTC 2026-10-29T11:10:55Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 2m 12Mi +postgres-0 28m 55Mi +valkey-0 7m 9Mi +valkey-1 6m 14Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:11:02Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 2m 12Mi +postgres-0 5m 55Mi +valkey-0 7m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:11:08Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 2m 12Mi +postgres-0 5m 55Mi +valkey-0 7m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:11:15Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 82m 65Mi +load-growing1-20261029111013-4pptm 31m 18Mi +postgres-0 16m 55Mi +valkey-0 10m 9Mi +valkey-1 5m 14Mi +valkey-2 8m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:11:21Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 82m 65Mi +load-growing1-20261029111013-4pptm 31m 18Mi +postgres-0 16m 55Mi +valkey-0 10m 9Mi +valkey-1 5m 14Mi +valkey-2 8m 3Mi +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|4 +UTC 2026-10-29T11:11:28Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 82m 65Mi +load-growing1-20261029111013-4pptm 31m 18Mi +postgres-0 16m 55Mi +valkey-0 10m 9Mi +valkey-1 5m 14Mi +valkey-2 8m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:11:34Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 144m 12Mi +load-growing1-20261029111013-4pptm 55m 18Mi +postgres-0 54m 55Mi +valkey-0 28m 9Mi +valkey-1 7m 14Mi +valkey-2 26m 3Mi +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|4 +UTC 2026-10-29T11:11:41Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 144m 12Mi +load-growing1-20261029111013-4pptm 55m 18Mi +postgres-0 54m 55Mi +valkey-0 28m 9Mi +valkey-1 7m 14Mi +valkey-2 26m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:11:47Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 144m 12Mi +load-growing1-20261029111013-4pptm 55m 18Mi +postgres-0 54m 55Mi +valkey-0 28m 9Mi +valkey-1 7m 14Mi +valkey-2 26m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-final/resources-growing2-20261029111200.txt b/evidence/research-20261029-final/resources-growing2-20261029111200.txt new file mode 100644 index 00000000..e38784c4 --- /dev/null +++ b/evidence/research-20261029-final/resources-growing2-20261029111200.txt @@ -0,0 +1,105 @@ +UTC 2026-10-29T11:12:44Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 3m 15Mi +api-855b9f4fb5-l4wp7 19m 22Mi +postgres-0 6m 57Mi +valkey-0 7m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|9 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:12:51Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 3m 15Mi +api-855b9f4fb5-l4wp7 3m 23Mi +postgres-0 5m 57Mi +valkey-0 7m 9Mi +valkey-1 6m 14Mi +valkey-2 8m 3Mi +active|||1 +idle|Client|ClientRead|9 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:12:57Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 3m 15Mi +api-855b9f4fb5-l4wp7 3m 23Mi +postgres-0 5m 57Mi +valkey-0 7m 9Mi +valkey-1 6m 14Mi +valkey-2 8m 3Mi +active|||1 +idle|Client|ClientRead|12 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:13:03Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 72m 66Mi +api-855b9f4fb5-l4wp7 75m 9Mi +load-growing2-20261029111200-vdwmn 59m 18Mi +postgres-0 12m 58Mi +valkey-0 11m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|12 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:13:10Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 72m 66Mi +api-855b9f4fb5-l4wp7 75m 9Mi +load-growing2-20261029111200-vdwmn 59m 18Mi +postgres-0 12m 58Mi +valkey-0 11m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||3 +idle|Client|ClientRead|10 +idle in transaction|Client|ClientRead|5 +UTC 2026-10-29T11:13:17Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 148m 14Mi +api-855b9f4fb5-l4wp7 75m 9Mi +load-growing2-20261029111200-vdwmn 54m 18Mi +postgres-0 221m 76Mi +valkey-0 60m 9Mi +valkey-1 12m 14Mi +valkey-2 27m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:13:27Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 148m 14Mi +api-855b9f4fb5-l4wp7 75m 9Mi +load-growing2-20261029111200-vdwmn 54m 18Mi +postgres-0 221m 76Mi +valkey-0 60m 9Mi +valkey-1 12m 14Mi +valkey-2 27m 3Mi +active|||1 +idle|Client|ClientRead|13 +idle|||1 +idle in transaction|Client|ClientRead|3 +UTC 2026-10-29T11:13:33Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 133m 16Mi +api-855b9f4fb5-l4wp7 122m 12Mi +load-growing2-20261029111200-vdwmn 163m 31Mi +postgres-0 170m 76Mi +valkey-0 76m 9Mi +valkey-1 30m 14Mi +valkey-2 40m 3Mi +active|||2 +idle|Client|ClientRead|12 +idle in transaction|Client|ClientRead|4 +UTC 2026-10-29T11:13:40Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 133m 16Mi +api-855b9f4fb5-l4wp7 122m 12Mi +postgres-0 170m 76Mi +valkey-0 76m 9Mi +valkey-1 30m 14Mi +valkey-2 40m 3Mi +active|||1 +idle|Client|ClientRead|16 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-final/resources-growing4-20261029111342.txt b/evidence/research-20261029-final/resources-growing4-20261029111342.txt new file mode 100644 index 00000000..a9a220a5 --- /dev/null +++ b/evidence/research-20261029-final/resources-growing4-20261029111342.txt @@ -0,0 +1,128 @@ +UTC 2026-10-29T11:14:25Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 3m 15Mi +api-855b9f4fb5-k58mh 18m 22Mi +api-855b9f4fb5-l4wp7 2m 13Mi +api-855b9f4fb5-sw875 3m 22Mi +postgres-0 9m 80Mi +valkey-0 10m 9Mi +valkey-1 5m 14Mi +valkey-2 7m 4Mi +active|||1 +idle|Client|ClientRead|16 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:14:38Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 3m 15Mi +api-855b9f4fb5-k58mh 3m 22Mi +api-855b9f4fb5-l4wp7 3m 13Mi +api-855b9f4fb5-sw875 3m 22Mi +postgres-0 7m 80Mi +valkey-0 7m 9Mi +valkey-1 5m 14Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|17 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:14:44Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 3m 15Mi +api-855b9f4fb5-k58mh 3m 22Mi +api-855b9f4fb5-l4wp7 3m 13Mi +api-855b9f4fb5-sw875 3m 22Mi +postgres-0 7m 80Mi +valkey-0 7m 9Mi +valkey-1 5m 14Mi +valkey-2 7m 3Mi +active|||2 +idle|Client|ClientRead|17 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:14:50Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 4m 15Mi +api-855b9f4fb5-k58mh 3m 23Mi +api-855b9f4fb5-l4wp7 20m 49Mi +api-855b9f4fb5-sw875 32m 61Mi +load-growing4-20261029111342-g6kw6 39m 17Mi +postgres-0 13m 75Mi +valkey-0 9m 9Mi +valkey-1 6m 14Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|18 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:14:57Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 4m 15Mi +api-855b9f4fb5-k58mh 3m 23Mi +api-855b9f4fb5-l4wp7 20m 49Mi +api-855b9f4fb5-sw875 32m 61Mi +load-growing4-20261029111342-g6kw6 39m 17Mi +postgres-0 13m 75Mi +valkey-0 9m 9Mi +valkey-1 6m 14Mi +valkey-2 7m 3Mi +active|Lock|transactionid|1 +active|||1 +idle|Client|ClientRead|24 +idle|||1 +idle in transaction|Client|ClientRead|7 +UTC 2026-10-29T11:15:03Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 57m 66Mi +api-855b9f4fb5-k58mh 73m 39Mi +api-855b9f4fb5-l4wp7 65m 44Mi +api-855b9f4fb5-sw875 59m 61Mi +load-growing4-20261029111342-g6kw6 103m 25Mi +postgres-0 72m 82Mi +valkey-0 52m 9Mi +valkey-1 13m 14Mi +valkey-2 16m 3Mi +active|||1 +idle|Client|ClientRead|28 +idle in transaction|Client|ClientRead|4 +idle in transaction|IO|WalSync|1 +UTC 2026-10-29T11:15:11Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 57m 66Mi +api-855b9f4fb5-k58mh 73m 39Mi +api-855b9f4fb5-l4wp7 65m 44Mi +api-855b9f4fb5-sw875 59m 61Mi +load-growing4-20261029111342-g6kw6 103m 25Mi +postgres-0 72m 82Mi +valkey-0 52m 9Mi +valkey-1 13m 14Mi +valkey-2 16m 3Mi +active|Lock|transactionid|1 +active|||1 +idle|Client|ClientRead|26 +idle in transaction|Client|ClientRead|6 +UTC 2026-10-29T11:15:18Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 170m 54Mi +api-855b9f4fb5-k58mh 145m 10Mi +api-855b9f4fb5-l4wp7 153m 13Mi +api-855b9f4fb5-sw875 216m 13Mi +load-growing4-20261029111342-g6kw6 273m 29Mi +postgres-0 617m 117Mi +valkey-0 76m 10Mi +valkey-1 66m 14Mi +valkey-2 16m 3Mi +active|Lock|transactionid|1 +active|||1 +idle|Client|ClientRead|28 +idle in transaction|Client|ClientRead|4 +UTC 2026-10-29T11:15:25Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-jmv88 170m 54Mi +api-855b9f4fb5-k58mh 145m 10Mi +api-855b9f4fb5-l4wp7 153m 13Mi +api-855b9f4fb5-sw875 216m 13Mi +load-growing4-20261029111342-g6kw6 273m 29Mi +postgres-0 617m 117Mi +valkey-0 76m 10Mi +valkey-1 66m 14Mi +valkey-2 16m 3Mi +active|||1 +idle|Client|ClientRead|32 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-final/resources-saturation8-20261029111530.txt b/evidence/research-20261029-final/resources-saturation8-20261029111530.txt new file mode 100644 index 00000000..0ff4aac8 --- /dev/null +++ b/evidence/research-20261029-final/resources-saturation8-20261029111530.txt @@ -0,0 +1,40 @@ +UTC 2026-10-29T11:16:12Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-bc4qf 10m 22Mi +postgres-0 9m 41Mi +valkey-0 8m 10Mi +valkey-1 6m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:16:18Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-bc4qf 2m 22Mi +postgres-0 9m 41Mi +valkey-0 10m 10Mi +valkey-1 5m 14Mi +valkey-2 8m 3Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:16:25Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-bc4qf 2m 22Mi +postgres-0 9m 41Mi +valkey-0 10m 10Mi +valkey-1 5m 14Mi +valkey-2 8m 3Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:16:33Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-bc4qf 37m 58Mi +postgres-0 9m 42Mi +valkey-0 8m 9Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-final/restore-values.yaml b/evidence/research-20261029-final/restore-values.yaml new file mode 100644 index 00000000..4e915dac --- /dev/null +++ b/evidence/research-20261029-final/restore-values.yaml @@ -0,0 +1,61 @@ +api: + env: + DEPENDENCY_POOL_SIZE: "8" + DEPENDENCY_TIMEOUT_MS: "2000" + GOMEMLIMIT: 160MiB + REQUEST_TIMEOUT_SECONDS: "4" + SESSION_TTL_SECONDS: "3600" + SHUTDOWN_TIMEOUT_SECONDS: "5" + replicas: 2 + resources: + limits: + cpu: "1" + memory: 256Mi + requests: + cpu: 250m + memory: 128Mi +autoscaling: + cpuPercent: 60 + enabled: true + maxReplicas: 4 + minReplicas: 2 +databaseSecret: messenger-secrets +image: + digest: sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 + repository: asisti.registry.twcstorage.ru/mtusi2026lab3 +imagePullSecret: registry-pull +ingress: + className: traefik + clusterIssuer: letsencrypt-prod + host: hl.agapov.space +load: + duration: 30 + enabled: false + run: manual + script: scaling.js + vus: 32 +monitoring: + serviceMonitor: false +postgres: + image: postgres:17.6-alpine + resources: + limits: + cpu: "1" + memory: 512Mi + requests: + cpu: 250m + memory: 256Mi + storage: 2Gi +storageClass: "" +valkey: + image: valkey/valkey:8.1.3-alpine + maxmemory: 64mb + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 100m + memory: 96Mi + shards: 3 + storage: 1Gi diff --git a/evidence/research-20261029-final/restore.txt b/evidence/research-20261029-final/restore.txt new file mode 100644 index 00000000..41755a8d --- /dev/null +++ b/evidence/research-20261029-final/restore.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:16:34 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 15 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-final/results.png b/evidence/research-20261029-final/results.png new file mode 100644 index 0000000000000000000000000000000000000000..f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t>`TG=M{E02Ze*y3jp;e)7>hnqHu0nI*dFAJ z@+~*8KU53Bt-Z^i2gM`rU2XooH?{+@beFS(*V>| zLFj&0`+DFTW+(gGq~qjwHO)kJ*;D=c$YxhmC9BD(3|Hbh@d12QIBq?k9Xr)aeF&eh zRpd;>`6TmT#@{~eEz-Uy1lz|31;15a0E=^aeSM-J8IGaJ!FKokAT){j8U_RD;)3j( zP+F>yV{&?BWznI{hpi%xNXSChLN{(p{37r&sY#5ddBGPN{FXLF3;!qRE1GH~1G$XT zAOm3`{hPhu9#gxCs*y>i;`#qfS}}xzuPynGGS6gnO}oc>-eCuD*<4w+z!g%OHdAa+ z6EgYzKd(xDVwSQ6cWtdjz0M^3Q5PaN)37MEF|aJ$O4!1{%bi9>4)Ds8 zBBxsFpQl>4Nq!itfg2fQ60j@}X7AKI;$Hoahe&1g`1L6}FF`HP#N^BNrt#eLA|Be% z*}C`d3p)K89-9ApQ}W+v8~?fgdB5yj@_)QMUm!gFqSJ5WqxS!LaUcIl?R%O&D-sSY Rv=YFdB`(XH&rsJT{||`7%N76t literal 0 HcmV?d00001 diff --git a/evidence/research-20261029-final/results.svg b/evidence/research-20261029-final/results.svg new file mode 100644 index 00000000..5e445a41 --- /dev/null +++ b/evidence/research-20261029-final/results.svg @@ -0,0 +1,3372 @@ + + + + + + + + 2026-10-29T15:23:04.316010 + image/svg+xml + + + Matplotlib v3.10.8, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/evidence/research-20261029-final/rollout-fixed1.txt b/evidence/research-20261029-final/rollout-fixed1.txt new file mode 100644 index 00000000..478b770e --- /dev/null +++ b/evidence/research-20261029-final/rollout-fixed1.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:04:38 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 8 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-final/rollout-fixed2.txt b/evidence/research-20261029-final/rollout-fixed2.txt new file mode 100644 index 00000000..238f56ef --- /dev/null +++ b/evidence/research-20261029-final/rollout-fixed2.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:06:40 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 9 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-final/rollout-fixed4.txt b/evidence/research-20261029-final/rollout-fixed4.txt new file mode 100644 index 00000000..8c9fe3f7 --- /dev/null +++ b/evidence/research-20261029-final/rollout-fixed4.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:08:16 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 10 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-final/rollout-growing1.txt b/evidence/research-20261029-final/rollout-growing1.txt new file mode 100644 index 00000000..4b624d12 --- /dev/null +++ b/evidence/research-20261029-final/rollout-growing1.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:10:14 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 11 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-final/rollout-growing2.txt b/evidence/research-20261029-final/rollout-growing2.txt new file mode 100644 index 00000000..5dc09761 --- /dev/null +++ b/evidence/research-20261029-final/rollout-growing2.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:12:01 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 12 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-final/rollout-growing4.txt b/evidence/research-20261029-final/rollout-growing4.txt new file mode 100644 index 00000000..d898e60b --- /dev/null +++ b/evidence/research-20261029-final/rollout-growing4.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:13:44 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 13 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-final/rollout-saturation8.txt b/evidence/research-20261029-final/rollout-saturation8.txt new file mode 100644 index 00000000..5a540a27 --- /dev/null +++ b/evidence/research-20261029-final/rollout-saturation8.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:15:31 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 14 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-final/source.sha256 b/evidence/research-20261029-final/source.sha256 new file mode 100644 index 00000000..93d2dce5 --- /dev/null +++ b/evidence/research-20261029-final/source.sha256 @@ -0,0 +1,3 @@ +614623b626103627eea3d8946b9b22474be13a49115ffbb9e68e2d883ff1e4d4 student-tests/load/scaling.js +dcc8dc1217792aca3385c8e3195b236058ee9b2df912e60f9af46dc51b9a6c86 charts/messenger/values.yaml +60e09dd38fd1d413b744f21b57f64ba83e49a5ae1b4251aa5bf20be033f90cfb internal/controller/http/fiber/errors.go diff --git a/evidence/research-20261029-final/summary.csv b/evidence/research-20261029-final/summary.csv new file mode 100644 index 00000000..2e4c8b99 --- /dev/null +++ b/evidence/research-20261029-final/summary.csv @@ -0,0 +1,20 @@ +profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool,vus,duration,source,confirmed,rps,errors,error_percent,p50_ms,p95_ms,p99_ms,rejected_429,unavailable_503,network_errors,api_cpu_m,postgres_cpu_m,valkey_cpu_m,load_cpu_m,api_memory_mib,postgres_memory_mib,pg_active,pg_idle_transaction,pg_lock_waiters +fixed1,fixed1-20261029110437,1,1000,512,8,32,30,evidence/research-20261029-final,4242,141.4,0,0.0,91.8974085,221.84451689999997,570.8439318800006,0,0,0,562.0,654.0,307.0,277.0,22.0,50.0,5,5,1 +fixed2,fixed2-20261029110639,2,500,256,8,32,30,evidence/research-20261029-final,3725,124.16666666666667,36,0.4578405188859214,95.44093000000001,172.7375654,350.0392311900002,0,24,0,713.0,454.0,126.0,361.0,80.0,71.0,5,5,2 +fixed4,fixed4-20261029110815,4,250,128,8,32,30,evidence/research-20261029-final,2783,92.76666666666667,10,0.17041581458759372,138.39813800000002,579.4783116,748.0037995700006,0,9,0,787.0,765.0,279.0,264.0,203.0,113.0,3,8,1 +growing2,growing2-20261029111200,2,250,128,8,32,30,evidence/research-20261029-final,1198,39.93333333333333,6761,73.1868369777008,46.2625695,347.8488570999995,559.5331142800044,0,6754,0,255.0,221.0,146.0,163.0,75.0,76.0,3,5,0 +growing4,growing4-20261029111342,4,250,128,8,32,30,evidence/research-20261029-final,2319,77.3,0,0.0,136.678739,800.6695819,1002.1604266600006,0,0,0,684.0,617.0,158.0,273.0,210.0,117.0,2,7,1 +saturation64,saturation64-20261029112756,1,1000,512,8,64,30,evidence/research-20261029-pool,3246,108.2,4704,41.26677778752522,152.308315,371.86722199999997,533.1040489200009,0,4704,0,644.0,596.0,313.0,511.0,69.0,64.0,3,2,0 +single8a,single8a-20261029112953,1,1000,512,8,32,30,evidence/research-20261029-pool,2674,89.13333333333334,23,0.4056437389770723,131.492881,237.366661,553.4051984999999,0,8,0,423.0,340.0,192.0,430.0,15.0,65.0,7,1,1 +single32a,single32a-20261029113131,1,1000,512,32,32,30,evidence/research-20261029-pool,3603,120.1,16143,68.08806782234595,3.862274,112.4937897,285.82339131999726,0,16127,0,145.0,243.0,85.0,464.0,40.0,125.0,1,1,0 +single8b,single8b-20261029113315,1,1000,512,8,32,30,evidence/research-20261029-pool,2647,88.23333333333333,19983,78.22972126526777,2.858447,134.85857299999975,171.70400019000002,0,19983,0,290.0,187.0,127.0,0,22.0,69.0,5,3,0 +single32b,single32b-20261029113452,1,1000,512,32,32,30,evidence/research-20261029-pool,4952,165.06666666666666,0,0.0,98.00462,169.04933884999997,243.31071381999948,0,0,0,728.0,984.0,327.0,309.0,24.0,133.0,7,5,0 +probe5a,probe5a-20261029113950,1,1000,512,8,32,30,evidence/research-20261029-readiness,4352,145.06666666666666,0,0.0,98.04979,183.89047805,227.91660417999984,0,0,0,695.0,370.0,229.0,168.0,61.0,75.0,3,2,0 +probe2b,probe2b-20261029114146,1,1000,512,8,32,30,evidence/research-20261029-readiness,4810,160.33333333333334,0,0.0,92.3184985,159.7035873,211.03447146,0,0,0,3.0,3.0,21.0,0,22.0,59.0,4,2,0 +probe5b,probe5b-20261029114403,1,1000,512,8,32,30,evidence/research-20261029-readiness,2642,88.06666666666666,17950,76.34399455597142,3.865505,140.496066,199.81785927999985,0,17950,0,503.0,347.0,224.0,330.0,23.0,81.0,4,4,0 +growing1,growing1-20261029115804,1,250,128,8,32,30,evidence/research-20261029-budget,1133,37.766666666666666,3898,61.951684678957406,9.191468,400.90426964999995,515.0820838300001,0,3897,0,188.0,94.0,76.0,80.0,59.0,83.0,3,7,1 +saturation8,saturation8-20261029121309,1,1000,512,8,8,30,evidence/research-20261029-budget,2008,66.93333333333334,0,0.0,51.4747885,119.66888329999979,161.99635167000022,0,0,0,488.0,499.0,230.0,211.0,62.0,84.0,4,1,0 +resource-low-a,resource-low-a-20261029121455,2,250,128,8,32,30,evidence/research-20261029-budget,1281,42.7,126,4.463336875664187,179.871273,474.7400550500002,2920.94988727998,0,110,0,110.0,111.0,37.0,50.0,120.0,103.0,2,5,0 +resource-high-a,resource-high-a-20261029121644,2,500,256,8,32,30,evidence/research-20261029-budget,3270,109.0,18494,72.94024847170184,3.132864,165.90313379999998,214.25322976000027,0,18494,0,498.0,377.0,224.0,295.0,119.0,106.0,6,2,1 +resource-low-b,resource-low-b-20261029121833,2,250,128,8,32,30,evidence/research-20261029-budget,1164,38.8,25,1.004419445560466,183.4024585,427.3455392499994,3906.8322486500006,0,10,0,148.0,19.0,44.0,58.0,83.0,107.0,4,4,1 +resource-high-b,resource-high-b-20261029122017,2,500,256,8,32,30,evidence/research-20261029-budget,5109,170.3,0,0.0,86.548129,150.95621699999998,174.36450792000005,0,0,0,777.0,851.0,377.0,50.0,67.0,111.0,3,7,0 diff --git a/evidence/research-20261029-pool/README.md b/evidence/research-20261029-pool/README.md new file mode 100644 index 00000000..25b70a72 --- /dev/null +++ b/evidence/research-20261029-pool/README.md @@ -0,0 +1,7 @@ +# Насыщение и размер пула + +saturation8-20261029112615 исключён: в Deployment две реплики при ожидаемой одной (переход от HPA). Остальные профили имеют одну API на dev.asisti.tech, 1000m/512Mi. Исходные значения остаются в profiles.csv; анализатор сверяет фактические Deployment и исключает несовпадения. + +saturation64: 108.2 успешных записей/с и 4704 ошибки операций. admission-samples.txt содержит UTC-время, число неистекших глобальных слотов и значение rate-счётчика. Наблюдалось заполнение всех 32 слотов. Команда наблюдения — scripts/sample-admission.sh. + +A/B пула: single8a/single32a/single8b/single32b. Увеличение до 32 не подтвердило устойчивого улучшения: в первом B выросли ошибки, результаты повторов неоднородны. Такой вариант не выбран штатным. Параметр одновременно задаёт pgxpool и клиентские пулы Valkey; отдельно вклад каждого не выделен. diff --git a/evidence/research-20261029-pool/admission-samples.txt b/evidence/research-20261029-pool/admission-samples.txt new file mode 100644 index 00000000..1f4835ab --- /dev/null +++ b/evidence/research-20261029-pool/admission-samples.txt @@ -0,0 +1,540 @@ +UTC 2026-10-29T11:27:55Z +0 +0 +UTC 2026-10-29T11:28:01Z +0 +0 +UTC 2026-10-29T11:28:08Z +0 +0 +UTC 2026-10-29T11:28:14Z +0 +0 +UTC 2026-10-29T11:28:20Z +0 +0 +UTC 2026-10-29T11:28:26Z +0 +0 +UTC 2026-10-29T11:28:32Z +0 +0 +UTC 2026-10-29T11:28:39Z +0 +0 +UTC 2026-10-29T11:28:46Z +0 +0 +UTC 2026-10-29T11:28:53Z +0 +4 +UTC 2026-10-29T11:29:00Z +0 +0 +UTC 2026-10-29T11:29:07Z +2 +39 +UTC 2026-10-29T11:29:13Z +0 +0 +UTC 2026-10-29T11:29:19Z +32 +149 +UTC 2026-10-29T11:29:28Z +32 +191 +UTC 2026-10-29T11:29:34Z +32 +74 +UTC 2026-10-29T11:29:41Z +32 +32 +UTC 2026-10-29T11:29:48Z +0 +0 +UTC 2026-10-29T11:29:54Z +0 +0 +UTC 2026-10-29T11:30:00Z +0 +0 +UTC 2026-10-29T11:30:06Z +0 +0 +UTC 2026-10-29T11:30:24Z +0 +0 +UTC 2026-10-29T11:30:30Z +0 +0 +UTC 2026-10-29T11:30:36Z +0 +0 +UTC 2026-10-29T11:30:43Z +1 +4 +UTC 2026-10-29T11:30:49Z +0 +25 +UTC 2026-10-29T11:30:56Z +16 +200 +UTC 2026-10-29T11:31:02Z +23 +58 +UTC 2026-10-29T11:31:09Z +19 +142 +UTC 2026-10-29T11:31:15Z +20 +251 +UTC 2026-10-29T11:31:21Z +0 +0 +UTC 2026-10-29T11:31:38Z +0 +0 +UTC 2026-10-29T11:31:44Z +0 +0 +UTC 2026-10-29T11:31:51Z +0 +0 +UTC 2026-10-29T11:31:57Z +0 +0 +UTC 2026-10-29T11:32:04Z +0 +0 +UTC 2026-10-29T11:32:10Z +0 +0 +UTC 2026-10-29T11:32:16Z +0 +0 +UTC 2026-10-29T11:32:22Z +0 +0 +UTC 2026-10-29T11:32:29Z +3 +92 +UTC 2026-10-29T11:32:38Z +0 +0 +UTC 2026-10-29T11:32:44Z +1 +1 +UTC 2026-10-29T11:32:52Z +26 +117 +UTC 2026-10-29T11:32:59Z +28 +198 +UTC 2026-10-29T11:33:05Z +6 +100 +UTC 2026-10-29T11:33:12Z +0 +0 +UTC 2026-10-29T11:33:19Z +0 +0 +UTC 2026-10-29T11:33:24Z +0 +0 +UTC 2026-10-29T11:33:31Z +0 +0 +UTC 2026-10-29T11:33:37Z +0 +0 +UTC 2026-10-29T11:33:43Z +0 +0 +UTC 2026-10-29T11:33:49Z +0 +0 +UTC 2026-10-29T11:33:56Z +0 +0 +UTC 2026-10-29T11:34:02Z +1 +5 +UTC 2026-10-29T11:34:09Z +0 +0 +UTC 2026-10-29T11:34:16Z +14 +8 +UTC 2026-10-29T11:34:33Z +19 +254 +UTC 2026-10-29T11:34:40Z +16 +39 +UTC 2026-10-29T11:34:47Z +0 +0 +UTC 2026-10-29T11:34:54Z +0 +0 +UTC 2026-10-29T11:35:00Z +0 +0 +UTC 2026-10-29T11:35:06Z +0 +0 +UTC 2026-10-29T11:35:12Z +0 +0 +UTC 2026-10-29T11:35:19Z +0 +0 +UTC 2026-10-29T11:35:24Z +0 +0 +UTC 2026-10-29T11:35:30Z +1 +10 +UTC 2026-10-29T11:36:09Z +3 +107 +UTC 2026-10-29T11:36:16Z +25 +193 +UTC 2026-10-29T11:36:22Z +20 +79 +UTC 2026-10-29T11:36:28Z +30 +18 +UTC 2026-10-29T11:36:34Z +30 +302 +UTC 2026-10-29T11:36:41Z +26 +33 +UTC 2026-10-29T11:36:47Z +0 +0 +UTC 2026-10-29T11:36:54Z +0 +0 +UTC 2026-10-29T11:37:01Z +0 +0 +UTC 2026-10-29T11:37:07Z +0 +0 +UTC 2026-10-29T11:37:13Z +0 +0 +UTC 2026-10-29T11:37:19Z +0 +0 +UTC 2026-10-29T11:37:27Z +0 +0 +UTC 2026-10-29T11:37:32Z +0 +0 +UTC 2026-10-29T11:37:38Z +0 +0 +UTC 2026-10-29T11:37:44Z +0 +0 +UTC 2026-10-29T11:37:50Z +0 +0 +UTC 2026-10-29T11:37:55Z +0 +0 +UTC 2026-10-29T11:38:17Z +0 +0 +UTC 2026-10-29T11:38:22Z +0 +0 +UTC 2026-10-29T11:38:28Z +0 +0 +UTC 2026-10-29T11:38:34Z +0 +0 +UTC 2026-10-29T11:38:40Z +0 +0 +UTC 2026-10-29T11:38:46Z +0 +0 +UTC 2026-10-29T11:38:52Z +0 +0 +UTC 2026-10-29T11:38:57Z +0 +0 +UTC 2026-10-29T11:39:03Z +1 +7 +UTC 2026-10-29T11:39:11Z +0 +1 +UTC 2026-10-29T11:39:17Z +21 +173 +UTC 2026-10-29T11:39:38Z +24 +83 +UTC 2026-10-29T11:39:44Z +21 +324 +UTC 2026-10-29T11:39:49Z +0 +0 +UTC 2026-10-29T11:39:55Z +0 +0 +UTC 2026-10-29T11:40:01Z +0 +0 +UTC 2026-10-29T11:40:07Z +0 +0 +UTC 2026-10-29T11:40:12Z +0 +0 +UTC 2026-10-29T11:40:18Z +0 +0 +UTC 2026-10-29T11:40:24Z +0 +0 +UTC 2026-10-29T11:40:30Z +0 +0 +UTC 2026-10-29T11:40:35Z +0 +0 +UTC 2026-10-29T11:40:53Z +1 +2 +UTC 2026-10-29T11:40:59Z +1 +5 +UTC 2026-10-29T11:41:04Z +0 +0 +UTC 2026-10-29T11:41:10Z +17 +222 +UTC 2026-10-29T11:41:16Z +8 +162 +UTC 2026-10-29T11:41:22Z +17 +153 +UTC 2026-10-29T11:41:28Z +15 +178 +UTC 2026-10-29T11:41:34Z +17 +175 +UTC 2026-10-29T11:41:40Z +0 +0 +UTC 2026-10-29T11:41:46Z +0 +0 +UTC 2026-10-29T11:41:52Z +0 +0 +UTC 2026-10-29T11:42:08Z +0 +0 +UTC 2026-10-29T11:42:13Z +0 +0 +UTC 2026-10-29T11:42:19Z +0 +0 +UTC 2026-10-29T11:42:25Z +0 +0 +UTC 2026-10-29T11:42:31Z +0 +0 +UTC 2026-10-29T11:42:36Z +0 +0 +UTC 2026-10-29T11:42:42Z +0 +0 +UTC 2026-10-29T11:42:48Z +0 +0 +UTC 2026-10-29T11:42:54Z +0 +0 +UTC 2026-10-29T11:42:59Z +0 +0 +UTC 2026-10-29T11:43:05Z +0 +0 +UTC 2026-10-29T11:43:16Z +0 +2 +UTC 2026-10-29T11:43:22Z +2 +60 +UTC 2026-10-29T11:43:28Z +7 +7 +UTC 2026-10-29T11:43:34Z +19 +312 +UTC 2026-10-29T11:43:39Z +16 +285 +UTC 2026-10-29T11:43:46Z +22 +180 +UTC 2026-10-29T11:43:51Z +22 +154 +UTC 2026-10-29T11:43:57Z +21 +134 +UTC 2026-10-29T11:44:03Z +0 +0 +UTC 2026-10-29T11:44:09Z +0 +0 +UTC 2026-10-29T11:44:15Z +0 +0 +UTC 2026-10-29T11:44:32Z +0 +0 +UTC 2026-10-29T11:44:37Z +0 +0 +UTC 2026-10-29T11:44:43Z +0 +0 +UTC 2026-10-29T11:44:49Z +0 +1 +UTC 2026-10-29T11:44:55Z +2 +26 +UTC 2026-10-29T11:45:01Z +0 +0 +UTC 2026-10-29T11:45:07Z +12 +170 +UTC 2026-10-29T11:45:13Z +17 +192 +UTC 2026-10-29T11:45:19Z +18 +154 +UTC 2026-10-29T11:45:25Z +0 +0 +UTC 2026-10-29T11:45:34Z +0 +0 +UTC 2026-10-29T11:45:40Z +0 +0 +UTC 2026-10-29T11:45:45Z +0 +0 +UTC 2026-10-29T11:45:51Z +0 +0 +UTC 2026-10-29T11:45:57Z +0 +0 +UTC 2026-10-29T11:46:02Z +0 +0 +UTC 2026-10-29T11:46:08Z +0 +0 +UTC 2026-10-29T11:46:14Z +0 +0 +UTC 2026-10-29T11:46:20Z +0 +0 +UTC 2026-10-29T11:46:25Z +0 +0 +UTC 2026-10-29T11:46:31Z +0 +0 +UTC 2026-10-29T11:46:37Z +E1029 14:56:42.086748 4642 v2.go:168] "Copying stderr failed" err="next reader: websocket: close 1006 (abnormal closure): unexpected EOF" +E1029 14:56:42.087119 4642 v2.go:151] "Copying stdout failed" err="next reader: websocket: close 1006 (abnormal closure): unexpected EOF" +error: error reading from error stream: next reader: websocket: close 1006 (abnormal closure): unexpected EOF +UTC 2026-10-29T11:56:47Z +0 +0 +UTC 2026-10-29T11:56:53Z +error: EOF +UTC 2026-10-29T11:57:03Z +0 +0 +UTC 2026-10-29T11:57:19Z +0 +0 +UTC 2026-10-29T11:57:26Z +0 +0 +UTC 2026-10-29T11:57:32Z +0 +0 +UTC 2026-10-29T11:57:39Z +0 +0 +UTC 2026-10-29T11:57:45Z +0 +0 +UTC 2026-10-29T11:57:50Z +0 +0 +UTC 2026-10-29T11:57:55Z +0 +0 +UTC 2026-10-29T11:58:01Z +0 +0 +UTC 2026-10-29T11:58:06Z +0 +0 +UTC 2026-10-29T11:58:12Z +0 +0 +UTC 2026-10-29T11:58:32Z +0 +0 +UTC 2026-10-29T11:58:38Z +0 +0 +UTC 2026-10-29T11:58:43Z +0 +0 +UTC 2026-10-29T11:58:49Z +1 +4 +UTC 2026-10-29T11:58:54Z +4 +6 +UTC 2026-10-29T11:59:00Z +0 +25 diff --git a/evidence/research-20261029-pool/base-revision.txt b/evidence/research-20261029-pool/base-revision.txt new file mode 100644 index 00000000..32abb9b4 --- /dev/null +++ b/evidence/research-20261029-pool/base-revision.txt @@ -0,0 +1 @@ +7b7e23fd029beea47e6f625a96cb98d2fe04bafb diff --git a/evidence/research-20261029-pool/date.txt b/evidence/research-20261029-pool/date.txt new file mode 100644 index 00000000..3f7a1069 --- /dev/null +++ b/evidence/research-20261029-pool/date.txt @@ -0,0 +1 @@ +2026-10-29T11:26:15Z diff --git a/evidence/research-20261029-pool/deployment-saturation64-20261029112756.json b/evidence/research-20261029-pool/deployment-saturation64-20261029112756.json new file mode 100644 index 00000000..14fd8bad --- /dev/null +++ b/evidence/research-20261029-pool/deployment-saturation64-20261029112756.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "18", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 32, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60164526", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:26:25Z", + "message": "ReplicaSet \"api-84fbf9968\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + }, + { + "lastTransitionTime": "2026-10-29T11:27:56Z", + "lastUpdateTime": "2026-10-29T11:27:56Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + } + ], + "observedGeneration": 32, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-pool/deployment-saturation8-20261029112615.json b/evidence/research-20261029-pool/deployment-saturation8-20261029112615.json new file mode 100644 index 00000000..0ca9dc99 --- /dev/null +++ b/evidence/research-20261029-pool/deployment-saturation8-20261029112615.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "18", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 31, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60164234", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:26:25Z", + "message": "ReplicaSet \"api-84fbf9968\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + }, + { + "lastTransitionTime": "2026-10-29T11:26:46Z", + "lastUpdateTime": "2026-10-29T11:26:46Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + } + ], + "observedGeneration": 31, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/research-20261029-pool/deployment-single32a-20261029113131.json b/evidence/research-20261029-pool/deployment-single32a-20261029113131.json new file mode 100644 index 00000000..ef8caff2 --- /dev/null +++ b/evidence/research-20261029-pool/deployment-single32a-20261029113131.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "19", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 33, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60165408", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "7037faeb0676fe1a4b4de3f5bbd8f2e4f15c57479484ae610cfb30c24add1e04", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:31:36Z", + "lastUpdateTime": "2026-10-29T11:31:36Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:31:43Z", + "message": "ReplicaSet \"api-757dbc95b7\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 33, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-pool/deployment-single32b-20261029113452.json b/evidence/research-20261029-pool/deployment-single32b-20261029113452.json new file mode 100644 index 00000000..ea09bf8b --- /dev/null +++ b/evidence/research-20261029-pool/deployment-single32b-20261029113452.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "21", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 35, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60166203", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "7037faeb0676fe1a4b4de3f5bbd8f2e4f15c57479484ae610cfb30c24add1e04", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:34:30Z", + "lastUpdateTime": "2026-10-29T11:34:30Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:35:03Z", + "message": "ReplicaSet \"api-757dbc95b7\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 35, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-pool/deployment-single8a-20261029112953.json b/evidence/research-20261029-pool/deployment-single8a-20261029112953.json new file mode 100644 index 00000000..9bbf8ca2 --- /dev/null +++ b/evidence/research-20261029-pool/deployment-single8a-20261029112953.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "18", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 32, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60165044", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:26:25Z", + "message": "ReplicaSet \"api-84fbf9968\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + }, + { + "lastTransitionTime": "2026-10-29T11:30:19Z", + "lastUpdateTime": "2026-10-29T11:30:19Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + } + ], + "observedGeneration": 32, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-pool/deployment-single8b-20261029113315.json b/evidence/research-20261029-pool/deployment-single8b-20261029113315.json new file mode 100644 index 00000000..dd8965b5 --- /dev/null +++ b/evidence/research-20261029-pool/deployment-single8b-20261029113315.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "20", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 34, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60165807", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:32:49Z", + "lastUpdateTime": "2026-10-29T11:32:49Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:33:22Z", + "message": "ReplicaSet \"api-84fbf9968\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 34, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-pool/load-saturation64-20261029112756.json b/evidence/research-20261029-pool/load-saturation64-20261029112756.json new file mode 100644 index 00000000..0763c196 --- /dev/null +++ b/evidence/research-20261029-pool/load-saturation64-20261029112756.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 64, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 55995.2814 + }, + "metrics": { + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 401.99767529999997, + "p(99)": 576.616830559999, + "max": 7017.57684, + "avg": 213.6142088077467, + "p(50)": 191.3700135 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "rate": 211.78570235741327, + "count": 11859 + } + }, + "data_received": { + "contains": "data", + "values": { + "count": 11090315, + "rate": 198058.02779660645 + }, + "type": "counter" + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 1.3795551400000003, + "max": 14.244521, + "avg": 0.2349340860949491, + "p(50)": 0.155843, + "p(95)": 0.6693625000000003 + } + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 4704, + "rate": 84.00707849643916 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 11399, + "rate": 203.57072444322066 + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 163.46032220946165, + "p(50)": 143.75494, + "p(95)": 360.878234, + "p(99)": 512.61079596, + "max": 7017.57684 + } + }, + "confirmed_messages": { + "contains": "default", + "values": { + "count": 3246, + "rate": 57.96917023797651 + }, + "type": "counter" + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.1934017953453075, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 74.471482 + } + }, + "iteration_duration": { + "values": { + "avg": 337.6012475935087, + "p(50)": 301.04942500000004, + "p(95)": 697.9470468000001, + "p(99)": 936.3719748500005, + "max": 1497.258214 + }, + "type": "trend", + "contains": "time" + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "rate": 0, + "count": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 64, + "min": 64, + "max": 64 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 1058512, + "rate": 18903.59283023444 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.06324757492200016, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 34.458354 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "max": 23.806737, + "avg": 0.20671237498946082, + "p(50)": 0.181281, + "p(95)": 0.42426280000000005, + "p(99)": 0.8308295200000007 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 4704, + "rate": 84.00707849643916 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "max": 7017.064104, + "avg": 163.0186757483773, + "p(50)": 143.295731, + "p(95)": 360.3821336000001, + "p(99)": 512.27814752 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.6010178117048346, + "passes": 7086, + "fails": 4704 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.3969137364027321, + "passes": 4707, + "fails": 7152 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.3041592049076592, + "p(50)": 0.001234, + "p(95)": 0.001434, + "p(99)": 0.012724420000000014, + "max": 525.672971 + } + }, + "failed_writes": { + "type": "counter", + "contains": "default", + "values": { + "count": 2291, + "rate": 40.914161742207085 + } + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 64, + "min": 0, + "max": 64 + } + }, + "iterations": { + "values": { + "count": 5700, + "rate": 101.79429154543011 + }, + "type": "counter", + "contains": "default" + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "max": 874.341712, + "avg": 170.9695874179156, + "p(50)": 152.308315, + "p(95)": 371.86722199999997, + "p(99)": 533.1040489200009 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 5537, + "rate": 98.8833319801836 + } + } + }, + "setup_data": [ + { + "chat": "7bb14e47-ca2b-4d22-9ece-778c293e3ebf", + "token": "6IjGS4Mg7gZlo5qheTmZYxe27z-SJS-AvtbeCn7Jxjo" + }, + { + "chat": "220000bd-7884-4925-a5f1-43acc73a2c3e", + "token": "0Vuc8T2ZoLzCSAgK1SnTcliwrXvhbeA5MOi4S5gf4Q8" + }, + { + "chat": "e0cf378b-18c9-4711-b912-8bb67c2cd9ed", + "token": "i99DldVRBG_Xqms_UCRTtlcx423G_3uFKIqyhiERgPI" + }, + { + "chat": "36b04788-63b5-4d39-9bd1-0975c865576b", + "token": "TycvRZFlzzr7htbn96yUknJ9VI_yvpf1NAUN3reK9X8" + }, + { + "chat": "bf8611af-f87d-4dd3-be51-bd7d77a7bbc0", + "token": "pdJI3Cm5bFpUCBfpQmkr8DNksubnocbg3P6AHwvXzrM" + }, + { + "chat": "1bec14b9-4d35-4156-9b3a-07d867f10cd1", + "token": "wRHZ12UcdCOWU_VfNrebEz0um-o5MH3qUxtNrAhU-nk" + }, + { + "chat": "d3f32855-d6e0-4f71-9a41-f5049882e43a", + "token": "Fun7aiDNCS_aFmzH3vMrHty8pIdhO4d2suXNsxzKrhA" + }, + { + "chat": "acd9cdbb-fb68-4231-837c-445d5a9b3cfc", + "token": "iy1zm6U5UFGwJA6QrS0Hsrfuul-J_N7rsdCZIVvSHf8" + }, + { + "chat": "ce1620a2-d040-4fe7-8595-0991c591e7eb", + "token": "G95LyLE__0mN7-Tp48tq6mYOR_x12Z-En8gTqStnaKw" + }, + { + "chat": "cf9bb5ba-b517-47f8-b38a-6708f2400780", + "token": "7Mr1WuKxu7f_jROtvvWSrqJv7iNKeIgnRGvgFJPUiB8" + }, + { + "chat": "efe12f4c-4b0e-4557-88b0-623cdd9e2429", + "token": "Odjd1ietkAXcA2KDYBKv8u7rsx28YqAAqn9ld9n5rL0" + }, + { + "chat": "7324e6a5-6c52-4c8a-b47a-9682a3b98c65", + "token": "xPlmQZ3HY-XMbBUEW954T2sScYADlDj6xT7bA2bu7Ts" + }, + { + "chat": "b4f5cd58-1e5d-4d73-b19d-42ab840df946", + "token": "ofzILf_2vnVQh841wl33gQCVkSvFSp6OVj5mXdf91Iw" + }, + { + "chat": "2fd103e7-7c46-46b8-9205-42c6d3a1f906", + "token": "cNDVy1CsyX1uzUWcOKcBP607FoAUF7iQqLS4rkRBdJQ" + }, + { + "chat": "29f39173-1074-4f3b-8063-d237c0543a7e", + "token": "2vyAJ429jl1dkc0VNhxPus5BcSKstD9iNgGOzWuaHyg" + }, + { + "chat": "d6f8dd35-4944-411a-8988-8e86aacbbc39", + "token": "mJn28Ak1IU6INeLrASNuYLRrEwarQf-XBMjUVAZWmpY" + } + ], + "root_group": { + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 3451, + "fails": 2291 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 197, + "fails": 151 + }, + { + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 3438, + "fails": 2262, + "name": "history readable", + "path": "::history readable" + } + ], + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + } + } +} diff --git a/evidence/research-20261029-pool/load-saturation64-20261029112756.txt b/evidence/research-20261029-pool/load-saturation64-20261029112756.txt new file mode 100644 index 00000000..b6f772d1 --- /dev/null +++ b/evidence/research-20261029-pool/load-saturation64-20261029112756.txt @@ -0,0 +1,2 @@ +time="2026-10-29T11:29:01Z" level=warning msg="setup login: 503; abandoning synthetic actor" source=console +{"profile":{"vus":64,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":55995.2814},"metrics":{"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":401.99767529999997,"p(99)":576.616830559999,"max":7017.57684,"avg":213.6142088077467,"p(50)":191.3700135}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":211.78570235741327,"count":11859}},"data_received":{"contains":"data","values":{"count":11090315,"rate":198058.02779660645},"type":"counter"},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":1.3795551400000003,"max":14.244521,"avg":0.2349340860949491,"p(50)":0.155843,"p(95)":0.6693625000000003}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":4704,"rate":84.00707849643916},"thresholds":{"count>=0":{"ok":true}}},"measured_operations":{"type":"counter","contains":"default","values":{"count":11399,"rate":203.57072444322066}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":163.46032220946165,"p(50)":143.75494,"p(95)":360.878234,"p(99)":512.61079596,"max":7017.57684}},"confirmed_messages":{"contains":"default","values":{"count":3246,"rate":57.96917023797651},"type":"counter"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0.1934017953453075,"p(50)":0,"p(95)":0,"p(99)":0,"max":74.471482}},"iteration_duration":{"values":{"avg":337.6012475935087,"p(50)":301.04942500000004,"p(95)":697.9470468000001,"p(99)":936.3719748500005,"max":1497.258214},"type":"trend","contains":"time"},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"rate":0,"count":0},"thresholds":{"count>=0":{"ok":true}}},"vus_max":{"type":"gauge","contains":"default","values":{"value":64,"min":64,"max":64}},"data_sent":{"type":"counter","contains":"data","values":{"count":1058512,"rate":18903.59283023444}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.06324757492200016,"p(50)":0,"p(95)":0,"p(99)":0,"max":34.458354}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":23.806737,"avg":0.20671237498946082,"p(50)":0.181281,"p(95)":0.42426280000000005,"p(99)":0.8308295200000007}},"application_errors":{"type":"counter","contains":"default","values":{"count":4704,"rate":84.00707849643916}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":7017.064104,"avg":163.0186757483773,"p(50)":143.295731,"p(95)":360.3821336000001,"p(99)":512.27814752}},"checks":{"type":"rate","contains":"default","values":{"rate":0.6010178117048346,"passes":7086,"fails":4704}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.3969137364027321,"passes":4707,"fails":7152}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.3041592049076592,"p(50)":0.001234,"p(95)":0.001434,"p(99)":0.012724420000000014,"max":525.672971}},"failed_writes":{"type":"counter","contains":"default","values":{"count":2291,"rate":40.914161742207085}},"vus":{"type":"gauge","contains":"default","values":{"value":64,"min":0,"max":64}},"iterations":{"values":{"count":5700,"rate":101.79429154543011},"type":"counter","contains":"default"},"message_latency_ms":{"type":"trend","contains":"time","values":{"max":874.341712,"avg":170.9695874179156,"p(50)":152.308315,"p(95)":371.86722199999997,"p(99)":533.1040489200009}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":5537,"rate":98.8833319801836}}},"setup_data":[{"chat":"7bb14e47-ca2b-4d22-9ece-778c293e3ebf","token":"6IjGS4Mg7gZlo5qheTmZYxe27z-SJS-AvtbeCn7Jxjo"},{"chat":"220000bd-7884-4925-a5f1-43acc73a2c3e","token":"0Vuc8T2ZoLzCSAgK1SnTcliwrXvhbeA5MOi4S5gf4Q8"},{"chat":"e0cf378b-18c9-4711-b912-8bb67c2cd9ed","token":"i99DldVRBG_Xqms_UCRTtlcx423G_3uFKIqyhiERgPI"},{"chat":"36b04788-63b5-4d39-9bd1-0975c865576b","token":"TycvRZFlzzr7htbn96yUknJ9VI_yvpf1NAUN3reK9X8"},{"chat":"bf8611af-f87d-4dd3-be51-bd7d77a7bbc0","token":"pdJI3Cm5bFpUCBfpQmkr8DNksubnocbg3P6AHwvXzrM"},{"chat":"1bec14b9-4d35-4156-9b3a-07d867f10cd1","token":"wRHZ12UcdCOWU_VfNrebEz0um-o5MH3qUxtNrAhU-nk"},{"chat":"d3f32855-d6e0-4f71-9a41-f5049882e43a","token":"Fun7aiDNCS_aFmzH3vMrHty8pIdhO4d2suXNsxzKrhA"},{"chat":"acd9cdbb-fb68-4231-837c-445d5a9b3cfc","token":"iy1zm6U5UFGwJA6QrS0Hsrfuul-J_N7rsdCZIVvSHf8"},{"chat":"ce1620a2-d040-4fe7-8595-0991c591e7eb","token":"G95LyLE__0mN7-Tp48tq6mYOR_x12Z-En8gTqStnaKw"},{"chat":"cf9bb5ba-b517-47f8-b38a-6708f2400780","token":"7Mr1WuKxu7f_jROtvvWSrqJv7iNKeIgnRGvgFJPUiB8"},{"chat":"efe12f4c-4b0e-4557-88b0-623cdd9e2429","token":"Odjd1ietkAXcA2KDYBKv8u7rsx28YqAAqn9ld9n5rL0"},{"chat":"7324e6a5-6c52-4c8a-b47a-9682a3b98c65","token":"xPlmQZ3HY-XMbBUEW954T2sScYADlDj6xT7bA2bu7Ts"},{"chat":"b4f5cd58-1e5d-4d73-b19d-42ab840df946","token":"ofzILf_2vnVQh841wl33gQCVkSvFSp6OVj5mXdf91Iw"},{"chat":"2fd103e7-7c46-46b8-9205-42c6d3a1f906","token":"cNDVy1CsyX1uzUWcOKcBP607FoAUF7iQqLS4rkRBdJQ"},{"chat":"29f39173-1074-4f3b-8063-d237c0543a7e","token":"2vyAJ429jl1dkc0VNhxPus5BcSKstD9iNgGOzWuaHyg"},{"chat":"d6f8dd35-4944-411a-8988-8e86aacbbc39","token":"mJn28Ak1IU6INeLrASNuYLRrEwarQf-XBMjUVAZWmpY"}],"root_group":{"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":3451,"fails":2291},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":197,"fails":151},{"id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":3438,"fails":2262,"name":"history readable","path":"::history readable"}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false}}} diff --git a/evidence/research-20261029-pool/load-saturation8-20261029112615.json b/evidence/research-20261029-pool/load-saturation8-20261029112615.json new file mode 100644 index 00000000..eefcf762 --- /dev/null +++ b/evidence/research-20261029-pool/load-saturation8-20261029112615.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 8, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 2548, + "fails": 1 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 258, + "fails": 0 + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 2542, + "fails": 0 + } + ] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 44496.155406 + }, + "metrics": { + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 81.307029, + "p(95)": 166.36112324999993, + "p(99)": 237.15225758000037, + "max": 1275.031493, + "avg": 93.26953639929187 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 5413, + "rate": 121.65095951795634 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 2542, + "rate": 57.12853114624885 + } + }, + "measured_operations": { + "values": { + "count": 4838, + "rate": 108.72849476221555 + }, + "type": "counter", + "contains": "default" + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "rate": 0, + "count": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 44.84286413947879, + "p(50)": 38.886697, + "p(95)": 82.91048659999998, + "p(99)": 115.32284432000009, + "max": 2052.970693 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "rate": 10971.015260661687, + "count": 488168 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.009686436726399407, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 13.339376 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 44.415045599852135, + "p(50)": 38.450137, + "p(95)": 82.30610899999996, + "p(99)": 114.75960772000006, + "max": 2052.638627 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 0.001549, + "max": 524.787416, + "avg": 0.10720693811195224, + "p(50)": 0.001253, + "p(95)": 0.0014533999999999997 + } + }, + "http_req_sending": { + "values": { + "p(99)": 0.5234946400000007, + "max": 3.323115, + "avg": 0.2039293212636244, + "p(50)": 0.188413, + "p(95)": 0.3335779999999999 + }, + "type": "trend", + "contains": "time" + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 8, + "min": 0, + "max": 8 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 2302, + "rate": 51.734806726461386 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 8, + "min": 8, + "max": 8 + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 49.36489804385589, + "p(50)": 42.664478, + "p(95)": 86.18819210000001, + "p(99)": 124.96324370000004, + "max": 2052.970693 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.00018474043968224645, + "passes": 1, + "fails": 5412 + } + }, + "failed_writes": { + "type": "counter", + "contains": "default", + "values": { + "count": 1, + "rate": 0.022473851749114416 + } + }, + "application_errors{status:429}": { + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 1, + "rate": 0.022473851749114416 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_duration{expected_response:true}": { + "values": { + "avg": 44.47181317331831, + "p(50)": 38.88601, + "p(95)": 82.83867274999997, + "p(99)": 114.66379769000001, + "max": 1092.417083 + }, + "type": "trend", + "contains": "time" + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 0, + "max": 1.238689, + "avg": 0.0018240181045630888, + "p(50)": 0, + "p(95)": 0 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 2303, + "rate": 51.757280578210505 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.22388921836319944, + "p(50)": 0.180869, + "p(95)": 0.4766992, + "p(99)": 0.9231913200000004, + "max": 4.496023 + } + }, + "application_errors": { + "values": { + "count": 1, + "rate": 0.022473851749114416 + }, + "type": "counter", + "contains": "default" + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "rate": 164352.96338015492, + "count": 7313075 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.9998130491680688, + "passes": 5348, + "fails": 1 + } + } + }, + "setup_data": [ + { + "chat": "2096181b-7347-4f52-9877-38dcf7626fbd", + "token": "MkhHopatCzVIJJP55A4bVYa1J56tsMqYnR7HIDgp3xs" + }, + { + "chat": "6863a6a2-f16e-4410-b7f5-535923ea8ce7", + "token": "P3zw1mitDKQOBsAW8Z8vJFnJx_fLL2VkOocjxH3-HRw" + }, + { + "chat": "78c6fc5b-ee3f-4d80-8dd1-da4f67202900", + "token": "JdIAq6-ZbLRhPSe_5bbO0pc3lXly9_2099gFsUXO8a8" + }, + { + "chat": "b8cc94f1-7497-4f0f-838f-d61bec6bebab", + "token": "5gsJ5RlplTFccst4QPH3ReHomkZuWfe6MJABdXYJkJ0" + }, + { + "chat": "e598e172-972a-467c-9a55-11521b83ddf5", + "token": "znnTklaiBohaoyUlYYOZEHG8IGaT4F-i1aCk3cUrwaA" + }, + { + "chat": "cc0dffc5-927f-4350-bfe9-d932c3178782", + "token": "yRn1xXfKbWqWVFgbjAJbrXLB908-KjUED8mj9guZyDo" + }, + { + "token": "DfndjzqRJFxMRe8qkfhAAEdnWvearBmYk2XiXxt9toQ", + "chat": "5d0b989d-e8ab-433d-a00a-10a0a8881e72" + }, + { + "chat": "07a1712f-31ea-4a26-8739-b44e0be27f5a", + "token": "bqye58zLxKHwUelwQ2VDxzLCs4zlFA8KRiaZTjqSh2E" + }, + { + "chat": "6cac5a46-bfe7-417b-af3e-e1f5f9f7ffcc", + "token": "8_7Wj77-YpqrnBP3toyHbQfiQKNc8skgRtW23SysUNU" + }, + { + "chat": "1ada04d6-199f-4196-b972-1747f57d1943", + "token": "RbacBD2emJ_ug55jToknU7a_zCbkudODJ2Nc-vXvT7Y" + }, + { + "chat": "76788cd0-1caa-43e6-a94b-4f5ebd856f7b", + "token": "4JJPt-7lj6ldRaNtvURtDUNwpnR-Wkzb-BeyvvdnpOU" + }, + { + "chat": "71a08aff-e027-4214-be5a-b5e528f2ba81", + "token": "hYVOOG42pOdiAJNW3lQ0XGN7-vaE84NrH4peAZQHtiw" + }, + { + "chat": "247db151-7bb7-40b8-a0e0-989039068586", + "token": "7gLYI4o0Ch-lkugU93Lb-GmsJ_yTT2GELfcaoCWMa3M" + }, + { + "token": "naMlsXVyxi506YuEbrlB1KlxKhzmFcIK6I-8GVbeQg4", + "chat": "de6a3ff1-40cb-4775-94bf-0b8f7e38fc17" + }, + { + "chat": "8380aebb-ab7d-408b-a90e-899c74d0ee18", + "token": "dIS4cp9tMvPpzub6Utb-HfDcSNXEX3DP6N2CvTESR-s" + }, + { + "chat": "1c839183-b363-4036-be78-f1b6d2f52058", + "token": "PJvefc03aZWcEVDwXGTYKbgd6zxXvJv_hEsLJP6ENb4" + } + ] + } +} diff --git a/evidence/research-20261029-pool/load-saturation8-20261029112615.txt b/evidence/research-20261029-pool/load-saturation8-20261029112615.txt new file mode 100644 index 00000000..3006556d --- /dev/null +++ b/evidence/research-20261029-pool/load-saturation8-20261029112615.txt @@ -0,0 +1 @@ +{"profile":{"vus":8,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":2548,"fails":1},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":258,"fails":0},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":2542,"fails":0}]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":44496.155406},"metrics":{"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":81.307029,"p(95)":166.36112324999993,"p(99)":237.15225758000037,"max":1275.031493,"avg":93.26953639929187}},"http_reqs":{"type":"counter","contains":"default","values":{"count":5413,"rate":121.65095951795634}},"iterations":{"type":"counter","contains":"default","values":{"count":2542,"rate":57.12853114624885}},"measured_operations":{"values":{"count":4838,"rate":108.72849476221555},"type":"counter","contains":"default"},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"rate":0,"count":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":44.84286413947879,"p(50)":38.886697,"p(95)":82.91048659999998,"p(99)":115.32284432000009,"max":2052.970693}},"data_sent":{"type":"counter","contains":"data","values":{"rate":10971.015260661687,"count":488168}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0.009686436726399407,"p(50)":0,"p(95)":0,"p(99)":0,"max":13.339376}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":44.415045599852135,"p(50)":38.450137,"p(95)":82.30610899999996,"p(99)":114.75960772000006,"max":2052.638627}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.001549,"max":524.787416,"avg":0.10720693811195224,"p(50)":0.001253,"p(95)":0.0014533999999999997}},"http_req_sending":{"values":{"p(99)":0.5234946400000007,"max":3.323115,"avg":0.2039293212636244,"p(50)":0.188413,"p(95)":0.3335779999999999},"type":"trend","contains":"time"},"vus":{"type":"gauge","contains":"default","values":{"value":8,"min":0,"max":8}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":2302,"rate":51.734806726461386}},"vus_max":{"type":"gauge","contains":"default","values":{"value":8,"min":8,"max":8}},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":49.36489804385589,"p(50)":42.664478,"p(95)":86.18819210000001,"p(99)":124.96324370000004,"max":2052.970693}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.00018474043968224645,"passes":1,"fails":5412}},"failed_writes":{"type":"counter","contains":"default","values":{"count":1,"rate":0.022473851749114416}},"application_errors{status:429}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"count":0,"rate":0}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":1,"rate":0.022473851749114416},"thresholds":{"count>=0":{"ok":true}}},"http_req_duration{expected_response:true}":{"values":{"avg":44.47181317331831,"p(50)":38.88601,"p(95)":82.83867274999997,"p(99)":114.66379769000001,"max":1092.417083},"type":"trend","contains":"time"},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":1.238689,"avg":0.0018240181045630888,"p(50)":0,"p(95)":0}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":2303,"rate":51.757280578210505}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.22388921836319944,"p(50)":0.180869,"p(95)":0.4766992,"p(99)":0.9231913200000004,"max":4.496023}},"application_errors":{"values":{"count":1,"rate":0.022473851749114416},"type":"counter","contains":"default"},"data_received":{"type":"counter","contains":"data","values":{"rate":164352.96338015492,"count":7313075}},"checks":{"type":"rate","contains":"default","values":{"rate":0.9998130491680688,"passes":5348,"fails":1}}},"setup_data":[{"chat":"2096181b-7347-4f52-9877-38dcf7626fbd","token":"MkhHopatCzVIJJP55A4bVYa1J56tsMqYnR7HIDgp3xs"},{"chat":"6863a6a2-f16e-4410-b7f5-535923ea8ce7","token":"P3zw1mitDKQOBsAW8Z8vJFnJx_fLL2VkOocjxH3-HRw"},{"chat":"78c6fc5b-ee3f-4d80-8dd1-da4f67202900","token":"JdIAq6-ZbLRhPSe_5bbO0pc3lXly9_2099gFsUXO8a8"},{"chat":"b8cc94f1-7497-4f0f-838f-d61bec6bebab","token":"5gsJ5RlplTFccst4QPH3ReHomkZuWfe6MJABdXYJkJ0"},{"chat":"e598e172-972a-467c-9a55-11521b83ddf5","token":"znnTklaiBohaoyUlYYOZEHG8IGaT4F-i1aCk3cUrwaA"},{"chat":"cc0dffc5-927f-4350-bfe9-d932c3178782","token":"yRn1xXfKbWqWVFgbjAJbrXLB908-KjUED8mj9guZyDo"},{"token":"DfndjzqRJFxMRe8qkfhAAEdnWvearBmYk2XiXxt9toQ","chat":"5d0b989d-e8ab-433d-a00a-10a0a8881e72"},{"chat":"07a1712f-31ea-4a26-8739-b44e0be27f5a","token":"bqye58zLxKHwUelwQ2VDxzLCs4zlFA8KRiaZTjqSh2E"},{"chat":"6cac5a46-bfe7-417b-af3e-e1f5f9f7ffcc","token":"8_7Wj77-YpqrnBP3toyHbQfiQKNc8skgRtW23SysUNU"},{"chat":"1ada04d6-199f-4196-b972-1747f57d1943","token":"RbacBD2emJ_ug55jToknU7a_zCbkudODJ2Nc-vXvT7Y"},{"chat":"76788cd0-1caa-43e6-a94b-4f5ebd856f7b","token":"4JJPt-7lj6ldRaNtvURtDUNwpnR-Wkzb-BeyvvdnpOU"},{"chat":"71a08aff-e027-4214-be5a-b5e528f2ba81","token":"hYVOOG42pOdiAJNW3lQ0XGN7-vaE84NrH4peAZQHtiw"},{"chat":"247db151-7bb7-40b8-a0e0-989039068586","token":"7gLYI4o0Ch-lkugU93Lb-GmsJ_yTT2GELfcaoCWMa3M"},{"token":"naMlsXVyxi506YuEbrlB1KlxKhzmFcIK6I-8GVbeQg4","chat":"de6a3ff1-40cb-4775-94bf-0b8f7e38fc17"},{"chat":"8380aebb-ab7d-408b-a90e-899c74d0ee18","token":"dIS4cp9tMvPpzub6Utb-HfDcSNXEX3DP6N2CvTESR-s"},{"chat":"1c839183-b363-4036-be78-f1b6d2f52058","token":"PJvefc03aZWcEVDwXGTYKbgd6zxXvJv_hEsLJP6ENb4"}]}} diff --git a/evidence/research-20261029-pool/load-single32a-20261029113131.json b/evidence/research-20261029-pool/load-single32a-20261029113131.json new file mode 100644 index 00000000..7280ef98 --- /dev/null +++ b/evidence/research-20261029-pool/load-single32a-20261029113131.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "setup_data": [ + { + "chat": "1f7aef4d-e209-4cb3-9101-07636d52aa29", + "token": "s6_cnZNC6Vk_EwF0jzYlmqfliqCQXHbeBA0A6N2PfM4" + }, + { + "chat": "b2013cda-8046-4286-b647-f8dbc49986cf", + "token": "e9Oo7Svhu8XxJov_1uFKejSy0imb9Krh4bKcwdAE4WM" + }, + { + "chat": "95744e14-45b2-4428-aa64-f86a22b31fef", + "token": "wkW05KxTnyBt_vUcU0sFP7KuimbMJO7fUcUPtpIRDWU" + }, + { + "chat": "93562667-8124-4a22-922e-3fa477e68cde", + "token": "f1MSAoegWK-c2eU0BaT3iD6eNgLo35F0y_ltx8TI1F0" + }, + { + "chat": "687b8fe6-bb6e-46ff-b19e-83973c3c84e6", + "token": "vEytMwx5EYzPTBeEPkyHV-cKvsm8mUwDA9LP9yHx12c" + }, + { + "chat": "b6003308-9f2d-44bf-b189-d8202f9d115a", + "token": "PziJQF33OMYNj-mWY-btdkcH4ZTwYJcfNGbC_DkfTgk" + }, + { + "chat": "5c7850be-dc4f-4d67-9b0b-c915cb5f086d", + "token": "HZwBQMS2ikdjoVSNkwgf3p6kGjkwcdCkBrHqwfsBH6M" + }, + { + "chat": "460a90c5-3d0a-4be1-afd5-a4eb5d756d94", + "token": "wYOJ0X69QPhD60yngXjKxkPtes8wlz5LgpzpL860bi0" + }, + { + "chat": "05c75c94-afb0-4365-8d33-8860c966c167", + "token": "nc0Pcb4F8olAT1dovJ3G42k98Unu1qLvjpczcIIeHc0" + }, + { + "chat": "e01c5e76-7697-4065-b7b3-2b1e8855f7be", + "token": "9pc36q-73Bmd8nGUYbifcAGnXsWPEvwyccCeJ1CDsPQ" + }, + { + "chat": "121111c5-2851-4b51-a928-7ce5053d37f7", + "token": "Q7iv0U0dzVUCCpQanNKIi2wLFS_ILNXk-rC73No_nPk" + }, + { + "chat": "9dc4db0c-34db-4daf-86ac-4dff665f40e2", + "token": "h10YjEdDxgRy9_YuDGVSDEXq7cJDcpojYQmb8rUtOb4" + }, + { + "chat": "7b40a5f3-bd1c-48a2-ac7b-ea6e074127d5", + "token": "KhxysVXCzeSfWJxd9FO5QOD8ukDM1jcXQGfCejTndxI" + }, + { + "chat": "14ea7e8f-45c8-4061-a0ec-6e10682be23c", + "token": "AsxjBC447BCDR23i3zOeX4GRWFElEBlEnWVKXB797yI" + }, + { + "chat": "83c3167d-1f70-47f7-98d7-3d4a48ad29c7", + "token": "4vhLxS32wO06qyLb-7SZ9X_pui5FeFJqXMkBB74EJXk" + }, + { + "chat": "c596e8a5-55f8-4ff3-bbd4-00654c587400", + "token": "mWVNVQ8oF5KmBGeGrjd0CkmzOc_5EBdlTxppKYc_GXc" + } + ], + "root_group": { + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 3931, + "fails": 8060 + }, + { + "passes": 400, + "fails": 17, + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa" + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 3906, + "fails": 8066 + } + ], + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 44842.65356 + }, + "metrics": { + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 39.06036981365562, + "p(50)": 3.2344475, + "p(95)": 105.18951534999998, + "p(99)": 287.34505665999984, + "max": 8122.032008 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 12737980, + "rate": 284059.46099858766 + } + }, + "failed_writes": { + "type": "counter", + "contains": "default", + "values": { + "count": 8060, + "rate": 179.73958631184982 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.6604074619538537, + "passes": 16143, + "fails": 8301 + } + }, + "checks": { + "contains": "default", + "values": { + "passes": 8237, + "fails": 16143, + "rate": 0.3378589007383101 + }, + "type": "rate" + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "rate": 260.087195428673, + "count": 11663 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 33.014506677441474, + "p(50)": 3.862274, + "p(95)": 112.4937897, + "p(99)": 285.82339131999726, + "max": 4000.720837 + } + }, + "data_sent": { + "contains": "data", + "values": { + "rate": 45776.840508632915, + "count": 2052755 + }, + "type": "counter" + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 81.42232875384275, + "p(50)": 8.675885999999998, + "p(95)": 210.68181255000002, + "p(99)": 426.03982260999425, + "max": 9971.131023 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.11338658042873442, + "p(50)": 0.049141, + "p(95)": 0.2631546499999999, + "p(99)": 0.6317369199999996, + "max": 30.337725 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.6598465278596017, + "p(50)": 0.203021, + "p(95)": 2.0599633499999968, + "p(99)": 9.596218509999973, + "max": 37.518641 + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 39.83360292194396, + "p(50)": 4.1182865, + "p(95)": 105.72540494999998, + "p(99)": 287.4872817199998, + "max": 8124.000618 + } + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 23709, + "rate": 528.7153662366808 + } + }, + "http_req_tls_handshaking": { + "contains": "time", + "values": { + "avg": 0.04315409998363607, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 49.002345 + }, + "type": "trend" + }, + "application_errors{status:0}": { + "contains": "default", + "values": { + "rate": 0, + "count": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter" + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 16143, + "rate": 359.99207715039597 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 11972, + "rate": 266.97795624385435 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 3603, + "rate": 80.3476091168232 + } + }, + "application_errors{status:503}": { + "contains": "default", + "values": { + "count": 16127, + "rate": 359.63527400138986 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter" + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 24444, + "rate": 545.106010894151 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 527.492637, + "max": 7139.052029, + "avg": 98.81347999373571, + "p(50)": 68.791863, + "p(95)": 137.080146 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0.001323, + "p(99)": 0.001476, + "max": 524.850614, + "avg": 0.06827082895598355, + "p(50)": 0.000269 + } + }, + "http_req_connecting": { + "values": { + "avg": 0.0032163699885452463, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 4.782629 + }, + "type": "trend", + "contains": "time" + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + } + } + } +} diff --git a/evidence/research-20261029-pool/load-single32a-20261029113131.txt b/evidence/research-20261029-pool/load-single32a-20261029113131.txt new file mode 100644 index 00000000..3798ec5a --- /dev/null +++ b/evidence/research-20261029-pool/load-single32a-20261029113131.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"setup_data":[{"chat":"1f7aef4d-e209-4cb3-9101-07636d52aa29","token":"s6_cnZNC6Vk_EwF0jzYlmqfliqCQXHbeBA0A6N2PfM4"},{"chat":"b2013cda-8046-4286-b647-f8dbc49986cf","token":"e9Oo7Svhu8XxJov_1uFKejSy0imb9Krh4bKcwdAE4WM"},{"chat":"95744e14-45b2-4428-aa64-f86a22b31fef","token":"wkW05KxTnyBt_vUcU0sFP7KuimbMJO7fUcUPtpIRDWU"},{"chat":"93562667-8124-4a22-922e-3fa477e68cde","token":"f1MSAoegWK-c2eU0BaT3iD6eNgLo35F0y_ltx8TI1F0"},{"chat":"687b8fe6-bb6e-46ff-b19e-83973c3c84e6","token":"vEytMwx5EYzPTBeEPkyHV-cKvsm8mUwDA9LP9yHx12c"},{"chat":"b6003308-9f2d-44bf-b189-d8202f9d115a","token":"PziJQF33OMYNj-mWY-btdkcH4ZTwYJcfNGbC_DkfTgk"},{"chat":"5c7850be-dc4f-4d67-9b0b-c915cb5f086d","token":"HZwBQMS2ikdjoVSNkwgf3p6kGjkwcdCkBrHqwfsBH6M"},{"chat":"460a90c5-3d0a-4be1-afd5-a4eb5d756d94","token":"wYOJ0X69QPhD60yngXjKxkPtes8wlz5LgpzpL860bi0"},{"chat":"05c75c94-afb0-4365-8d33-8860c966c167","token":"nc0Pcb4F8olAT1dovJ3G42k98Unu1qLvjpczcIIeHc0"},{"chat":"e01c5e76-7697-4065-b7b3-2b1e8855f7be","token":"9pc36q-73Bmd8nGUYbifcAGnXsWPEvwyccCeJ1CDsPQ"},{"chat":"121111c5-2851-4b51-a928-7ce5053d37f7","token":"Q7iv0U0dzVUCCpQanNKIi2wLFS_ILNXk-rC73No_nPk"},{"chat":"9dc4db0c-34db-4daf-86ac-4dff665f40e2","token":"h10YjEdDxgRy9_YuDGVSDEXq7cJDcpojYQmb8rUtOb4"},{"chat":"7b40a5f3-bd1c-48a2-ac7b-ea6e074127d5","token":"KhxysVXCzeSfWJxd9FO5QOD8ukDM1jcXQGfCejTndxI"},{"chat":"14ea7e8f-45c8-4061-a0ec-6e10682be23c","token":"AsxjBC447BCDR23i3zOeX4GRWFElEBlEnWVKXB797yI"},{"chat":"83c3167d-1f70-47f7-98d7-3d4a48ad29c7","token":"4vhLxS32wO06qyLb-7SZ9X_pui5FeFJqXMkBB74EJXk"},{"chat":"c596e8a5-55f8-4ff3-bbd4-00654c587400","token":"mWVNVQ8oF5KmBGeGrjd0CkmzOc_5EBdlTxppKYc_GXc"}],"root_group":{"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":3931,"fails":8060},{"passes":400,"fails":17,"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa"},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":3906,"fails":8066}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":44842.65356},"metrics":{"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":39.06036981365562,"p(50)":3.2344475,"p(95)":105.18951534999998,"p(99)":287.34505665999984,"max":8122.032008}},"data_received":{"type":"counter","contains":"data","values":{"count":12737980,"rate":284059.46099858766}},"failed_writes":{"type":"counter","contains":"default","values":{"count":8060,"rate":179.73958631184982}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.6604074619538537,"passes":16143,"fails":8301}},"checks":{"contains":"default","values":{"passes":8237,"fails":16143,"rate":0.3378589007383101},"type":"rate"},"attempted_messages":{"type":"counter","contains":"default","values":{"rate":260.087195428673,"count":11663}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":33.014506677441474,"p(50)":3.862274,"p(95)":112.4937897,"p(99)":285.82339131999726,"max":4000.720837}},"data_sent":{"contains":"data","values":{"rate":45776.840508632915,"count":2052755},"type":"counter"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":81.42232875384275,"p(50)":8.675885999999998,"p(95)":210.68181255000002,"p(99)":426.03982260999425,"max":9971.131023}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.11338658042873442,"p(50)":0.049141,"p(95)":0.2631546499999999,"p(99)":0.6317369199999996,"max":30.337725}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.6598465278596017,"p(50)":0.203021,"p(95)":2.0599633499999968,"p(99)":9.596218509999973,"max":37.518641}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":39.83360292194396,"p(50)":4.1182865,"p(95)":105.72540494999998,"p(99)":287.4872817199998,"max":8124.000618}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"measured_operations":{"type":"counter","contains":"default","values":{"count":23709,"rate":528.7153662366808}},"http_req_tls_handshaking":{"contains":"time","values":{"avg":0.04315409998363607,"p(50)":0,"p(95)":0,"p(99)":0,"max":49.002345},"type":"trend"},"application_errors{status:0}":{"contains":"default","values":{"rate":0,"count":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter"},"application_errors":{"type":"counter","contains":"default","values":{"count":16143,"rate":359.99207715039597}},"iterations":{"type":"counter","contains":"default","values":{"count":11972,"rate":266.97795624385435}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":3603,"rate":80.3476091168232}},"application_errors{status:503}":{"contains":"default","values":{"count":16127,"rate":359.63527400138986},"thresholds":{"count>=0":{"ok":true}},"type":"counter"},"http_reqs":{"type":"counter","contains":"default","values":{"count":24444,"rate":545.106010894151}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":527.492637,"max":7139.052029,"avg":98.81347999373571,"p(50)":68.791863,"p(95)":137.080146}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.001323,"p(99)":0.001476,"max":524.850614,"avg":0.06827082895598355,"p(50)":0.000269}},"http_req_connecting":{"values":{"avg":0.0032163699885452463,"p(50)":0,"p(95)":0,"p(99)":0,"max":4.782629},"type":"trend","contains":"time"},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}}}}} diff --git a/evidence/research-20261029-pool/load-single32b-20261029113452.json b/evidence/research-20261029-pool/load-single32b-20261029113452.json new file mode 100644 index 00000000..6d1f56e1 --- /dev/null +++ b/evidence/research-20261029-pool/load-single32b-20261029113452.json @@ -0,0 +1,373 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 5207, + "fails": 0, + "name": "message confirmed", + "path": "::message confirmed" + }, + { + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 531, + "fails": 0, + "name": "retry returns original", + "path": "::retry returns original" + }, + { + "passes": 5190, + "fails": 0, + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8" + } + ], + "name": "", + "path": "" + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 48673.739253 + }, + "metrics": { + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 5190, + "rate": 106.62833962730971 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 4952, + "rate": 101.73863927445812 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 4952, + "rate": 101.73863927445812 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 15043309, + "rate": 309064.173635947 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 0.0016582599999999893, + "max": 1012.379068, + "avg": 0.1996732418371928, + "p(50)": 0.001203, + "p(95)": 0.0014132999999999993 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 188.29500669788078, + "p(50)": 180.589137, + "p(95)": 295.59766025000005, + "p(99)": 412.67946847999997, + "max": 1761.617317 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 47.890406, + "avg": 0.09781442401091403 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 88.45134501045892, + "p(50)": 82.841394, + "p(95)": 140.58404829999986, + "p(99)": 217.11189321999984, + "max": 1545.446105 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "avg": 88.98811769068436, + "p(50)": 83.373051, + "p(95)": 141.24850055, + "p(99)": 217.5468004100001, + "max": 1546.268579 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 1002112, + "rate": 20588.350420154642 + } + }, + "http_reqs": { + "values": { + "count": 10995, + "rate": 225.89182932606363 + }, + "type": "counter", + "contains": "default" + }, + "http_req_sending": { + "contains": "time", + "values": { + "avg": 0.20672665948158267, + "p(50)": 0.178569, + "p(95)": 0.41804149999999995, + "p(99)": 0.9532230199999941, + "max": 6.672115 + }, + "type": "trend" + }, + "http_req_receiving": { + "values": { + "max": 17.954545, + "avg": 0.30640277671668886, + "p(50)": 0.172578, + "p(95)": 0.9733099999999997, + "p(99)": 2.304030539999989 + }, + "type": "trend", + "contains": "time" + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_failed": { + "values": { + "rate": 0.00027285129604365623, + "passes": 3, + "fails": 10992 + }, + "type": "rate", + "contains": "default" + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "checks": { + "contains": "default", + "values": { + "passes": 10928, + "fails": 0, + "rate": 1 + }, + "type": "rate" + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 83.352359, + "p(95)": 141.24837169999998, + "p(99)": 217.53314593999977, + "max": 1546.268579, + "avg": 88.9644744466578 + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 103.69006572051723, + "p(50)": 98.00462, + "p(95)": 169.04933884999997, + "p(99)": 243.31071381999948, + "max": 1546.268579 + } + }, + "measured_operations": { + "contains": "default", + "values": { + "count": 10406, + "rate": 213.79084820072924 + }, + "type": "counter" + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "max": 7.785228, + "avg": 0.007946846202819463, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0 + } + } + }, + "setup_data": [ + { + "chat": "95b1d11a-1100-4ba4-8bca-cf5f053f4fc6", + "token": "dnVhnopM09y0U5lI54ybRVRNpyG7KAzoQ_vXYf1kJZk" + }, + { + "chat": "b6a38c61-49a6-4d87-a430-d32dc1bd33a1", + "token": "Xzs2G2N-qg58Rk9TM1NXa4ecJLtP35TU2wSsYcGX-WY" + }, + { + "token": "3vqRI1XD4_CtkrWoDwG6g0lVS-kh1imy_NCE7JbUbm0", + "chat": "47440d28-70db-4cfa-b455-202db1f7cde6" + }, + { + "chat": "b1c48fa5-b212-4828-8a83-8735d4493eae", + "token": "M7G3i_d8vdKVG57APESHEIGZQKOHgytoi64HA8IhrZ8" + }, + { + "chat": "996e7faa-61b9-47df-be99-81870af3e211", + "token": "mwlQ-hx4_At39LazvsHd9WXmJEu3t5rksDiv0UNFL3c" + }, + { + "chat": "a2ffa145-62c3-4dd6-9ff7-6e4324a316d4", + "token": "NN8AOJJHSq6nlK4IkWNALeCLrqn6bthoP7mxAN3sS78" + }, + { + "chat": "7aa3db5d-b368-4c0c-8688-8e15ea7a95aa", + "token": "K4qAaDjhKV6KYC9BthRp_Lsh87sH8E9m9iwJpjX8YPY" + }, + { + "chat": "7cf94097-a462-4677-a55c-68907ea5de61", + "token": "8QQJBXB1Goy6Be6FL3yn1wVQa664RzNojqsTulnHaKw" + }, + { + "chat": "de617d62-4b74-4468-92e6-42080831975c", + "token": "esjGT8OGxvSuYuty_5LXjvmFGyPW3luqVoBP4Ejbohw" + }, + { + "chat": "a7b92e3c-f5cb-4378-a25e-abaf97dd9537", + "token": "HyDtjfNuv17CWv4JVqaatQDvqDQpoDjLKh01h8p_2XU" + }, + { + "chat": "8dd71c04-599f-42eb-a699-92978ed7465d", + "token": "cFlz7Wq4WB9CPCB0-fLUZUJzMPLtS2NN1uP8cdmTRJE" + }, + { + "chat": "8871bb64-3a75-42e4-9e00-e0413aef118f", + "token": "vTOR5Ws53F38L2SS3ozGgaibiiRwHxbiewW9Y39_KE0" + }, + { + "chat": "0696da39-a37c-4489-af18-ff3898e1f2c6", + "token": "KHB1zJLHXYl4HiEYoax7BVO8hJVUYxHm848f3dmfl5A" + }, + { + "token": "ITAs4nvB8KgyzWH3U9RfwddFHMDlwS34tMjnvByZEjg", + "chat": "b19235bf-cb60-49db-aeff-63ca28ddcc86" + }, + { + "chat": "49736b91-60e1-45fd-a087-987a7ff96896", + "token": "_u9gyt4CUkVaXYVbP9T5bLNnb-8zAuBaay1_k8QQCPk" + }, + { + "chat": "b366238e-bfb4-4915-b274-a775a676c1d8", + "token": "HCVdiMgyy3p0Q-S_TBZPJhAbyyUaFEOv7s78nz2Ppa0" + } + ] + } +} diff --git a/evidence/research-20261029-pool/load-single32b-20261029113452.txt b/evidence/research-20261029-pool/load-single32b-20261029113452.txt new file mode 100644 index 00000000..ffabd878 --- /dev/null +++ b/evidence/research-20261029-pool/load-single32b-20261029113452.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":5207,"fails":0,"name":"message confirmed","path":"::message confirmed"},{"id":"f737ff9008ff036f7a4b775b05a953fa","passes":531,"fails":0,"name":"retry returns original","path":"::retry returns original"},{"passes":5190,"fails":0,"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8"}],"name":"","path":""},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":48673.739253},"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":5190,"rate":106.62833962730971}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":4952,"rate":101.73863927445812}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":4952,"rate":101.73863927445812}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"data_received":{"type":"counter","contains":"data","values":{"count":15043309,"rate":309064.173635947}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.0016582599999999893,"max":1012.379068,"avg":0.1996732418371928,"p(50)":0.001203,"p(95)":0.0014132999999999993}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":188.29500669788078,"p(50)":180.589137,"p(95)":295.59766025000005,"p(99)":412.67946847999997,"max":1761.617317}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":47.890406,"avg":0.09781442401091403}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":88.45134501045892,"p(50)":82.841394,"p(95)":140.58404829999986,"p(99)":217.11189321999984,"max":1545.446105}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":88.98811769068436,"p(50)":83.373051,"p(95)":141.24850055,"p(99)":217.5468004100001,"max":1546.268579}},"data_sent":{"type":"counter","contains":"data","values":{"count":1002112,"rate":20588.350420154642}},"http_reqs":{"values":{"count":10995,"rate":225.89182932606363},"type":"counter","contains":"default"},"http_req_sending":{"contains":"time","values":{"avg":0.20672665948158267,"p(50)":0.178569,"p(95)":0.41804149999999995,"p(99)":0.9532230199999941,"max":6.672115},"type":"trend"},"http_req_receiving":{"values":{"max":17.954545,"avg":0.30640277671668886,"p(50)":0.172578,"p(95)":0.9733099999999997,"p(99)":2.304030539999989},"type":"trend","contains":"time"},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_failed":{"values":{"rate":0.00027285129604365623,"passes":3,"fails":10992},"type":"rate","contains":"default"},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"checks":{"contains":"default","values":{"passes":10928,"fails":0,"rate":1},"type":"rate"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(50)":83.352359,"p(95)":141.24837169999998,"p(99)":217.53314593999977,"max":1546.268579,"avg":88.9644744466578}},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":103.69006572051723,"p(50)":98.00462,"p(95)":169.04933884999997,"p(99)":243.31071381999948,"max":1546.268579}},"measured_operations":{"contains":"default","values":{"count":10406,"rate":213.79084820072924},"type":"counter"},"http_req_connecting":{"type":"trend","contains":"time","values":{"max":7.785228,"avg":0.007946846202819463,"p(50)":0,"p(95)":0,"p(99)":0}}},"setup_data":[{"chat":"95b1d11a-1100-4ba4-8bca-cf5f053f4fc6","token":"dnVhnopM09y0U5lI54ybRVRNpyG7KAzoQ_vXYf1kJZk"},{"chat":"b6a38c61-49a6-4d87-a430-d32dc1bd33a1","token":"Xzs2G2N-qg58Rk9TM1NXa4ecJLtP35TU2wSsYcGX-WY"},{"token":"3vqRI1XD4_CtkrWoDwG6g0lVS-kh1imy_NCE7JbUbm0","chat":"47440d28-70db-4cfa-b455-202db1f7cde6"},{"chat":"b1c48fa5-b212-4828-8a83-8735d4493eae","token":"M7G3i_d8vdKVG57APESHEIGZQKOHgytoi64HA8IhrZ8"},{"chat":"996e7faa-61b9-47df-be99-81870af3e211","token":"mwlQ-hx4_At39LazvsHd9WXmJEu3t5rksDiv0UNFL3c"},{"chat":"a2ffa145-62c3-4dd6-9ff7-6e4324a316d4","token":"NN8AOJJHSq6nlK4IkWNALeCLrqn6bthoP7mxAN3sS78"},{"chat":"7aa3db5d-b368-4c0c-8688-8e15ea7a95aa","token":"K4qAaDjhKV6KYC9BthRp_Lsh87sH8E9m9iwJpjX8YPY"},{"chat":"7cf94097-a462-4677-a55c-68907ea5de61","token":"8QQJBXB1Goy6Be6FL3yn1wVQa664RzNojqsTulnHaKw"},{"chat":"de617d62-4b74-4468-92e6-42080831975c","token":"esjGT8OGxvSuYuty_5LXjvmFGyPW3luqVoBP4Ejbohw"},{"chat":"a7b92e3c-f5cb-4378-a25e-abaf97dd9537","token":"HyDtjfNuv17CWv4JVqaatQDvqDQpoDjLKh01h8p_2XU"},{"chat":"8dd71c04-599f-42eb-a699-92978ed7465d","token":"cFlz7Wq4WB9CPCB0-fLUZUJzMPLtS2NN1uP8cdmTRJE"},{"chat":"8871bb64-3a75-42e4-9e00-e0413aef118f","token":"vTOR5Ws53F38L2SS3ozGgaibiiRwHxbiewW9Y39_KE0"},{"chat":"0696da39-a37c-4489-af18-ff3898e1f2c6","token":"KHB1zJLHXYl4HiEYoax7BVO8hJVUYxHm848f3dmfl5A"},{"token":"ITAs4nvB8KgyzWH3U9RfwddFHMDlwS34tMjnvByZEjg","chat":"b19235bf-cb60-49db-aeff-63ca28ddcc86"},{"chat":"49736b91-60e1-45fd-a087-987a7ff96896","token":"_u9gyt4CUkVaXYVbP9T5bLNnb-8zAuBaay1_k8QQCPk"},{"chat":"b366238e-bfb4-4915-b274-a775a676c1d8","token":"HCVdiMgyy3p0Q-S_TBZPJhAbyyUaFEOv7s78nz2Ppa0"}]}} diff --git a/evidence/research-20261029-pool/load-single8a-20261029112953.json b/evidence/research-20261029-pool/load-single8a-20261029112953.json new file mode 100644 index 00000000..6a805673 --- /dev/null +++ b/evidence/research-20261029-pool/load-single8a-20261029112953.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 2786, + "fails": 17 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 301, + "fails": 1 + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 2763, + "fails": 5 + } + ] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "testRunDurationMs": 44805.120762, + "isStdOutTTY": false, + "isStdErrTTY": false + }, + "metrics": { + "http_req_waiting": { + "values": { + "max": 3991.052813, + "avg": 144.27892149098923, + "p(50)": 117.43528, + "p(95)": 226.8627668, + "p(99)": 379.59154308000063 + }, + "type": "trend", + "contains": "time" + }, + "data_sent": { + "values": { + "count": 552878, + "rate": 12339.616333963893 + }, + "type": "counter", + "contains": "data" + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 162.40502755146775, + "p(50)": 131.492881, + "p(95)": 237.366661, + "p(99)": 553.4051984999999, + "max": 3991.163753 + } + }, + "application_errors": { + "values": { + "count": 23, + "rate": 0.5133341816479758 + }, + "type": "counter", + "contains": "default" + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.996083773199387, + "passes": 5850, + "fails": 23 + } + }, + "iterations": { + "values": { + "count": 2768, + "rate": 61.77865281746074 + }, + "type": "counter", + "contains": "default" + }, + "failed_writes": { + "type": "counter", + "contains": "default", + "values": { + "count": 17, + "rate": 0.379420916870243 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.23495133383863956, + "p(50)": 0.183692, + "p(95)": 0.5354176, + "p(99)": 0.9436969600000021, + "max": 5.828276 + } + }, + "confirmed_messages": { + "values": { + "count": 2674, + "rate": 59.68067833594292 + }, + "type": "counter", + "contains": "default" + }, + "attempted_messages": { + "values": { + "count": 2691, + "rate": 60.06009925281317 + }, + "type": "counter", + "contains": "default" + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.019624694290045475, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 4.547988 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.07394712851608556, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 22.777269 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 5670, + "rate": 126.54803521495751 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 144.70494467727787, + "p(50)": 117.909319, + "p(95)": 227.304696, + "p(99)": 380.73643128000015, + "max": 3991.163753 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 752.7566454499984, + "max": 2456.465011, + "avg": 283.4518053338147, + "p(50)": 252.35518000000002, + "p(95)": 528.1196388500002 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0.185113, + "p(95)": 0.314398, + "p(99)": 0.5401648400000005, + "max": 3.375927, + "avg": 0.1910718524507325 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 8028303, + "rate": 179182.71089247777 + } + }, + "http_req_blocked": { + "values": { + "avg": 0.09645306147886099, + "p(50)": 0.001271, + "p(95)": 0.001478, + "p(99)": 0.001778, + "max": 26.982082 + }, + "type": "trend", + "contains": "time" + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 5937, + "rate": 132.5071754975666 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 225.2452824, + "p(99)": 341.31000787999983, + "max": 1952.145937, + "avg": 132.4036514000674, + "p(50)": 117.4035095 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.0038740104429846726, + "passes": 23, + "fails": 5914 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + } + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 8, + "rate": 0.17855101970364376 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + } + }, + "setup_data": [ + { + "chat": "e342dd36-2381-41c5-8d33-67bfa1d6137f", + "token": "KnJ_NAQZgcB7Y6Jarch6Lm1fs1AkOG29DmpLpI5bhuc" + }, + { + "chat": "2f068379-3e8b-4eb2-a89a-2762ae6389ab", + "token": "nimwYwBhwv6Y0eTQW6XTMthK0Yxx2tTwUXAfwW0WpPs" + }, + { + "token": "_OBF8YP4-fdYgkIDI8t2FUrsCoBRh5rDnxP2Gea2jBU", + "chat": "4036bfbc-9383-462d-86de-6214c34947dc" + }, + { + "chat": "3aa8c160-a929-4820-9768-f41dc92312d0", + "token": "rWgfGObXKMqSPz_kVWikWV1uAFRjU805fxG6EqQz6GY" + }, + { + "chat": "99182e04-ce42-4c09-9376-e3c2b77350c6", + "token": "S9THhCwiOJRa0TjLBLVqQH0x_x0vK--2agooKd4VLDk" + }, + { + "chat": "655cf77d-2701-4130-977b-2c465640d4aa", + "token": "NIlT82jsXQab9nBjnFEOt6UVZBiQ-EBR7jRXJh-bxxw" + }, + { + "chat": "fc186d2f-48f3-467b-ac27-e0ec49c8d5c8", + "token": "OezRKa2GNX4BVIk-Dqpv7nUyJ6NLDPGJYL7fRIs1EhE" + }, + { + "chat": "6aa67232-a9bc-45d0-a983-158a8dbfc9f8", + "token": "L7m9C8wXV0YRGk6vw1VohLLsy_BIxLEUk-TYAuyUpZw" + }, + { + "token": "KkBR1-2NVyEUJ4dENkRPSfxohXPdMBztdyv2IFJwVZA", + "chat": "f1693256-5dd9-48e8-9077-b91c93a57d29" + }, + { + "chat": "aa5fb30b-5b6e-421f-baf1-87cf1bff03c4", + "token": "sIW-gcPbXg6PxmqOuU66QoG_tjTxJwp3phea-2PiQ1U" + }, + { + "chat": "196c0b29-bf55-41ca-b979-18cf95146c3c", + "token": "g9fQ54y2kDuQ5rpzrlhhZTnlVNhkg0hqiHctXwdEtl0" + }, + { + "chat": "74df4a77-93ff-4629-b3ec-d06a4a54fa46", + "token": "qOPSdnvYXF_Yzqhg-8B_-hYGTRWhSRk5of5EADxiy5I" + }, + { + "chat": "3a819f5c-2b86-43de-ac71-1c46f385fc95", + "token": "T1LNa86HH8FB-zofEAAYFWbu_wj89zxUvI6rBYSK6Fs" + }, + { + "token": "XtbfTqdvWjUA1K2UvsjoegyJRDgdb6xEf0yVAytnt_8", + "chat": "e765a069-1e88-4829-8b78-0b763a0c8a2e" + }, + { + "token": "PpFGA8JAXIeMdYNO7lJUca5R41JX0OKSofRqw4DZiyU", + "chat": "23b91e1f-6cb5-4cf9-8935-cbdb9289156c" + }, + { + "chat": "828e93a1-57d6-442d-8b69-abd489d1cb8b", + "token": "pSG6AIANqIzZtCIny0I9-klUgQVz2gGVgCU3n0-2bKM" + } + ] + } +} diff --git a/evidence/research-20261029-pool/load-single8a-20261029112953.txt b/evidence/research-20261029-pool/load-single8a-20261029112953.txt new file mode 100644 index 00000000..1f386f77 --- /dev/null +++ b/evidence/research-20261029-pool/load-single8a-20261029112953.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":2786,"fails":17},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":301,"fails":1},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":2763,"fails":5}]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"testRunDurationMs":44805.120762,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"http_req_waiting":{"values":{"max":3991.052813,"avg":144.27892149098923,"p(50)":117.43528,"p(95)":226.8627668,"p(99)":379.59154308000063},"type":"trend","contains":"time"},"data_sent":{"values":{"count":552878,"rate":12339.616333963893},"type":"counter","contains":"data"},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":162.40502755146775,"p(50)":131.492881,"p(95)":237.366661,"p(99)":553.4051984999999,"max":3991.163753}},"application_errors":{"values":{"count":23,"rate":0.5133341816479758},"type":"counter","contains":"default"},"checks":{"type":"rate","contains":"default","values":{"rate":0.996083773199387,"passes":5850,"fails":23}},"iterations":{"values":{"count":2768,"rate":61.77865281746074},"type":"counter","contains":"default"},"failed_writes":{"type":"counter","contains":"default","values":{"count":17,"rate":0.379420916870243}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.23495133383863956,"p(50)":0.183692,"p(95)":0.5354176,"p(99)":0.9436969600000021,"max":5.828276}},"confirmed_messages":{"values":{"count":2674,"rate":59.68067833594292},"type":"counter","contains":"default"},"attempted_messages":{"values":{"count":2691,"rate":60.06009925281317},"type":"counter","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.019624694290045475,"p(50)":0,"p(95)":0,"p(99)":0,"max":4.547988}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0.07394712851608556,"p(50)":0,"p(95)":0,"p(99)":0,"max":22.777269}},"measured_operations":{"type":"counter","contains":"default","values":{"count":5670,"rate":126.54803521495751}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":144.70494467727787,"p(50)":117.909319,"p(95)":227.304696,"p(99)":380.73643128000015,"max":3991.163753}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":752.7566454499984,"max":2456.465011,"avg":283.4518053338147,"p(50)":252.35518000000002,"p(95)":528.1196388500002}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.185113,"p(95)":0.314398,"p(99)":0.5401648400000005,"max":3.375927,"avg":0.1910718524507325}},"data_received":{"type":"counter","contains":"data","values":{"count":8028303,"rate":179182.71089247777}},"http_req_blocked":{"values":{"avg":0.09645306147886099,"p(50)":0.001271,"p(95)":0.001478,"p(99)":0.001778,"max":26.982082},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":5937,"rate":132.5071754975666}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":225.2452824,"p(99)":341.31000787999983,"max":1952.145937,"avg":132.4036514000674,"p(50)":117.4035095}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.0038740104429846726,"passes":23,"fails":5914}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":8,"rate":0.17855101970364376},"thresholds":{"count>=0":{"ok":true}}}},"setup_data":[{"chat":"e342dd36-2381-41c5-8d33-67bfa1d6137f","token":"KnJ_NAQZgcB7Y6Jarch6Lm1fs1AkOG29DmpLpI5bhuc"},{"chat":"2f068379-3e8b-4eb2-a89a-2762ae6389ab","token":"nimwYwBhwv6Y0eTQW6XTMthK0Yxx2tTwUXAfwW0WpPs"},{"token":"_OBF8YP4-fdYgkIDI8t2FUrsCoBRh5rDnxP2Gea2jBU","chat":"4036bfbc-9383-462d-86de-6214c34947dc"},{"chat":"3aa8c160-a929-4820-9768-f41dc92312d0","token":"rWgfGObXKMqSPz_kVWikWV1uAFRjU805fxG6EqQz6GY"},{"chat":"99182e04-ce42-4c09-9376-e3c2b77350c6","token":"S9THhCwiOJRa0TjLBLVqQH0x_x0vK--2agooKd4VLDk"},{"chat":"655cf77d-2701-4130-977b-2c465640d4aa","token":"NIlT82jsXQab9nBjnFEOt6UVZBiQ-EBR7jRXJh-bxxw"},{"chat":"fc186d2f-48f3-467b-ac27-e0ec49c8d5c8","token":"OezRKa2GNX4BVIk-Dqpv7nUyJ6NLDPGJYL7fRIs1EhE"},{"chat":"6aa67232-a9bc-45d0-a983-158a8dbfc9f8","token":"L7m9C8wXV0YRGk6vw1VohLLsy_BIxLEUk-TYAuyUpZw"},{"token":"KkBR1-2NVyEUJ4dENkRPSfxohXPdMBztdyv2IFJwVZA","chat":"f1693256-5dd9-48e8-9077-b91c93a57d29"},{"chat":"aa5fb30b-5b6e-421f-baf1-87cf1bff03c4","token":"sIW-gcPbXg6PxmqOuU66QoG_tjTxJwp3phea-2PiQ1U"},{"chat":"196c0b29-bf55-41ca-b979-18cf95146c3c","token":"g9fQ54y2kDuQ5rpzrlhhZTnlVNhkg0hqiHctXwdEtl0"},{"chat":"74df4a77-93ff-4629-b3ec-d06a4a54fa46","token":"qOPSdnvYXF_Yzqhg-8B_-hYGTRWhSRk5of5EADxiy5I"},{"chat":"3a819f5c-2b86-43de-ac71-1c46f385fc95","token":"T1LNa86HH8FB-zofEAAYFWbu_wj89zxUvI6rBYSK6Fs"},{"token":"XtbfTqdvWjUA1K2UvsjoegyJRDgdb6xEf0yVAytnt_8","chat":"e765a069-1e88-4829-8b78-0b763a0c8a2e"},{"token":"PpFGA8JAXIeMdYNO7lJUca5R41JX0OKSofRqw4DZiyU","chat":"23b91e1f-6cb5-4cf9-8935-cbdb9289156c"},{"chat":"828e93a1-57d6-442d-8b69-abd489d1cb8b","token":"pSG6AIANqIzZtCIny0I9-klUgQVz2gGVgCU3n0-2bKM"}]}} diff --git a/evidence/research-20261029-pool/load-single8b-20261029113315.json b/evidence/research-20261029-pool/load-single8b-20261029113315.json new file mode 100644 index 00000000..37d7b620 --- /dev/null +++ b/evidence/research-20261029-pool/load-single8b-20261029113315.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "passes": 2869, + "fails": 9987, + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e" + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 299, + "fails": 1 + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 2844, + "fails": 9995 + } + ] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 44591.474584 + }, + "metrics": { + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 19983, + "rate": 448.1349896235582 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "avg": 150.10996628620794, + "p(50)": 75.304901, + "p(95)": 165.742897, + "p(99)": 190.31036650000001, + "max": 11627.052443 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0.229872, + "p(95)": 1.8305383999999998, + "p(99)": 7.313318699999995, + "max": 35.208034, + "avg": 0.6216663946429214 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.09999524632564549, + "p(50)": 0.042031, + "p(95)": 0.23779599999999998, + "p(99)": 0.4740774799999998, + "max": 29.534114 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 10000581, + "rate": 224271.1436052922 + } + }, + "iterations": { + "values": { + "count": 12839, + "rate": 287.92499283275106 + }, + "type": "counter", + "contains": "default" + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 2647, + "rate": 59.36112283108436 + } + }, + "failed_writes": { + "contains": "default", + "values": { + "count": 9987, + "rate": 223.96657866038515 + }, + "type": "counter" + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 167.59464175999983, + "max": 11625.766546, + "avg": 36.72166618768946, + "p(50)": 2.290636, + "p(95)": 130.56769589999996 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.23127524523946913, + "passes": 6012, + "fails": 19983 + } + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 19983, + "rate": 448.1349896235582 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 130.88320579999998, + "p(99)": 168.01515669999998, + "max": 11627.052443, + "avg": 37.443327828658056, + "p(50)": 2.930929 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "max": 32, + "value": 32, + "min": 32 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 25544, + "rate": 572.8449269351034 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 26059, + "rate": 584.3942198168595 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.053963073256842804, + "p(50)": 0.000243, + "p(95)": 0.001314, + "p(99)": 0.0014788399999999965, + "max": 703.90332 + } + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "min": 0, + "max": 32, + "value": 32 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.7668367934302928, + "passes": 19983, + "fails": 6076 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0, + "p(99)": 0, + "max": 4.936425, + "avg": 0.004013690011128593, + "p(50)": 0 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 2160993, + "rate": 48462.021499853974 + } + }, + "http_req_tls_handshaking": { + "values": { + "avg": 0.022473991941363833, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 25.479402 + }, + "type": "trend", + "contains": "time" + }, + "iteration_duration": { + "contains": "time", + "values": { + "p(95)": 266.0044067999995, + "p(99)": 343.68721489999956, + "max": 11904.224531, + "avg": 76.01463507189025, + "p(50)": 6.157335 + }, + "type": "trend" + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 2.858447, + "p(95)": 134.85857299999975, + "p(99)": 171.70400019000002, + "max": 11627.052443, + "avg": 51.80089285982287 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 12634, + "rate": 283.3277014914695 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "application_errors{status:429}": { + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter" + } + }, + "setup_data": [ + { + "chat": "c86b1fee-58c2-4934-aa29-88a950c37368", + "token": "UTgLLRywOSR38KPHGUgM7ORsE29W3lOKvwvWpan5p9U" + }, + { + "chat": "349230a6-6bff-480c-bb46-52adf1c4cfbe", + "token": "M-_ZGfkdbIBmTcGVqpp9jM_k2elAAEieqtttWVZF2LY" + }, + { + "chat": "e417528c-af5f-41ab-b9ca-1b4068c30ccf", + "token": "tIUAYqpHjK_v7g_aQbLOPjrQmAiHgfe9BOLBly0yLvE" + }, + { + "chat": "5b37fb41-c5c0-46a9-9189-822c2a70520b", + "token": "D9bcPKiVPxKeewJNtvg7dMoPuy6r6I3DLNnB1bKJO9w" + }, + { + "chat": "236c6d0e-faaf-4be0-87f7-5892ff48cce9", + "token": "Ms2JOBKJ5CBVPvxGJm_5mRbTiLWPgOptmXCSAI10r2I" + }, + { + "chat": "dd938aba-7ab3-4a7e-ba2c-b8244a7a99dd", + "token": "-4ogH7kmlJSu9nACUatTc_9UEvvgGLm2ozg35fSgOhc" + }, + { + "token": "ruZ655u5OXtzPmGwrxUGAhYB_9QII22N6j9I4twTUTs", + "chat": "f95b7837-3265-4a84-af8b-939f1ef597fb" + }, + { + "chat": "46094782-f4a3-440c-9901-09673115e8c0", + "token": "Z_WaBIQv9tfqOARTVFyoL4VNpJcvq2_uM4-RyYY2eA8" + }, + { + "chat": "e27d0212-ad39-4677-bfee-1173ea71544c", + "token": "sxSJMaH7uYadu8--HKTZ6oWIDzX6c0Jdt1qr7YJKDQE" + }, + { + "token": "Xuw5d-zMzBR4c6E9GSHdRwTYm1oESLxPVk541p5UXkA", + "chat": "0e62aa6c-2dd9-4435-8a19-7024faa174e3" + }, + { + "chat": "58e54e33-743f-4614-a9e6-c350a6fa46cc", + "token": "iAw5ePDdZ4vuZb09YX1YeKEG4Khg_w_y324X4rb0vz0" + }, + { + "chat": "e9fc6687-6e30-4d13-9c92-f42e6bb043f3", + "token": "JMGxnLgn_S0aRu6pcl13cpHEUrWvqm0Q0Vn8MfaZG4Y" + }, + { + "chat": "0acb076d-2aaa-45b9-80d0-e34562e96900", + "token": "PGXS1W4z1BIOrmv3fM0Zys-aEZu6MmZXB9PHfMcJvnM" + }, + { + "chat": "9284e591-c139-4fae-8f9a-4632819bbcb8", + "token": "19VFw6Q20IpiOMn6TtBYfHUDtQ19AGylpqWW3QVR0PQ" + }, + { + "chat": "ae0a3838-1caa-49ea-8873-011768e5635d", + "token": "byTitHDFea7KU1TGkqWcJQQTUOHk2yjvgfTDlt46q5Y" + }, + { + "chat": "84f79d19-75d1-45b1-bcb8-36651590de82", + "token": "6bfB3rZ2en85G4EDjDZm8EVVymGxfFPo8Da5-vBHd5M" + } + ] + } +} diff --git a/evidence/research-20261029-pool/load-single8b-20261029113315.txt b/evidence/research-20261029-pool/load-single8b-20261029113315.txt new file mode 100644 index 00000000..174122b3 --- /dev/null +++ b/evidence/research-20261029-pool/load-single8b-20261029113315.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":2869,"fails":9987,"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e"},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":299,"fails":1},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":2844,"fails":9995}]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":44591.474584},"metrics":{"application_errors":{"type":"counter","contains":"default","values":{"count":19983,"rate":448.1349896235582}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":150.10996628620794,"p(50)":75.304901,"p(95)":165.742897,"p(99)":190.31036650000001,"max":11627.052443}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.229872,"p(95)":1.8305383999999998,"p(99)":7.313318699999995,"max":35.208034,"avg":0.6216663946429214}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.09999524632564549,"p(50)":0.042031,"p(95)":0.23779599999999998,"p(99)":0.4740774799999998,"max":29.534114}},"data_received":{"type":"counter","contains":"data","values":{"count":10000581,"rate":224271.1436052922}},"iterations":{"values":{"count":12839,"rate":287.92499283275106},"type":"counter","contains":"default"},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":2647,"rate":59.36112283108436}},"failed_writes":{"contains":"default","values":{"count":9987,"rate":223.96657866038515},"type":"counter"},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":167.59464175999983,"max":11625.766546,"avg":36.72166618768946,"p(50)":2.290636,"p(95)":130.56769589999996}},"checks":{"type":"rate","contains":"default","values":{"rate":0.23127524523946913,"passes":6012,"fails":19983}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":19983,"rate":448.1349896235582},"thresholds":{"count>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":130.88320579999998,"p(99)":168.01515669999998,"max":11627.052443,"avg":37.443327828658056,"p(50)":2.930929}},"vus_max":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"measured_operations":{"type":"counter","contains":"default","values":{"count":25544,"rate":572.8449269351034}},"http_reqs":{"type":"counter","contains":"default","values":{"count":26059,"rate":584.3942198168595}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.053963073256842804,"p(50)":0.000243,"p(95)":0.001314,"p(99)":0.0014788399999999965,"max":703.90332}},"vus":{"type":"gauge","contains":"default","values":{"min":0,"max":32,"value":32}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.7668367934302928,"passes":19983,"fails":6076}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":4.936425,"avg":0.004013690011128593,"p(50)":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":2160993,"rate":48462.021499853974}},"http_req_tls_handshaking":{"values":{"avg":0.022473991941363833,"p(50)":0,"p(95)":0,"p(99)":0,"max":25.479402},"type":"trend","contains":"time"},"iteration_duration":{"contains":"time","values":{"p(95)":266.0044067999995,"p(99)":343.68721489999956,"max":11904.224531,"avg":76.01463507189025,"p(50)":6.157335},"type":"trend"},"message_latency_ms":{"type":"trend","contains":"time","values":{"p(50)":2.858447,"p(95)":134.85857299999975,"p(99)":171.70400019000002,"max":11627.052443,"avg":51.80089285982287}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":12634,"rate":283.3277014914695}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"application_errors{status:429}":{"contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter"}},"setup_data":[{"chat":"c86b1fee-58c2-4934-aa29-88a950c37368","token":"UTgLLRywOSR38KPHGUgM7ORsE29W3lOKvwvWpan5p9U"},{"chat":"349230a6-6bff-480c-bb46-52adf1c4cfbe","token":"M-_ZGfkdbIBmTcGVqpp9jM_k2elAAEieqtttWVZF2LY"},{"chat":"e417528c-af5f-41ab-b9ca-1b4068c30ccf","token":"tIUAYqpHjK_v7g_aQbLOPjrQmAiHgfe9BOLBly0yLvE"},{"chat":"5b37fb41-c5c0-46a9-9189-822c2a70520b","token":"D9bcPKiVPxKeewJNtvg7dMoPuy6r6I3DLNnB1bKJO9w"},{"chat":"236c6d0e-faaf-4be0-87f7-5892ff48cce9","token":"Ms2JOBKJ5CBVPvxGJm_5mRbTiLWPgOptmXCSAI10r2I"},{"chat":"dd938aba-7ab3-4a7e-ba2c-b8244a7a99dd","token":"-4ogH7kmlJSu9nACUatTc_9UEvvgGLm2ozg35fSgOhc"},{"token":"ruZ655u5OXtzPmGwrxUGAhYB_9QII22N6j9I4twTUTs","chat":"f95b7837-3265-4a84-af8b-939f1ef597fb"},{"chat":"46094782-f4a3-440c-9901-09673115e8c0","token":"Z_WaBIQv9tfqOARTVFyoL4VNpJcvq2_uM4-RyYY2eA8"},{"chat":"e27d0212-ad39-4677-bfee-1173ea71544c","token":"sxSJMaH7uYadu8--HKTZ6oWIDzX6c0Jdt1qr7YJKDQE"},{"token":"Xuw5d-zMzBR4c6E9GSHdRwTYm1oESLxPVk541p5UXkA","chat":"0e62aa6c-2dd9-4435-8a19-7024faa174e3"},{"chat":"58e54e33-743f-4614-a9e6-c350a6fa46cc","token":"iAw5ePDdZ4vuZb09YX1YeKEG4Khg_w_y324X4rb0vz0"},{"chat":"e9fc6687-6e30-4d13-9c92-f42e6bb043f3","token":"JMGxnLgn_S0aRu6pcl13cpHEUrWvqm0Q0Vn8MfaZG4Y"},{"chat":"0acb076d-2aaa-45b9-80d0-e34562e96900","token":"PGXS1W4z1BIOrmv3fM0Zys-aEZu6MmZXB9PHfMcJvnM"},{"chat":"9284e591-c139-4fae-8f9a-4632819bbcb8","token":"19VFw6Q20IpiOMn6TtBYfHUDtQ19AGylpqWW3QVR0PQ"},{"chat":"ae0a3838-1caa-49ea-8873-011768e5635d","token":"byTitHDFea7KU1TGkqWcJQQTUOHk2yjvgfTDlt46q5Y"},{"chat":"84f79d19-75d1-45b1-bcb8-36651590de82","token":"6bfB3rZ2en85G4EDjDZm8EVVymGxfFPo8Da5-vBHd5M"}]}} diff --git a/evidence/research-20261029-pool/nodes.txt b/evidence/research-20261029-pool/nodes.txt new file mode 100644 index 00000000..461dea77 --- /dev/null +++ b/evidence/research-20261029-pool/nodes.txt @@ -0,0 +1,4 @@ +NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME +dev.asisti.tech Ready 252d v1.33.13 100.99.166.40 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 +marlosrv0 Ready 254d v1.33.13 192.168.1.37 Ubuntu 24.04.5 LTS 6.8.0-147-generic containerd://1.7.29 +srv0.agapov.space Ready 246d v1.33.13 100.108.186.94 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 diff --git a/evidence/research-20261029-pool/pods-saturation64-20261029112756.txt b/evidence/research-20261029-pool/pods-saturation64-20261029112756.txt new file mode 100644 index 00000000..58d7f69b --- /dev/null +++ b/evidence/research-20261029-pool/pods-saturation64-20261029112756.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-84fbf9968-6xpsz 1/1 Running 0 2m26s 10.1.25.79 dev.asisti.tech diff --git a/evidence/research-20261029-pool/pods-saturation8-20261029112615.txt b/evidence/research-20261029-pool/pods-saturation8-20261029112615.txt new file mode 100644 index 00000000..70e1c4f3 --- /dev/null +++ b/evidence/research-20261029-pool/pods-saturation8-20261029112615.txt @@ -0,0 +1,3 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-84fbf9968-6xpsz 1/1 Running 0 39s 10.1.25.79 dev.asisti.tech +api-84fbf9968-mp649 1/1 Running 0 38s 10.1.25.103 dev.asisti.tech diff --git a/evidence/research-20261029-pool/pods-single32a-20261029113131.txt b/evidence/research-20261029-pool/pods-single32a-20261029113131.txt new file mode 100644 index 00000000..134aa0cd --- /dev/null +++ b/evidence/research-20261029-pool/pods-single32a-20261029113131.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-757dbc95b7-rdrq9 1/1 Running 0 40s 10.1.25.119 dev.asisti.tech diff --git a/evidence/research-20261029-pool/pods-single32b-20261029113452.txt b/evidence/research-20261029-pool/pods-single32b-20261029113452.txt new file mode 100644 index 00000000..39fa0ecd --- /dev/null +++ b/evidence/research-20261029-pool/pods-single32b-20261029113452.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-757dbc95b7-j9fg4 1/1 Running 0 39s 10.1.25.72 dev.asisti.tech diff --git a/evidence/research-20261029-pool/pods-single8a-20261029112953.txt b/evidence/research-20261029-pool/pods-single8a-20261029112953.txt new file mode 100644 index 00000000..8d44f023 --- /dev/null +++ b/evidence/research-20261029-pool/pods-single8a-20261029112953.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-84fbf9968-6xpsz 1/1 Running 0 4m15s 10.1.25.79 dev.asisti.tech diff --git a/evidence/research-20261029-pool/pods-single8b-20261029113315.txt b/evidence/research-20261029-pool/pods-single8b-20261029113315.txt new file mode 100644 index 00000000..1f66600b --- /dev/null +++ b/evidence/research-20261029-pool/pods-single8b-20261029113315.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-84fbf9968-b85fz 1/1 Running 0 38s 10.1.25.114 dev.asisti.tech diff --git a/evidence/research-20261029-pool/profiles.csv b/evidence/research-20261029-pool/profiles.csv new file mode 100644 index 00000000..35687a7b --- /dev/null +++ b/evidence/research-20261029-pool/profiles.csv @@ -0,0 +1,7 @@ +profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool,vus,duration +saturation8,saturation8-20261029112615,1,1000,512,8,8,30 +saturation64,saturation64-20261029112756,1,1000,512,8,64,30 +single8a,single8a-20261029112953,1,1000,512,8,32,30 +single32a,single32a-20261029113131,1,1000,512,32,32,30 +single8b,single8b-20261029113315,1,1000,512,8,32,30 +single32b,single32b-20261029113452,1,1000,512,32,32,30 diff --git a/evidence/research-20261029-pool/readiness-events.json b/evidence/research-20261029-pool/readiness-events.json new file mode 100644 index 00000000..b86c1e16 --- /dev/null +++ b/evidence/research-20261029-pool/readiness-events.json @@ -0,0 +1,207 @@ +{ + "apiVersion": "v1", + "items": [ + { + "apiVersion": "v1", + "count": 4, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:32:43Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-757dbc95b7-rdrq9", + "namespace": "highload-applications", + "resourceVersion": "60165351", + "uid": "d7ca7a62-36f3-4fe4-a1e0-88c551fbae0e" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:32:49Z", + "message": "Readiness probe failed: Get \"http://10.1.25.119:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:32:43Z", + "name": "api-757dbc95b7-rdrq9.18e2fccdf49385e9", + "namespace": "highload-applications", + "resourceVersion": "60165641", + "uid": "bd6b8c20-d53c-4164-a494-204786fafcc4" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 16, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:26:39Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-84fbf9968-6xpsz", + "namespace": "highload-applications", + "resourceVersion": "60164031", + "uid": "d9662039-44f8-4142-be51-e527d8368874" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:31:22Z", + "message": "Readiness probe failed: Get \"http://10.1.25.79:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:26:46Z", + "name": "api-84fbf9968-6xpsz.18e2fc7937c40c84", + "namespace": "highload-applications", + "resourceVersion": "60165291", + "uid": "a20084f7-76bd-4e55-b804-1544b8703cac" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 8, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:31:22Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-84fbf9968-6xpsz", + "namespace": "highload-applications", + "resourceVersion": "60164031", + "uid": "d9662039-44f8-4142-be51-e527d8368874" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:31:34Z", + "message": "Readiness probe failed: HTTP probe failed with statuscode: 503", + "metadata": { + "creationTimestamp": "2026-10-29T11:31:35Z", + "name": "api-84fbf9968-6xpsz.18e2fcbb3401a746", + "namespace": "highload-applications", + "resourceVersion": "60165312", + "uid": "bb948f9b-eff8-4d54-9ac4-ca51307acca9" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:31:46Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-84fbf9968-6xpsz", + "namespace": "highload-applications", + "resourceVersion": "60164031", + "uid": "d9662039-44f8-4142-be51-e527d8368874" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:31:46Z", + "message": "Readiness probe failed: Get \"http://10.1.25.79:8080/health/ready\": dial tcp 10.1.25.79:8080: connect: connection refused", + "metadata": { + "creationTimestamp": "2026-10-29T11:31:46Z", + "name": "api-84fbf9968-6xpsz.18e2fcc0ca8f23ea", + "namespace": "highload-applications", + "resourceVersion": "60165438", + "uid": "46a800fe-e43c-4c44-91bc-e1fcd24f9de3" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 6, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:34:14Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-84fbf9968-b85fz", + "namespace": "highload-applications", + "resourceVersion": "60165751", + "uid": "51c2d296-8919-4856-bfb3-57269315e7d2" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:34:24Z", + "message": "Readiness probe failed: Get \"http://10.1.25.114:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:34:14Z", + "name": "api-84fbf9968-b85fz.18e2fce343b34a0f", + "namespace": "highload-applications", + "resourceVersion": "60166051", + "uid": "9edbb542-76f2-407a-9a64-ef8d29279894" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:35:06Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-84fbf9968-b85fz", + "namespace": "highload-applications", + "resourceVersion": "60165751", + "uid": "51c2d296-8919-4856-bfb3-57269315e7d2" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:35:06Z", + "message": "Readiness probe failed: Get \"http://10.1.25.114:8080/health/ready\": dial tcp 10.1.25.114:8080: connect: invalid argument", + "metadata": { + "creationTimestamp": "2026-10-29T11:35:06Z", + "name": "api-84fbf9968-b85fz.18e2fcef5fe228ce", + "namespace": "highload-applications", + "resourceVersion": "60166225", + "uid": "6ff1a877-7f9b-4ed0-bf18-99d62fb2cd28" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + } + ], + "kind": "List", + "metadata": { + "resourceVersion": "" + } +} diff --git a/evidence/research-20261029-pool/resources-saturation64-20261029112756.txt b/evidence/research-20261029-pool/resources-saturation64-20261029112756.txt new file mode 100644 index 00000000..33612377 --- /dev/null +++ b/evidence/research-20261029-pool/resources-saturation64-20261029112756.txt @@ -0,0 +1,82 @@ +UTC 2026-10-29T11:28:49Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 3m 10Mi +postgres-0 5m 55Mi +valkey-0 10m 10Mi +valkey-1 5m 14Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:28:58Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 3m 10Mi +postgres-0 5m 55Mi +valkey-0 10m 10Mi +valkey-1 5m 14Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:29:09Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 2m 10Mi +load-saturation64-20261029112756-8lc42 27m 21Mi +postgres-0 5m 55Mi +valkey-0 11m 10Mi +valkey-1 5m 14Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:29:18Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 189m 69Mi +load-saturation64-20261029112756-8lc42 53m 23Mi +postgres-0 59m 55Mi +valkey-0 17m 10Mi +valkey-1 18m 14Mi +valkey-2 6m 3Mi +active|||3 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:29:27Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 189m 69Mi +load-saturation64-20261029112756-8lc42 53m 23Mi +postgres-0 59m 55Mi +valkey-0 17m 10Mi +valkey-1 18m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|7 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:29:34Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 441m 16Mi +load-saturation64-20261029112756-8lc42 146m 37Mi +postgres-0 59m 55Mi +valkey-0 98m 10Mi +valkey-1 18m 14Mi +valkey-2 53m 4Mi +active|||1 +idle|Client|ClientRead|7 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:29:44Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 644m 15Mi +load-saturation64-20261029112756-8lc42 511m 46Mi +postgres-0 596m 64Mi +valkey-0 152m 8Mi +valkey-1 76m 14Mi +valkey-2 85m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:29:52Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 644m 15Mi +postgres-0 596m 64Mi +valkey-0 152m 8Mi +valkey-1 76m 14Mi +valkey-2 85m 3Mi diff --git a/evidence/research-20261029-pool/resources-saturation8-20261029112615.txt b/evidence/research-20261029-pool/resources-saturation8-20261029112615.txt new file mode 100644 index 00000000..6c02a7f3 --- /dev/null +++ b/evidence/research-20261029-pool/resources-saturation8-20261029112615.txt @@ -0,0 +1,85 @@ +UTC 2026-10-29T11:27:04Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 2m 23Mi +api-84fbf9968-mp649 2m 22Mi +postgres-0 4m 45Mi +valkey-0 7m 10Mi +valkey-1 4m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:27:11Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 2m 23Mi +api-84fbf9968-mp649 2m 22Mi +postgres-0 4m 45Mi +valkey-0 7m 10Mi +valkey-1 4m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:27:20Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 54m 61Mi +api-84fbf9968-mp649 3m 22Mi +load-saturation8-20261029112615-c2rdh 87m 15Mi +postgres-0 4m 45Mi +valkey-0 9m 10Mi +valkey-1 6m 14Mi +valkey-2 16m 4Mi +active|||1 +idle|Client|ClientRead|9 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:27:27Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 54m 61Mi +api-84fbf9968-mp649 3m 22Mi +load-saturation8-20261029112615-c2rdh 87m 15Mi +postgres-0 4m 45Mi +valkey-0 9m 10Mi +valkey-1 6m 14Mi +valkey-2 16m 4Mi +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|7 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:27:35Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 161m 9Mi +api-84fbf9968-mp649 178m 9Mi +load-saturation8-20261029112615-c2rdh 67m 15Mi +postgres-0 265m 65Mi +valkey-0 65m 10Mi +valkey-1 24m 14Mi +valkey-2 16m 4Mi +active|||2 +idle|Client|ClientRead|7 +idle|||1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:27:43Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 161m 9Mi +api-84fbf9968-mp649 178m 9Mi +load-saturation8-20261029112615-c2rdh 67m 15Mi +postgres-0 265m 65Mi +valkey-0 65m 10Mi +valkey-1 24m 14Mi +valkey-2 16m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +idle in transaction|IO|WalSync|1 +UTC 2026-10-29T11:27:50Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 305m 10Mi +api-84fbf9968-mp649 293m 10Mi +load-saturation8-20261029112615-c2rdh 250m 18Mi +postgres-0 265m 65Mi +valkey-0 127m 10Mi +valkey-1 62m 14Mi +valkey-2 70m 4Mi +active|||1 +idle|Client|ClientRead|9 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-pool/resources-single32a-20261029113131.txt b/evidence/research-20261029-pool/resources-single32a-20261029113131.txt new file mode 100644 index 00000000..5956439f --- /dev/null +++ b/evidence/research-20261029-pool/resources-single32a-20261029113131.txt @@ -0,0 +1,64 @@ +UTC 2026-10-29T11:32:24Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-rdrq9 2m 22Mi +postgres-0 4m 47Mi +valkey-0 9m 8Mi +valkey-1 5m 14Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:32:32Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-rdrq9 145m 40Mi +postgres-0 4m 47Mi +valkey-0 9m 8Mi +valkey-1 5m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:32:41Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-rdrq9 145m 40Mi +load-single32a-20261029113131-n2hln 103m 23Mi +postgres-0 122m 56Mi +valkey-0 38m 8Mi +valkey-1 9m 14Mi +valkey-2 26m 3Mi +active|||1 +idle|Client|ClientRead|32 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:32:54Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-rdrq9 145m 40Mi +load-single32a-20261029113131-n2hln 103m 23Mi +postgres-0 122m 56Mi +valkey-0 38m 8Mi +valkey-1 9m 14Mi +valkey-2 26m 3Mi +active|||1 +idle|Client|ClientRead|32 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:33:02Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-rdrq9 135m 15Mi +load-single32a-20261029113131-n2hln 464m 34Mi +postgres-0 243m 125Mi +valkey-0 47m 9Mi +valkey-1 14m 14Mi +valkey-2 24m 4Mi +active|||1 +idle|Client|ClientRead|31 +idle|||1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:33:09Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-rdrq9 135m 15Mi +postgres-0 243m 125Mi +valkey-0 47m 9Mi +valkey-1 14m 14Mi +valkey-2 24m 4Mi +active|||1 +idle|Client|ClientRead|32 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-pool/resources-single32b-20261029113452.txt b/evidence/research-20261029-pool/resources-single32b-20261029113452.txt new file mode 100644 index 00000000..4d264f8e --- /dev/null +++ b/evidence/research-20261029-pool/resources-single32b-20261029113452.txt @@ -0,0 +1,80 @@ +UTC 2026-10-29T11:35:56Z +Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io) +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:36:03Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-j9fg4 2m 22Mi +postgres-0 4m 52Mi +valkey-0 8m 9Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|3 +idle|||1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:36:12Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-j9fg4 2m 23Mi +postgres-0 4m 52Mi +valkey-0 6m 9Mi +valkey-2 5m 4Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:36:19Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-j9fg4 156m 11Mi +postgres-0 14m 53Mi +valkey-0 33m 9Mi +valkey-2 6m 4Mi +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|31 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:36:27Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-j9fg4 156m 11Mi +postgres-0 14m 53Mi +valkey-0 33m 9Mi +valkey-2 6m 4Mi +active|Client|ClientRead|5 +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|21 +idle|||2 +idle in transaction|Client|ClientRead|3 +idle in transaction|||1 +UTC 2026-10-29T11:36:34Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-j9fg4 305m 22Mi +load-single32b-20261029113452-9hx9v 309m 30Mi +postgres-0 486m 130Mi +valkey-0 155m 10Mi +valkey-1 63m 15Mi +valkey-2 35m 4Mi +active|||3 +idle|Client|ClientRead|25 +idle|||1 +idle in transaction|Client|ClientRead|5 +UTC 2026-10-29T11:36:42Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-j9fg4 305m 22Mi +load-single32b-20261029113452-9hx9v 309m 30Mi +postgres-0 486m 130Mi +valkey-0 155m 10Mi +valkey-1 63m 15Mi +valkey-2 35m 4Mi +active|||1 +idle|Client|ClientRead|32 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:36:50Z +NAME CPU(cores) MEMORY(bytes) +api-757dbc95b7-j9fg4 728m 24Mi +postgres-0 984m 133Mi +valkey-0 155m 10Mi +valkey-1 107m 15Mi +valkey-2 65m 4Mi +active|||1 +idle|Client|ClientRead|32 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-pool/resources-single8a-20261029112953.txt b/evidence/research-20261029-pool/resources-single8a-20261029112953.txt new file mode 100644 index 00000000..744f67b0 --- /dev/null +++ b/evidence/research-20261029-pool/resources-single8a-20261029112953.txt @@ -0,0 +1,64 @@ +UTC 2026-10-29T11:30:40Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 5m 15Mi +postgres-0 45m 65Mi +valkey-0 11m 8Mi +valkey-1 5m 14Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:30:47Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 2m 15Mi +postgres-0 6m 65Mi +valkey-0 10m 8Mi +valkey-1 5m 14Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:30:55Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 2m 15Mi +postgres-0 6m 65Mi +valkey-0 10m 8Mi +valkey-1 5m 14Mi +valkey-2 7m 3Mi +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|7 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:31:03Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 192m 12Mi +load-single8a-20261029112953-dkvr4 134m 27Mi +postgres-0 50m 65Mi +valkey-0 30m 8Mi +valkey-1 16m 14Mi +valkey-2 26m 4Mi +active|||3 +idle|Client|ClientRead|6 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:31:11Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 192m 12Mi +load-single8a-20261029112953-dkvr4 134m 27Mi +postgres-0 50m 65Mi +valkey-0 30m 8Mi +valkey-1 16m 14Mi +valkey-2 26m 4Mi +active|IO|WalSync|1 +active|LWLock|WALWrite|3 +active|Lock|transactionid|1 +active|||2 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:31:18Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-6xpsz 423m 14Mi +load-single8a-20261029112953-dkvr4 430m 27Mi +postgres-0 340m 65Mi +valkey-0 110m 9Mi +valkey-1 56m 14Mi +valkey-2 26m 4Mi diff --git a/evidence/research-20261029-pool/resources-single8b-20261029113315.txt b/evidence/research-20261029-pool/resources-single8b-20261029113315.txt new file mode 100644 index 00000000..bd785958 --- /dev/null +++ b/evidence/research-20261029-pool/resources-single8b-20261029113315.txt @@ -0,0 +1,62 @@ +UTC 2026-10-29T11:34:00Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-b85fz 2m 22Mi +postgres-0 4m 50Mi +valkey-0 8m 9Mi +valkey-1 6m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:34:07Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-b85fz 2m 22Mi +postgres-0 4m 50Mi +valkey-0 8m 9Mi +valkey-1 6m 14Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:34:16Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-b85fz 2m 22Mi +postgres-0 4m 50Mi +valkey-0 8m 9Mi +valkey-1 6m 14Mi +valkey-2 6m 3Mi +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|5 +idle|||1 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:34:33Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-b85fz 249m 8Mi +postgres-0 124m 59Mi +valkey-0 35m 9Mi +valkey-2 15m 4Mi +active|IO|WalSync|1 +active|LWLock|WALWrite|3 +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:34:41Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-b85fz 249m 8Mi +postgres-0 124m 59Mi +valkey-0 35m 9Mi +valkey-2 15m 4Mi +active|Client|ClientRead|1 +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|3 +UTC 2026-10-29T11:34:48Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-b85fz 290m 13Mi +postgres-0 187m 69Mi +valkey-0 100m 9Mi +valkey-2 27m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-pool/restore-values.yaml b/evidence/research-20261029-pool/restore-values.yaml new file mode 100644 index 00000000..4e915dac --- /dev/null +++ b/evidence/research-20261029-pool/restore-values.yaml @@ -0,0 +1,61 @@ +api: + env: + DEPENDENCY_POOL_SIZE: "8" + DEPENDENCY_TIMEOUT_MS: "2000" + GOMEMLIMIT: 160MiB + REQUEST_TIMEOUT_SECONDS: "4" + SESSION_TTL_SECONDS: "3600" + SHUTDOWN_TIMEOUT_SECONDS: "5" + replicas: 2 + resources: + limits: + cpu: "1" + memory: 256Mi + requests: + cpu: 250m + memory: 128Mi +autoscaling: + cpuPercent: 60 + enabled: true + maxReplicas: 4 + minReplicas: 2 +databaseSecret: messenger-secrets +image: + digest: sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 + repository: asisti.registry.twcstorage.ru/mtusi2026lab3 +imagePullSecret: registry-pull +ingress: + className: traefik + clusterIssuer: letsencrypt-prod + host: hl.agapov.space +load: + duration: 30 + enabled: false + run: manual + script: scaling.js + vus: 32 +monitoring: + serviceMonitor: false +postgres: + image: postgres:17.6-alpine + resources: + limits: + cpu: "1" + memory: 512Mi + requests: + cpu: 250m + memory: 256Mi + storage: 2Gi +storageClass: "" +valkey: + image: valkey/valkey:8.1.3-alpine + maxmemory: 64mb + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 100m + memory: 96Mi + shards: 3 + storage: 1Gi diff --git a/evidence/research-20261029-pool/restore.txt b/evidence/research-20261029-pool/restore.txt new file mode 100644 index 00000000..05de3bba --- /dev/null +++ b/evidence/research-20261029-pool/restore.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:36:55 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 27 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-pool/rollout-saturation64.txt b/evidence/research-20261029-pool/rollout-saturation64.txt new file mode 100644 index 00000000..891e21f7 --- /dev/null +++ b/evidence/research-20261029-pool/rollout-saturation64.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:27:59 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 22 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-pool/rollout-saturation8.txt b/evidence/research-20261029-pool/rollout-saturation8.txt new file mode 100644 index 00000000..749f5b4e --- /dev/null +++ b/evidence/research-20261029-pool/rollout-saturation8.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:26:18 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 21 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-pool/rollout-single32a.txt b/evidence/research-20261029-pool/rollout-single32a.txt new file mode 100644 index 00000000..f19c43ff --- /dev/null +++ b/evidence/research-20261029-pool/rollout-single32a.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:31:34 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 24 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-pool/rollout-single32b.txt b/evidence/research-20261029-pool/rollout-single32b.txt new file mode 100644 index 00000000..0918f9f8 --- /dev/null +++ b/evidence/research-20261029-pool/rollout-single32b.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:34:55 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 26 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-pool/rollout-single8a.txt b/evidence/research-20261029-pool/rollout-single8a.txt new file mode 100644 index 00000000..8f281c79 --- /dev/null +++ b/evidence/research-20261029-pool/rollout-single8a.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:29:55 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 23 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-pool/rollout-single8b.txt b/evidence/research-20261029-pool/rollout-single8b.txt new file mode 100644 index 00000000..97f8b55f --- /dev/null +++ b/evidence/research-20261029-pool/rollout-single8b.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:33:17 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 25 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-pool/source.sha256 b/evidence/research-20261029-pool/source.sha256 new file mode 100644 index 00000000..862a7ac7 --- /dev/null +++ b/evidence/research-20261029-pool/source.sha256 @@ -0,0 +1,3 @@ +0a58dff9ad7acf8f228e0fd1c2a670bbe7e18a11360715b47659104832e34892 student-tests/load/scaling.js +dcc8dc1217792aca3385c8e3195b236058ee9b2df912e60f9af46dc51b9a6c86 charts/messenger/values.yaml +60e09dd38fd1d413b744f21b57f64ba83e49a5ae1b4251aa5bf20be033f90cfb internal/controller/http/fiber/errors.go diff --git a/evidence/research-20261029-readiness/README.md b/evidence/research-20261029-readiness/README.md new file mode 100644 index 00000000..fb7acb53 --- /dev/null +++ b/evidence/research-20261029-readiness/README.md @@ -0,0 +1,5 @@ +# Проверка гипотезы readiness + +Гипотеза: probe timeout 2 секунды недостаточен для двух последовательных проверок зависимостей с отдельными бюджетами по 2 секунды. Проверены 2 с / 2 ошибки и 5 с / 1 ошибка при 1 API, 1000m/512Mi, pool=8, 32 VU, одной ноде. + +probe2a исключён из сравнения: фактических API было две из-за перехода от HPA. Валидные probe2b, probe5a и probe5b не подтвердили устойчивого улучшения: probe2b — 160.33 сообщений/с без ошибок, probe5a — 145.07 без ошибок, probe5b — 88.07 с 17950 ошибками операций. Выбранные штатные 2 с / 2 ошибки сохранены. Изменение таймаута не устраняет реальные отказы зависимостей или сетевую нестабильность. diff --git a/evidence/research-20261029-readiness/base-revision.txt b/evidence/research-20261029-readiness/base-revision.txt new file mode 100644 index 00000000..32abb9b4 --- /dev/null +++ b/evidence/research-20261029-readiness/base-revision.txt @@ -0,0 +1 @@ +7b7e23fd029beea47e6f625a96cb98d2fe04bafb diff --git a/evidence/research-20261029-readiness/date.txt b/evidence/research-20261029-readiness/date.txt new file mode 100644 index 00000000..6c9c1356 --- /dev/null +++ b/evidence/research-20261029-readiness/date.txt @@ -0,0 +1 @@ +2026-10-29T11:37:56Z diff --git a/evidence/research-20261029-readiness/deployment-probe2a-20261029113757.json b/evidence/research-20261029-readiness/deployment-probe2a-20261029113757.json new file mode 100644 index 00000000..477a4f6d --- /dev/null +++ b/evidence/research-20261029-readiness/deployment-probe2a-20261029113757.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "23", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 39, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60167114", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:38:17Z", + "lastUpdateTime": "2026-10-29T11:38:17Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:38:17Z", + "message": "ReplicaSet \"api-84fbf9968\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 39, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/research-20261029-readiness/deployment-probe2b-20261029114146.json b/evidence/research-20261029-readiness/deployment-probe2b-20261029114146.json new file mode 100644 index 00000000..a724f734 --- /dev/null +++ b/evidence/research-20261029-readiness/deployment-probe2b-20261029114146.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "25", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 41, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60168215", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:42:04Z", + "lastUpdateTime": "2026-10-29T11:42:04Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:42:28Z", + "message": "ReplicaSet \"api-84fbf9968\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 41, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-readiness/deployment-probe5a-20261029113950.json b/evidence/research-20261029-readiness/deployment-probe5a-20261029113950.json new file mode 100644 index 00000000..8205d797 --- /dev/null +++ b/evidence/research-20261029-readiness/deployment-probe5a-20261029113950.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "24", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 40, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60167609", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 1, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 5 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:39:29Z", + "lastUpdateTime": "2026-10-29T11:39:29Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:39:59Z", + "message": "ReplicaSet \"api-6748cbfcbb\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 40, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-readiness/deployment-probe5b-20261029114403.json b/evidence/research-20261029-readiness/deployment-probe5b-20261029114403.json new file mode 100644 index 00000000..aef89cfe --- /dev/null +++ b/evidence/research-20261029-readiness/deployment-probe5b-20261029114403.json @@ -0,0 +1,217 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "26", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 42, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60168628", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 1, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "3629eac7ad08a08f6015340b29ccc00a2d76d1d1abf751a049de47ac2ac50f77", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 1, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 5 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "512Mi" + }, + "requests": { + "cpu": "1", + "memory": "512Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeSelector": { + "kubernetes.io/hostname": "dev.asisti.tech" + }, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 1, + "conditions": [ + { + "lastTransitionTime": "2026-10-29T11:43:12Z", + "lastUpdateTime": "2026-10-29T11:43:12Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + }, + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:44:10Z", + "message": "ReplicaSet \"api-6748cbfcbb\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + } + ], + "observedGeneration": 42, + "readyReplicas": 1, + "replicas": 1, + "updatedReplicas": 1 + } +} diff --git a/evidence/research-20261029-readiness/load-probe2a-20261029113757.json b/evidence/research-20261029-readiness/load-probe2a-20261029113757.json new file mode 100644 index 00000000..63093e49 --- /dev/null +++ b/evidence/research-20261029-readiness/load-probe2a-20261029113757.json @@ -0,0 +1,373 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "setup_data": [ + { + "chat": "5b6bc5fd-11ad-4ab5-8171-e36d78a854e5", + "token": "83o0IZT_OtqyoF7jKJBuBYHJSkER-H01YNUmwTPrW18" + }, + { + "chat": "ecd8894b-30bd-4689-9809-5ca1df67ca80", + "token": "VlrppUWw5bHBLYLmXua4mX_QYs6PNRxAE4Dk8DLLliM" + }, + { + "chat": "2036772e-7e34-47cb-b61d-bc7c09a4430b", + "token": "Gu5_iWIrhIdd0I_5SkKX1G-5kVvmyy8eVybWlJ_ij0o" + }, + { + "token": "hnBQGrEyAPo4oi6ZdZEkX7eifuI8nq7q_nxYpz1mibM", + "chat": "9f1cb7e9-794b-4d9c-b994-9d6a81dba078" + }, + { + "chat": "36915d30-e389-4615-9822-8465c70520c4", + "token": "OH8rJIaUYMUlQdp_kqInugZ9pMGzI9eJHrls-4Xo4dA" + }, + { + "chat": "641d3389-4fec-4a5f-bfed-3d70200e87e7", + "token": "6TrwiL01ikSGHJi4aw62vM88_V1t1XNrZNsc7Q0COeM" + }, + { + "chat": "acfe940b-a561-4158-ab85-8ba706789ff5", + "token": "-z5R8dnain840xVNWQ_4NAdKrQ7G0ZoEeRclQpXjY24" + }, + { + "chat": "414fd4ac-779b-446a-8c55-e601872f9f0f", + "token": "La-9Jdo2MR0_IIYe5DUad6LwJuQDDpKeUTvtDfQ-aIk" + }, + { + "chat": "8460515a-e8ac-4c18-8b2b-633333a0e589", + "token": "m93sYWqVPQPrHPgGhA97GGM3NekzYj_3TNWecJh8LiE" + }, + { + "chat": "872da110-ba6e-426a-92b2-a8d7f22afbc5", + "token": "Ha6fhKfJhAvnped_ehMw8yfJ_lWPV482xZ_4NIZyDrU" + }, + { + "chat": "094dbd4f-bf01-4356-86e7-dac531f47280", + "token": "D3Muv4SI7n38A8h3AfmxpHhqbLJZZvKlNPu35y93r54" + }, + { + "chat": "61f5ceb7-fb47-4eb7-b67f-443c4a054dd8", + "token": "lkHGmJoh-tnr5CdZICO0uBWVhjbwE1nWNyCCoGpTzqY" + }, + { + "chat": "cfa3f106-a30b-48d9-a6df-82715521d92d", + "token": "yYW0HkuJW-J0UNyXkd6oIIOP-oWHa8eYNblAlOYPCLA" + }, + { + "chat": "f2a728a4-1a54-4004-ab7d-3b302567feaf", + "token": "pqNvwTrA_kEclztZrmEdD8mtI1Rj_pGTNpJBXjBngo8" + }, + { + "chat": "ca03bb04-47a1-4b8e-8c46-9047ac270c80", + "token": "xkEXool5AH9jTevnIqx3EV5wnBU4qilks1v4F69wJLA" + }, + { + "chat": "bd5e6a6b-efdf-476d-ae20-4bc055dd9940", + "token": "9L394wCInPS7oYMPvrNAaKmT7a4R-FUvW4a-9Ly68Xc" + } + ], + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 2678, + "fails": 0 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 285, + "fails": 0 + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 2662, + "fails": 0 + } + ] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 45237.35581 + }, + "metrics": { + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "max": 21.956206, + "avg": 0.07616111407980315, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0 + } + }, + "data_received": { + "values": { + "count": 7720690, + "rate": 170670.67386580748 + }, + "type": "counter", + "contains": "data" + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "vus_max": { + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + }, + "type": "gauge" + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 0.007176399999999973, + "max": 1012.199289, + "avg": 0.2765768892599784, + "p(50)": 0.001211, + "p(95)": 0.0014415999999999995 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 2662, + "rate": 58.845172365524256 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.020088786078396904, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 4.497472 + } + }, + "http_req_receiving": { + "contains": "time", + "values": { + "avg": 0.28616167024081557, + "p(50)": 0.173989, + "p(95)": 0.7985983999999999, + "p(99)": 1.9823327599999991, + "max": 17.450908 + }, + "type": "trend" + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 365.8979752580771, + "p(50)": 171.7056935, + "p(95)": 289.01490204999993, + "p(99)": 15860.12647446, + "max": 16194.347133 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 530203, + "rate": 11720.468416122487 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "passes": 0, + "fails": 5689, + "rate": 0 + } + }, + "attempted_messages": { + "values": { + "rate": 54.02614622890356, + "count": 2444 + }, + "type": "counter", + "contains": "default" + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 303.5815466325699, + "p(50)": 97.445526, + "p(95)": 157.88551219999997, + "p(99)": 15466.744984530003, + "max": 15879.39015 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 5149, + "rate": 113.82186044706401 + } + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "application_errors": { + "values": { + "count": 0, + "rate": 0 + }, + "type": "counter", + "contains": "default" + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 5689, + "rate": 125.75889766621619 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 79.534332, + "p(95)": 143.08680299999995, + "p(99)": 302.71481855999906, + "max": 15879.39015, + "avg": 171.9521881787665 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "fails": 0, + "rate": 1, + "passes": 5625 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "rate": 0, + "count": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 302.71481855999906, + "max": 15879.39015, + "avg": 171.9521881787665, + "p(50)": 79.534332, + "p(95)": 143.08680299999995 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0.1736, + "p(95)": 0.3863061999999996, + "p(99)": 0.8739133999999985, + "max": 7.819659, + "avg": 0.20183353295834072 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "max": 15879.267816, + "avg": 171.4641929755668, + "p(50)": 79.072404, + "p(95)": 142.4328879999999, + "p(99)": 302.5124085199991 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 2444, + "rate": 54.02614622890356 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + } + } + } +} diff --git a/evidence/research-20261029-readiness/load-probe2a-20261029113757.txt b/evidence/research-20261029-readiness/load-probe2a-20261029113757.txt new file mode 100644 index 00000000..564d78fd --- /dev/null +++ b/evidence/research-20261029-readiness/load-probe2a-20261029113757.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"setup_data":[{"chat":"5b6bc5fd-11ad-4ab5-8171-e36d78a854e5","token":"83o0IZT_OtqyoF7jKJBuBYHJSkER-H01YNUmwTPrW18"},{"chat":"ecd8894b-30bd-4689-9809-5ca1df67ca80","token":"VlrppUWw5bHBLYLmXua4mX_QYs6PNRxAE4Dk8DLLliM"},{"chat":"2036772e-7e34-47cb-b61d-bc7c09a4430b","token":"Gu5_iWIrhIdd0I_5SkKX1G-5kVvmyy8eVybWlJ_ij0o"},{"token":"hnBQGrEyAPo4oi6ZdZEkX7eifuI8nq7q_nxYpz1mibM","chat":"9f1cb7e9-794b-4d9c-b994-9d6a81dba078"},{"chat":"36915d30-e389-4615-9822-8465c70520c4","token":"OH8rJIaUYMUlQdp_kqInugZ9pMGzI9eJHrls-4Xo4dA"},{"chat":"641d3389-4fec-4a5f-bfed-3d70200e87e7","token":"6TrwiL01ikSGHJi4aw62vM88_V1t1XNrZNsc7Q0COeM"},{"chat":"acfe940b-a561-4158-ab85-8ba706789ff5","token":"-z5R8dnain840xVNWQ_4NAdKrQ7G0ZoEeRclQpXjY24"},{"chat":"414fd4ac-779b-446a-8c55-e601872f9f0f","token":"La-9Jdo2MR0_IIYe5DUad6LwJuQDDpKeUTvtDfQ-aIk"},{"chat":"8460515a-e8ac-4c18-8b2b-633333a0e589","token":"m93sYWqVPQPrHPgGhA97GGM3NekzYj_3TNWecJh8LiE"},{"chat":"872da110-ba6e-426a-92b2-a8d7f22afbc5","token":"Ha6fhKfJhAvnped_ehMw8yfJ_lWPV482xZ_4NIZyDrU"},{"chat":"094dbd4f-bf01-4356-86e7-dac531f47280","token":"D3Muv4SI7n38A8h3AfmxpHhqbLJZZvKlNPu35y93r54"},{"chat":"61f5ceb7-fb47-4eb7-b67f-443c4a054dd8","token":"lkHGmJoh-tnr5CdZICO0uBWVhjbwE1nWNyCCoGpTzqY"},{"chat":"cfa3f106-a30b-48d9-a6df-82715521d92d","token":"yYW0HkuJW-J0UNyXkd6oIIOP-oWHa8eYNblAlOYPCLA"},{"chat":"f2a728a4-1a54-4004-ab7d-3b302567feaf","token":"pqNvwTrA_kEclztZrmEdD8mtI1Rj_pGTNpJBXjBngo8"},{"chat":"ca03bb04-47a1-4b8e-8c46-9047ac270c80","token":"xkEXool5AH9jTevnIqx3EV5wnBU4qilks1v4F69wJLA"},{"chat":"bd5e6a6b-efdf-476d-ae20-4bc055dd9940","token":"9L394wCInPS7oYMPvrNAaKmT7a4R-FUvW4a-9Ly68Xc"}],"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":2678,"fails":0},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":285,"fails":0},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":2662,"fails":0}]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":45237.35581},"metrics":{"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"max":21.956206,"avg":0.07616111407980315,"p(50)":0,"p(95)":0,"p(99)":0}},"data_received":{"values":{"count":7720690,"rate":170670.67386580748},"type":"counter","contains":"data"},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"vus_max":{"contains":"default","values":{"value":32,"min":32,"max":32},"type":"gauge"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.007176399999999973,"max":1012.199289,"avg":0.2765768892599784,"p(50)":0.001211,"p(95)":0.0014415999999999995}},"iterations":{"type":"counter","contains":"default","values":{"count":2662,"rate":58.845172365524256}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.020088786078396904,"p(50)":0,"p(95)":0,"p(99)":0,"max":4.497472}},"http_req_receiving":{"contains":"time","values":{"avg":0.28616167024081557,"p(50)":0.173989,"p(95)":0.7985983999999999,"p(99)":1.9823327599999991,"max":17.450908},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":365.8979752580771,"p(50)":171.7056935,"p(95)":289.01490204999993,"p(99)":15860.12647446,"max":16194.347133}},"data_sent":{"type":"counter","contains":"data","values":{"count":530203,"rate":11720.468416122487}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":5689,"rate":0}},"attempted_messages":{"values":{"rate":54.02614622890356,"count":2444},"type":"counter","contains":"default"},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":303.5815466325699,"p(50)":97.445526,"p(95)":157.88551219999997,"p(99)":15466.744984530003,"max":15879.39015}},"measured_operations":{"type":"counter","contains":"default","values":{"count":5149,"rate":113.82186044706401}},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"application_errors":{"values":{"count":0,"rate":0},"type":"counter","contains":"default"},"http_reqs":{"type":"counter","contains":"default","values":{"count":5689,"rate":125.75889766621619}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":79.534332,"p(95)":143.08680299999995,"p(99)":302.71481855999906,"max":15879.39015,"avg":171.9521881787665}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":5625}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"rate":0,"count":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":302.71481855999906,"max":15879.39015,"avg":171.9521881787665,"p(50)":79.534332,"p(95)":143.08680299999995}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.1736,"p(95)":0.3863061999999996,"p(99)":0.8739133999999985,"max":7.819659,"avg":0.20183353295834072}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":15879.267816,"avg":171.4641929755668,"p(50)":79.072404,"p(95)":142.4328879999999,"p(99)":302.5124085199991}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":2444,"rate":54.02614622890356}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}}}}} diff --git a/evidence/research-20261029-readiness/load-probe2b-20261029114146.json b/evidence/research-20261029-readiness/load-probe2b-20261029114146.json new file mode 100644 index 00000000..7bf640fc --- /dev/null +++ b/evidence/research-20261029-readiness/load-probe2b-20261029114146.json @@ -0,0 +1,373 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 4987, + "fails": 0 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 513, + "fails": 0 + }, + { + "passes": 4965, + "fails": 0, + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8" + } + ], + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 54454.378861 + }, + "metrics": { + "http_req_failed": { + "values": { + "fails": 10531, + "rate": 0.00037968675842429994, + "passes": 4 + }, + "type": "rate", + "contains": "default" + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 181.894479, + "p(95)": 319.0880900000001, + "p(99)": 406.6495257199995, + "max": 608.051894, + "avg": 196.05788405075597 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 4810, + "rate": 88.33082114990208 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.2553993865211189, + "p(50)": 0.179999, + "p(95)": 0.6804462999999995, + "p(99)": 1.3854514599999999, + "max": 7.788657 + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 92.3184985, + "p(95)": 159.7035873, + "p(99)": 211.03447146, + "max": 296.317341, + "avg": 99.74704451330554 + } + }, + "application_errors{status:0}": { + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "application_errors{status:503}": { + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.20819878025628386, + "p(50)": 0.001241, + "p(95)": 0.001442, + "p(99)": 0.0015903199999999997, + "max": 1024.807021 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.19730970536307524, + "p(50)": 0.187979, + "p(95)": 0.3581966999999999, + "p(99)": 0.6450867599999998, + "max": 3.336688 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 92.75789150726135, + "p(50)": 85.441347, + "p(95)": 152.2794315999999, + "p(99)": 203.34289926, + "max": 3000.129427 + } + }, + "vus": { + "values": { + "value": 32, + "min": 0, + "max": 32 + }, + "type": "gauge", + "contains": "default" + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 10535, + "rate": 193.46469871397474 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 960532, + "rate": 17639.20588373342 + } + }, + "http_req_tls_handshaking": { + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 46.742453, + "avg": 0.09879457854769816 + }, + "type": "trend", + "contains": "time" + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 203.40958330000032, + "max": 296.317341, + "avg": 92.77317693780265, + "p(50)": 85.893005, + "p(95)": 152.67121600000002 + } + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + } + }, + "http_req_duration": { + "values": { + "p(50)": 85.893005, + "p(95)": 152.7242078, + "p(99)": 203.665353, + "max": 3000.381876, + "avg": 93.2106005991457 + }, + "type": "trend", + "contains": "time" + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "rate": 264476.89425973047, + "count": 14401925 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 1, + "passes": 10465, + "fails": 0 + } + }, + "iterations": { + "contains": "default", + "values": { + "count": 4965, + "rate": 91.17724054246649 + }, + "type": "counter" + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 10115, + "rate": 185.75182035992924 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 4810, + "rate": 88.33082114990208 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0, + "p(99)": 0, + "max": 6.465628, + "avg": 0.011650741053630754, + "p(50)": 0 + } + } + }, + "setup_data": [ + { + "chat": "f9b118db-f823-4930-8ff8-f7eed5d8289a", + "token": "JUStv0hGFfnPbiNAzyfJ3hyQIaXKxw9rD-pMmo557qk" + }, + { + "token": "_UrCXK0lbM-50SCHZUKqOdVtseZZ0-eu7Sw0p1224Ac", + "chat": "f94d593c-fc6c-460a-8713-93b181e6b129" + }, + { + "chat": "e864aee5-5a3a-430a-bf17-0cdd4cbde8cb", + "token": "KEVdNatKTwTnvxkML-1ADvLoPbePA7iG6PEnpWAnSvM" + }, + { + "chat": "f697d0c3-c196-456b-b8f7-6b29a9d26297", + "token": "Xu97i_7fp8GBCjMc1ifwUYLBpz7HAhA5hsl7RvNFKXc" + }, + { + "chat": "be9b63bb-a551-4c87-b395-b516054bdc48", + "token": "hachLHDwsq-mcd_SHtJwdYjTR6aY2u6WuP19Swy2CDk" + }, + { + "chat": "8b360f96-5aba-49f2-ad48-c48dfea25fdf", + "token": "V7aGGrTFdneZvwQ4T-IiloSNlZ0MtyCH3Sh6VYTn9Cg" + }, + { + "token": "tMzXrlTJdbue4EhLfjMSlsdZIiWGCe0PRYSlxdsgsWw", + "chat": "d04374d7-9f3f-42a8-8ec9-e580ac1f09ac" + }, + { + "token": "YhKwaQ9xR9nGfGxLaXfpDSsv6AMACvW6t6ZHB2mVPt0", + "chat": "e8278e32-421e-4bd6-9976-c1fc525959e5" + }, + { + "chat": "7094ba19-c7ae-449f-a7b7-6d954cec703e", + "token": "8ghi6AHhsg6vH9nFTc2bE-knZ2oFgU_fkJfWq9fRyVs" + }, + { + "chat": "b1834219-b5cc-4e4a-a5d9-a54e84ea95f1", + "token": "RlB4ar1wHm17V3Rz1Tm04PLenGpT5GCnIs5doxRl_Os" + }, + { + "token": "LAvoTYNP_J0hGVbnfsI1uBWjsa2PhLbAeFxI3F1HqK8", + "chat": "5ba7fc56-93c8-4864-bc73-a6c37b92e147" + }, + { + "chat": "8f5c45da-8ae0-4621-87da-3e1d7fbba11e", + "token": "C3Wl88sIeM_t2osq4WIJMN54Oitn86ueZkz6fhzudNg" + }, + { + "chat": "8384ae31-48bd-4b67-bbd1-bc3f70301d4a", + "token": "u_uTx4A5Cfk4f8DkCzuj3enMubnyGDTtYE15GXnZNQA" + }, + { + "chat": "4426f32f-17cf-41c1-b726-5f65033de485", + "token": "Ap4CGuCfDEhJATpUI0PT1Rk_mMCIkZPUQ7chtJlRZ7M" + }, + { + "chat": "0909d4e0-77ba-4eb5-a9cc-2203fe3d486b", + "token": "RWpFTGro7wOrK1RSVR0qeDwl-m8jwOP-DbpnA2qMDCs" + }, + { + "chat": "e38a6dbb-0d1e-4778-b747-e42f0a4077f4", + "token": "pYaRvdGGaElZeUEk5CrsQtkk3-nHzXPwm7ZpbWgeBF0" + } + ] + } +} diff --git a/evidence/research-20261029-readiness/load-probe2b-20261029114146.txt b/evidence/research-20261029-readiness/load-probe2b-20261029114146.txt new file mode 100644 index 00000000..c307a8af --- /dev/null +++ b/evidence/research-20261029-readiness/load-probe2b-20261029114146.txt @@ -0,0 +1,4 @@ +time="2026-10-29T11:43:06Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/health/ready\": request timeout" +time="2026-10-29T11:43:10Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/health/ready\": request timeout" +time="2026-10-29T11:43:12Z" level=warning msg="setup login: 503; abandoning synthetic actor" source=console +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":4987,"fails":0},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":513,"fails":0},{"passes":4965,"fails":0,"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8"}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":54454.378861},"metrics":{"http_req_failed":{"values":{"fails":10531,"rate":0.00037968675842429994,"passes":4},"type":"rate","contains":"default"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":181.894479,"p(95)":319.0880900000001,"p(99)":406.6495257199995,"max":608.051894,"avg":196.05788405075597}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":4810,"rate":88.33082114990208}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.2553993865211189,"p(50)":0.179999,"p(95)":0.6804462999999995,"p(99)":1.3854514599999999,"max":7.788657}},"message_latency_ms":{"type":"trend","contains":"time","values":{"p(50)":92.3184985,"p(95)":159.7035873,"p(99)":211.03447146,"max":296.317341,"avg":99.74704451330554}},"application_errors{status:0}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"count":0,"rate":0}},"application_errors{status:503}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"count":0,"rate":0}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.20819878025628386,"p(50)":0.001241,"p(95)":0.001442,"p(99)":0.0015903199999999997,"max":1024.807021}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.19730970536307524,"p(50)":0.187979,"p(95)":0.3581966999999999,"p(99)":0.6450867599999998,"max":3.336688}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":92.75789150726135,"p(50)":85.441347,"p(95)":152.2794315999999,"p(99)":203.34289926,"max":3000.129427}},"vus":{"values":{"value":32,"min":0,"max":32},"type":"gauge","contains":"default"},"http_reqs":{"type":"counter","contains":"default","values":{"count":10535,"rate":193.46469871397474}},"data_sent":{"type":"counter","contains":"data","values":{"count":960532,"rate":17639.20588373342}},"http_req_tls_handshaking":{"values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":46.742453,"avg":0.09879457854769816},"type":"trend","contains":"time"},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":203.40958330000032,"max":296.317341,"avg":92.77317693780265,"p(50)":85.893005,"p(95)":152.67121600000002}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_duration":{"values":{"p(50)":85.893005,"p(95)":152.7242078,"p(99)":203.665353,"max":3000.381876,"avg":93.2106005991457},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"rate":264476.89425973047,"count":14401925}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":10465,"fails":0}},"iterations":{"contains":"default","values":{"count":4965,"rate":91.17724054246649},"type":"counter"},"measured_operations":{"type":"counter","contains":"default","values":{"count":10115,"rate":185.75182035992924}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":4810,"rate":88.33082114990208}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":6.465628,"avg":0.011650741053630754,"p(50)":0}}},"setup_data":[{"chat":"f9b118db-f823-4930-8ff8-f7eed5d8289a","token":"JUStv0hGFfnPbiNAzyfJ3hyQIaXKxw9rD-pMmo557qk"},{"token":"_UrCXK0lbM-50SCHZUKqOdVtseZZ0-eu7Sw0p1224Ac","chat":"f94d593c-fc6c-460a-8713-93b181e6b129"},{"chat":"e864aee5-5a3a-430a-bf17-0cdd4cbde8cb","token":"KEVdNatKTwTnvxkML-1ADvLoPbePA7iG6PEnpWAnSvM"},{"chat":"f697d0c3-c196-456b-b8f7-6b29a9d26297","token":"Xu97i_7fp8GBCjMc1ifwUYLBpz7HAhA5hsl7RvNFKXc"},{"chat":"be9b63bb-a551-4c87-b395-b516054bdc48","token":"hachLHDwsq-mcd_SHtJwdYjTR6aY2u6WuP19Swy2CDk"},{"chat":"8b360f96-5aba-49f2-ad48-c48dfea25fdf","token":"V7aGGrTFdneZvwQ4T-IiloSNlZ0MtyCH3Sh6VYTn9Cg"},{"token":"tMzXrlTJdbue4EhLfjMSlsdZIiWGCe0PRYSlxdsgsWw","chat":"d04374d7-9f3f-42a8-8ec9-e580ac1f09ac"},{"token":"YhKwaQ9xR9nGfGxLaXfpDSsv6AMACvW6t6ZHB2mVPt0","chat":"e8278e32-421e-4bd6-9976-c1fc525959e5"},{"chat":"7094ba19-c7ae-449f-a7b7-6d954cec703e","token":"8ghi6AHhsg6vH9nFTc2bE-knZ2oFgU_fkJfWq9fRyVs"},{"chat":"b1834219-b5cc-4e4a-a5d9-a54e84ea95f1","token":"RlB4ar1wHm17V3Rz1Tm04PLenGpT5GCnIs5doxRl_Os"},{"token":"LAvoTYNP_J0hGVbnfsI1uBWjsa2PhLbAeFxI3F1HqK8","chat":"5ba7fc56-93c8-4864-bc73-a6c37b92e147"},{"chat":"8f5c45da-8ae0-4621-87da-3e1d7fbba11e","token":"C3Wl88sIeM_t2osq4WIJMN54Oitn86ueZkz6fhzudNg"},{"chat":"8384ae31-48bd-4b67-bbd1-bc3f70301d4a","token":"u_uTx4A5Cfk4f8DkCzuj3enMubnyGDTtYE15GXnZNQA"},{"chat":"4426f32f-17cf-41c1-b726-5f65033de485","token":"Ap4CGuCfDEhJATpUI0PT1Rk_mMCIkZPUQ7chtJlRZ7M"},{"chat":"0909d4e0-77ba-4eb5-a9cc-2203fe3d486b","token":"RWpFTGro7wOrK1RSVR0qeDwl-m8jwOP-DbpnA2qMDCs"},{"chat":"e38a6dbb-0d1e-4778-b747-e42f0a4077f4","token":"pYaRvdGGaElZeUEk5CrsQtkk3-nHzXPwm7ZpbWgeBF0"}]}} diff --git a/evidence/research-20261029-readiness/load-probe5a-20261029113950.json b/evidence/research-20261029-readiness/load-probe5a-20261029113950.json new file mode 100644 index 00000000..3d38063f --- /dev/null +++ b/evidence/research-20261029-readiness/load-probe5a-20261029113950.json @@ -0,0 +1,373 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "options": { + "summaryTimeUnit": "", + "noColor": false, + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ] + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 64348.785066 + }, + "metrics": { + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 183.89047805, + "p(99)": 227.91660417999984, + "max": 416.153811, + "avg": 109.79651016130492, + "p(50)": 98.04979 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 104.04333617752478, + "p(50)": 91.693759, + "p(95)": 175.95552974999998, + "p(99)": 217.26459979999993, + "max": 3001.057825 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0.5819402499999999, + "p(99)": 1.0858867999999973, + "max": 197.82957, + "avg": 0.314270459413872, + "p(50)": 0.178359 + } + }, + "measured_operations": { + "contains": "default", + "values": { + "count": 9144, + "rate": 142.1005849701958 + }, + "type": "counter" + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 4472, + "rate": 69.49626159084816 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 194.042303, + "p(95)": 360.47340879999996, + "p(99)": 507.1045991, + "max": 801.247776, + "avg": 218.48342979830016 + } + }, + "application_errors{status:503}": { + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter" + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 1, + "passes": 9415, + "fails": 0 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 4352, + "rate": 67.63142451774848 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 9486, + "rate": 147.4153706285299 + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 218.69784719999987, + "max": 3001.115932, + "avg": 104.54552064473933, + "p(50)": 92.08764049999999, + "p(95)": 176.54378450000002 + } + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.18791400780097017, + "p(50)": 0.1824905, + "p(95)": 0.328721, + "p(99)": 0.5858761499999996, + "max": 5.680971 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 867545, + "rate": 13481.917321518866 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_tls_handshaking": { + "values": { + "avg": 0.07659518458781361, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 40.096467 + }, + "type": "trend", + "contains": "time" + }, + "vus_max": { + "values": { + "value": 32, + "min": 32, + "max": 32 + }, + "type": "gauge", + "contains": "default" + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 12965300, + "rate": 201484.76753216094 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 4352, + "rate": 67.63142451774848 + } + }, + "http_req_connecting": { + "contains": "time", + "values": { + "p(99)": 0, + "max": 7.041569, + "avg": 0.011908549968374448, + "p(50)": 0, + "p(95)": 0 + }, + "type": "trend" + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.0007379295804343243, + "passes": 7, + "fails": 9479 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0.001441, + "p(99)": 0.001576, + "max": 44.680786, + "avg": 0.0910056399957825, + "p(50)": 0.001239 + } + }, + "http_req_duration{expected_response:true}": { + "values": { + "avg": 103.45390451482191, + "p(50)": 92.086455, + "p(95)": 176.3376974, + "p(99)": 217.65719217999987, + "max": 416.153811 + }, + "type": "trend", + "contains": "time" + } + }, + "setup_data": [ + { + "token": "uFBtq1uyBuuOxa0GQS6ayWGhmJh2lPfX8T7KZ2Fxhww", + "chat": "3f7f81a1-210e-43ce-b61f-5880b585bf95" + }, + { + "chat": "4f90e785-35cc-4aa6-aada-211f9101b99a", + "token": "1QktxWjmAcVW6o4XRxpiwgQBseTgGNptGycvnoBn_Lc" + }, + { + "chat": "c58496ae-f334-4756-bec0-ab71f0ebfc64", + "token": "MLfPLEC0g8yGTakggGJ66T23-1EDAXRqFvRExUuz7eA" + }, + { + "chat": "42b0cc09-6543-416e-9aad-406502af0df2", + "token": "w55BAcQpzQzHOfi9rUMj5ijjhaOEL6I5XFCyNhDTgPk" + }, + { + "chat": "e2230d92-d610-450a-a492-151803a5db95", + "token": "mr2K8Mf1jgX_rF6cyAd7cuUbJ6sQamZUSO0ywn0NF_w" + }, + { + "chat": "04a32152-5865-4ee2-9915-97d609890d0e", + "token": "LST3yU-cu4rUVFRb8AoPEWzIGjA18_ML3jUB0QZT2ZQ" + }, + { + "chat": "47672539-53d1-4995-b114-34509c107525", + "token": "m1nO2gn-iyDXvf1ah2hF4YuBEl7YZQQChgOXJhAys3M" + }, + { + "chat": "c2420a16-02a8-47df-89b9-b84f9f66ecbb", + "token": "ljTaFNOKm7eGWnC5KRVsKmbqKPcnD9rDprEjJG8gHio" + }, + { + "chat": "02f49adf-da6f-4ed8-8441-a08519b58564", + "token": "-4ZXXeH7lhQJSZvdNMqqUW71PktnEvvN4Y2hmc65_H8" + }, + { + "chat": "912536ef-a25d-4531-9ef1-cd1a7fb04aec", + "token": "M_YFJMkfKAeZwSimylxxap7T2I_bY2AdOQChfSicbwY" + }, + { + "chat": "0b510057-ca4e-4d1d-ab48-c569992fd722", + "token": "dDulmCbP8L0Ci04ld1Py6ogqKFom_tLf_3VJNikW5so" + }, + { + "chat": "b17655c2-4167-4b51-8401-24adac60e652", + "token": "mDAVSpqVjWbTw9ZQ5IGPWfQkiUW_1Am0hd8vtMZNeiI" + }, + { + "chat": "0bd18883-3bd7-4932-ad55-721c21a77644", + "token": "SbN7F5vfjfYL2EEERxDR8bW9rZ03YMYCNCQqhNU9A8A" + }, + { + "token": "G5TcBhZmn3Ab126gFCuMYKrAFBsiWmc4-zxlo6iOr-o", + "chat": "f10b2b52-46d6-4020-8425-2b25ba37c0eb" + }, + { + "token": "flkfNfEE__Tlq4YnboJwhC9I0LD6iV4JrJHYSUmpqTY", + "chat": "97845113-2a00-4cf3-a55f-ada8676e04a4" + }, + { + "chat": "cff6bd2e-a5b1-49ad-8260-6cb9b290c6ec", + "token": "zg_0wnxAw4QgBgOKsvpD2yRXMZbY809TvLHD3hxxLq8" + } + ], + "root_group": { + "groups": [], + "checks": [ + { + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 4487, + "fails": 0, + "name": "message confirmed", + "path": "::message confirmed" + }, + { + "fails": 0, + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 456 + }, + { + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 4472, + "fails": 0, + "name": "history readable", + "path": "::history readable" + } + ], + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e" + } + } +} diff --git a/evidence/research-20261029-readiness/load-probe5a-20261029113950.txt b/evidence/research-20261029-readiness/load-probe5a-20261029113950.txt new file mode 100644 index 00000000..49b9068d --- /dev/null +++ b/evidence/research-20261029-readiness/load-probe5a-20261029113950.txt @@ -0,0 +1,4 @@ +time="2026-10-29T11:40:37Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/health/ready\": request timeout" +time="2026-10-29T11:40:41Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/health/ready\": request timeout" +time="2026-10-29T11:40:45Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/health/ready\": request timeout" +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"options":{"summaryTimeUnit":"","noColor":false,"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":64348.785066},"metrics":{"message_latency_ms":{"type":"trend","contains":"time","values":{"p(95)":183.89047805,"p(99)":227.91660417999984,"max":416.153811,"avg":109.79651016130492,"p(50)":98.04979}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":104.04333617752478,"p(50)":91.693759,"p(95)":175.95552974999998,"p(99)":217.26459979999993,"max":3001.057825}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.5819402499999999,"p(99)":1.0858867999999973,"max":197.82957,"avg":0.314270459413872,"p(50)":0.178359}},"measured_operations":{"contains":"default","values":{"count":9144,"rate":142.1005849701958},"type":"counter"},"iterations":{"type":"counter","contains":"default","values":{"count":4472,"rate":69.49626159084816}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":194.042303,"p(95)":360.47340879999996,"p(99)":507.1045991,"max":801.247776,"avg":218.48342979830016}},"application_errors{status:503}":{"contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter"},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":9415,"fails":0}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":4352,"rate":67.63142451774848}},"http_reqs":{"type":"counter","contains":"default","values":{"count":9486,"rate":147.4153706285299}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":218.69784719999987,"max":3001.115932,"avg":104.54552064473933,"p(50)":92.08764049999999,"p(95)":176.54378450000002}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.18791400780097017,"p(50)":0.1824905,"p(95)":0.328721,"p(99)":0.5858761499999996,"max":5.680971}},"data_sent":{"type":"counter","contains":"data","values":{"count":867545,"rate":13481.917321518866}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_tls_handshaking":{"values":{"avg":0.07659518458781361,"p(50)":0,"p(95)":0,"p(99)":0,"max":40.096467},"type":"trend","contains":"time"},"vus_max":{"values":{"value":32,"min":32,"max":32},"type":"gauge","contains":"default"},"data_received":{"type":"counter","contains":"data","values":{"count":12965300,"rate":201484.76753216094}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":4352,"rate":67.63142451774848}},"http_req_connecting":{"contains":"time","values":{"p(99)":0,"max":7.041569,"avg":0.011908549968374448,"p(50)":0,"p(95)":0},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.0007379295804343243,"passes":7,"fails":9479}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.001441,"p(99)":0.001576,"max":44.680786,"avg":0.0910056399957825,"p(50)":0.001239}},"http_req_duration{expected_response:true}":{"values":{"avg":103.45390451482191,"p(50)":92.086455,"p(95)":176.3376974,"p(99)":217.65719217999987,"max":416.153811},"type":"trend","contains":"time"}},"setup_data":[{"token":"uFBtq1uyBuuOxa0GQS6ayWGhmJh2lPfX8T7KZ2Fxhww","chat":"3f7f81a1-210e-43ce-b61f-5880b585bf95"},{"chat":"4f90e785-35cc-4aa6-aada-211f9101b99a","token":"1QktxWjmAcVW6o4XRxpiwgQBseTgGNptGycvnoBn_Lc"},{"chat":"c58496ae-f334-4756-bec0-ab71f0ebfc64","token":"MLfPLEC0g8yGTakggGJ66T23-1EDAXRqFvRExUuz7eA"},{"chat":"42b0cc09-6543-416e-9aad-406502af0df2","token":"w55BAcQpzQzHOfi9rUMj5ijjhaOEL6I5XFCyNhDTgPk"},{"chat":"e2230d92-d610-450a-a492-151803a5db95","token":"mr2K8Mf1jgX_rF6cyAd7cuUbJ6sQamZUSO0ywn0NF_w"},{"chat":"04a32152-5865-4ee2-9915-97d609890d0e","token":"LST3yU-cu4rUVFRb8AoPEWzIGjA18_ML3jUB0QZT2ZQ"},{"chat":"47672539-53d1-4995-b114-34509c107525","token":"m1nO2gn-iyDXvf1ah2hF4YuBEl7YZQQChgOXJhAys3M"},{"chat":"c2420a16-02a8-47df-89b9-b84f9f66ecbb","token":"ljTaFNOKm7eGWnC5KRVsKmbqKPcnD9rDprEjJG8gHio"},{"chat":"02f49adf-da6f-4ed8-8441-a08519b58564","token":"-4ZXXeH7lhQJSZvdNMqqUW71PktnEvvN4Y2hmc65_H8"},{"chat":"912536ef-a25d-4531-9ef1-cd1a7fb04aec","token":"M_YFJMkfKAeZwSimylxxap7T2I_bY2AdOQChfSicbwY"},{"chat":"0b510057-ca4e-4d1d-ab48-c569992fd722","token":"dDulmCbP8L0Ci04ld1Py6ogqKFom_tLf_3VJNikW5so"},{"chat":"b17655c2-4167-4b51-8401-24adac60e652","token":"mDAVSpqVjWbTw9ZQ5IGPWfQkiUW_1Am0hd8vtMZNeiI"},{"chat":"0bd18883-3bd7-4932-ad55-721c21a77644","token":"SbN7F5vfjfYL2EEERxDR8bW9rZ03YMYCNCQqhNU9A8A"},{"token":"G5TcBhZmn3Ab126gFCuMYKrAFBsiWmc4-zxlo6iOr-o","chat":"f10b2b52-46d6-4020-8425-2b25ba37c0eb"},{"token":"flkfNfEE__Tlq4YnboJwhC9I0LD6iV4JrJHYSUmpqTY","chat":"97845113-2a00-4cf3-a55f-ada8676e04a4"},{"chat":"cff6bd2e-a5b1-49ad-8260-6cb9b290c6ec","token":"zg_0wnxAw4QgBgOKsvpD2yRXMZbY809TvLHD3hxxLq8"}],"root_group":{"groups":[],"checks":[{"id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":4487,"fails":0,"name":"message confirmed","path":"::message confirmed"},{"fails":0,"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":456},{"id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":4472,"fails":0,"name":"history readable","path":"::history readable"}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"}}} diff --git a/evidence/research-20261029-readiness/load-probe5b-20261029114403.json b/evidence/research-20261029-readiness/load-probe5b-20261029114403.json new file mode 100644 index 00000000..739bc551 --- /dev/null +++ b/evidence/research-20261029-readiness/load-probe5b-20261029114403.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 2748, + "fails": 8976 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 287, + "fails": 0 + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 2730, + "fails": 8975 + } + ], + "name": "" + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 48265.146372 + }, + "metrics": { + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 53.976726, + "avg": 0.051124867925321664 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 0.0014861899999999986, + "max": 1022.815885, + "avg": 0.09867412765956879, + "p(50)": 0.000332, + "p(95)": 0.001348 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 11704, + "rate": 242.4938258716196 + } + }, + "checks": { + "contains": "default", + "values": { + "rate": 0.2430848372406814, + "passes": 5765, + "fails": 17951 + }, + "type": "rate" + }, + "measured_operations": { + "contains": "default", + "values": { + "count": 23512, + "rate": 487.1424157461996 + }, + "type": "counter" + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_duration{expected_response:true}": { + "values": { + "avg": 142.8760754422715, + "p(50)": 96.378041, + "p(95)": 190.4338484, + "p(99)": 244.61811164000045, + "max": 8348.125726 + }, + "type": "trend", + "contains": "time" + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "max": 30.260357, + "avg": 0.13766026902699413, + "p(50)": 0.059074, + "p(95)": 0.2692694, + "p(99)": 0.7827643399999967 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "rate": 0, + "count": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 40.19259867387115, + "p(50)": 3.0792755, + "p(95)": 138.86792120000004, + "p(99)": 194.94962489999998, + "max": 9223.74648 + } + }, + "data_sent": { + "contains": "data", + "values": { + "count": 1976024, + "rate": 40941.01330947892 + }, + "type": "counter" + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 11619, + "rate": 240.73272067689237 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 2642, + "rate": 54.73929322905152 + } + }, + "failed_writes": { + "type": "counter", + "contains": "default", + "values": { + "count": 8976, + "rate": 185.972708563197 + } + }, + "vus": { + "values": { + "value": 32, + "min": 0, + "max": 32 + }, + "type": "gauge", + "contains": "default" + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "rate": 492.7365146000391, + "count": 23782 + } + }, + "http_req_connecting": { + "contains": "time", + "values": { + "avg": 0.003927561306870743, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 4.188606 + }, + "type": "trend" + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 32, + "max": 32 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(50)": 8.438607, + "p(95)": 292.3281562, + "p(99)": 421.73497631999965, + "max": 9403.783414, + "avg": 83.65532936329453 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 17950, + "rate": 371.90397935710627 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.7548986628542596, + "passes": 17953, + "fails": 5829 + } + }, + "http_req_duration": { + "values": { + "avg": 41.16279043255401, + "p(50)": 3.936375, + "p(95)": 139.32949965, + "p(99)": 195.30290749999998, + "max": 9224.097554 + }, + "type": "trend", + "contains": "time" + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.8325314896560339, + "p(50)": 0.2419855, + "p(95)": 2.2968611, + "p(99)": 19.75594333999935, + "max": 194.209644 + } + }, + "application_errors{status:503}": { + "values": { + "count": 17950, + "rate": 371.90397935710627 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default" + }, + "data_received": { + "values": { + "count": 9568019, + "rate": 198238.68193116438 + }, + "type": "counter", + "contains": "data" + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "avg": 41.119018477407764, + "p(50)": 3.865505, + "p(95)": 140.496066, + "p(99)": 199.81785927999985, + "max": 9224.097554 + } + } + }, + "setup_data": [ + { + "chat": "07ceafee-fef6-4381-9460-d29190bea3b0", + "token": "rYvDojwz0SNZjbb01nZC-kQvF75CgB0-B1bnRDPMQHI" + }, + { + "chat": "db30f908-c35d-4ae5-a4e3-69c8c99baaf3", + "token": "XOtZizWW9r64SIV4GqJCpVOXw7VkeDpezGZguSGjMkc" + }, + { + "chat": "4933bdbd-7753-4862-a883-f28899e5fb67", + "token": "p1kmAMBYp759qIDjjf0d_78a2eicMOeU8zJ-kxkfFPA" + }, + { + "token": "q_O1wod2DOPVnI8QejC-VhCii2y8vSUFaNsfhMhvGWg", + "chat": "240f0f09-794a-4a51-9f74-46a51ad8d14f" + }, + { + "chat": "a3349463-c6de-49e3-bb96-657624afe474", + "token": "VSu-00l45rkGlz_qwr7ASV7Jg1jUc16rXiIY2rZz4VE" + }, + { + "chat": "583573ff-fc68-4f99-9676-232d007bb010", + "token": "BuYnbTIeTfg5HdNCapIy3se2ydRHwhm7OMZ7_OJTe8Y" + }, + { + "chat": "531a7e45-ed21-470f-ad39-764812f29524", + "token": "CbmstVohkxL9zanqysbkBT1XLU3bOInlV8xw3oSW60s" + }, + { + "chat": "00638361-1799-4564-9f00-8b796ceefb76", + "token": "TKqv8EtSKe3_5Uuya2s6I5vi5ZSidvT1U0GJubOJ_4k" + }, + { + "chat": "04fba53d-8567-4d05-9927-319c23abf852", + "token": "LVry-K9fj49mWw9m3DSm0teAUZw4FOyeBd5YdZ1qtJw" + }, + { + "token": "IzNAsLw087ctMkkgTkIJ9PdndrMpzanu7oW4f71ifBc", + "chat": "1fcef6d9-46e6-4b58-8a55-d2f5a30e6dfc" + }, + { + "chat": "ad0e6e7b-bbde-40d1-9fce-74a7dfc41d74", + "token": "x4el9cazDLjYOhqjkP_PZi0DpcbnE1tRMy5wWI0lvkk" + }, + { + "chat": "ce7686aa-b5eb-45ce-99ad-1b7584aa1d96", + "token": "I-hUgIWfv6rGyrPpUczLMXLrhK2KTRM0wjktXmBHm9s" + }, + { + "chat": "0e3942a8-342d-4d28-8d52-522efe316348", + "token": "FvWsRNKntHIpNZRCf3JcIVs9I6GAI8jZEGfXyGwhhxg" + }, + { + "chat": "7d247736-d38c-4522-b461-6f65cbb5708d", + "token": "0NE3SzlSXyip1I_UiSp3qBtC2BYRCsjSvvGQKGAYWdU" + }, + { + "chat": "3484f502-ff37-4b79-8586-f704905756b8", + "token": "EUlziUgzWI_88obIeOHWK7DGJDOW0S9GHLuOW0sKucM" + }, + { + "chat": "218ef382-a1b1-4403-9378-1f0349ed2ff3", + "token": "AQJ4ckP1Nrz02gR1At8DzZ0vg5davT4YBo9987Bu5g8" + } + ] + } +} diff --git a/evidence/research-20261029-readiness/load-probe5b-20261029114403.txt b/evidence/research-20261029-readiness/load-probe5b-20261029114403.txt new file mode 100644 index 00000000..6edfe821 --- /dev/null +++ b/evidence/research-20261029-readiness/load-probe5b-20261029114403.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":2748,"fails":8976},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":287,"fails":0},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":2730,"fails":8975}],"name":""},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":48265.146372},"metrics":{"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":53.976726,"avg":0.051124867925321664}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.0014861899999999986,"max":1022.815885,"avg":0.09867412765956879,"p(50)":0.000332,"p(95)":0.001348}},"iterations":{"type":"counter","contains":"default","values":{"count":11704,"rate":242.4938258716196}},"checks":{"contains":"default","values":{"rate":0.2430848372406814,"passes":5765,"fails":17951},"type":"rate"},"measured_operations":{"contains":"default","values":{"count":23512,"rate":487.1424157461996},"type":"counter"},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_duration{expected_response:true}":{"values":{"avg":142.8760754422715,"p(50)":96.378041,"p(95)":190.4338484,"p(99)":244.61811164000045,"max":8348.125726},"type":"trend","contains":"time"},"http_req_sending":{"type":"trend","contains":"time","values":{"max":30.260357,"avg":0.13766026902699413,"p(50)":0.059074,"p(95)":0.2692694,"p(99)":0.7827643399999967}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"rate":0,"count":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":40.19259867387115,"p(50)":3.0792755,"p(95)":138.86792120000004,"p(99)":194.94962489999998,"max":9223.74648}},"data_sent":{"contains":"data","values":{"count":1976024,"rate":40941.01330947892},"type":"counter"},"attempted_messages":{"type":"counter","contains":"default","values":{"count":11619,"rate":240.73272067689237}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":2642,"rate":54.73929322905152}},"failed_writes":{"type":"counter","contains":"default","values":{"count":8976,"rate":185.972708563197}},"vus":{"values":{"value":32,"min":0,"max":32},"type":"gauge","contains":"default"},"http_reqs":{"type":"counter","contains":"default","values":{"rate":492.7365146000391,"count":23782}},"http_req_connecting":{"contains":"time","values":{"avg":0.003927561306870743,"p(50)":0,"p(95)":0,"p(99)":0,"max":4.188606},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":8.438607,"p(95)":292.3281562,"p(99)":421.73497631999965,"max":9403.783414,"avg":83.65532936329453}},"application_errors":{"type":"counter","contains":"default","values":{"count":17950,"rate":371.90397935710627}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.7548986628542596,"passes":17953,"fails":5829}},"http_req_duration":{"values":{"avg":41.16279043255401,"p(50)":3.936375,"p(95)":139.32949965,"p(99)":195.30290749999998,"max":9224.097554},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.8325314896560339,"p(50)":0.2419855,"p(95)":2.2968611,"p(99)":19.75594333999935,"max":194.209644}},"application_errors{status:503}":{"values":{"count":17950,"rate":371.90397935710627},"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default"},"data_received":{"values":{"count":9568019,"rate":198238.68193116438},"type":"counter","contains":"data"},"message_latency_ms":{"type":"trend","contains":"time","values":{"avg":41.119018477407764,"p(50)":3.865505,"p(95)":140.496066,"p(99)":199.81785927999985,"max":9224.097554}}},"setup_data":[{"chat":"07ceafee-fef6-4381-9460-d29190bea3b0","token":"rYvDojwz0SNZjbb01nZC-kQvF75CgB0-B1bnRDPMQHI"},{"chat":"db30f908-c35d-4ae5-a4e3-69c8c99baaf3","token":"XOtZizWW9r64SIV4GqJCpVOXw7VkeDpezGZguSGjMkc"},{"chat":"4933bdbd-7753-4862-a883-f28899e5fb67","token":"p1kmAMBYp759qIDjjf0d_78a2eicMOeU8zJ-kxkfFPA"},{"token":"q_O1wod2DOPVnI8QejC-VhCii2y8vSUFaNsfhMhvGWg","chat":"240f0f09-794a-4a51-9f74-46a51ad8d14f"},{"chat":"a3349463-c6de-49e3-bb96-657624afe474","token":"VSu-00l45rkGlz_qwr7ASV7Jg1jUc16rXiIY2rZz4VE"},{"chat":"583573ff-fc68-4f99-9676-232d007bb010","token":"BuYnbTIeTfg5HdNCapIy3se2ydRHwhm7OMZ7_OJTe8Y"},{"chat":"531a7e45-ed21-470f-ad39-764812f29524","token":"CbmstVohkxL9zanqysbkBT1XLU3bOInlV8xw3oSW60s"},{"chat":"00638361-1799-4564-9f00-8b796ceefb76","token":"TKqv8EtSKe3_5Uuya2s6I5vi5ZSidvT1U0GJubOJ_4k"},{"chat":"04fba53d-8567-4d05-9927-319c23abf852","token":"LVry-K9fj49mWw9m3DSm0teAUZw4FOyeBd5YdZ1qtJw"},{"token":"IzNAsLw087ctMkkgTkIJ9PdndrMpzanu7oW4f71ifBc","chat":"1fcef6d9-46e6-4b58-8a55-d2f5a30e6dfc"},{"chat":"ad0e6e7b-bbde-40d1-9fce-74a7dfc41d74","token":"x4el9cazDLjYOhqjkP_PZi0DpcbnE1tRMy5wWI0lvkk"},{"chat":"ce7686aa-b5eb-45ce-99ad-1b7584aa1d96","token":"I-hUgIWfv6rGyrPpUczLMXLrhK2KTRM0wjktXmBHm9s"},{"chat":"0e3942a8-342d-4d28-8d52-522efe316348","token":"FvWsRNKntHIpNZRCf3JcIVs9I6GAI8jZEGfXyGwhhxg"},{"chat":"7d247736-d38c-4522-b461-6f65cbb5708d","token":"0NE3SzlSXyip1I_UiSp3qBtC2BYRCsjSvvGQKGAYWdU"},{"chat":"3484f502-ff37-4b79-8586-f704905756b8","token":"EUlziUgzWI_88obIeOHWK7DGJDOW0S9GHLuOW0sKucM"},{"chat":"218ef382-a1b1-4403-9378-1f0349ed2ff3","token":"AQJ4ckP1Nrz02gR1At8DzZ0vg5davT4YBo9987Bu5g8"}]}} diff --git a/evidence/research-20261029-readiness/nodes.txt b/evidence/research-20261029-readiness/nodes.txt new file mode 100644 index 00000000..e6b77ed4 --- /dev/null +++ b/evidence/research-20261029-readiness/nodes.txt @@ -0,0 +1,4 @@ +NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME +dev.asisti.tech Ready 252d v1.33.13 100.99.166.40 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 +marlosrv0 Ready 254d v1.33.13 192.168.1.37 Ubuntu 24.04.5 LTS 6.8.0-147-generic containerd://1.7.29 +srv0.agapov.space Ready 247d v1.33.13 100.108.186.94 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 diff --git a/evidence/research-20261029-readiness/pods-probe2a-20261029113757.txt b/evidence/research-20261029-readiness/pods-probe2a-20261029113757.txt new file mode 100644 index 00000000..4f1af143 --- /dev/null +++ b/evidence/research-20261029-readiness/pods-probe2a-20261029113757.txt @@ -0,0 +1,3 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-84fbf9968-kdhg8 1/1 Running 0 56s 10.1.25.110 dev.asisti.tech +api-84fbf9968-szvb2 1/1 Running 0 57s 10.1.25.112 dev.asisti.tech diff --git a/evidence/research-20261029-readiness/pods-probe2b-20261029114146.txt b/evidence/research-20261029-readiness/pods-probe2b-20261029114146.txt new file mode 100644 index 00000000..3bd09f1a --- /dev/null +++ b/evidence/research-20261029-readiness/pods-probe2b-20261029114146.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-84fbf9968-lhv2d 1/1 Running 2 (52s ago) 72s 10.1.25.71 dev.asisti.tech diff --git a/evidence/research-20261029-readiness/pods-probe5a-20261029113950.txt b/evidence/research-20261029-readiness/pods-probe5a-20261029113950.txt new file mode 100644 index 00000000..e53a106f --- /dev/null +++ b/evidence/research-20261029-readiness/pods-probe5a-20261029113950.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-6748cbfcbb-fxqhl 1/1 Running 0 40s 10.1.25.94 dev.asisti.tech diff --git a/evidence/research-20261029-readiness/pods-probe5b-20261029114403.txt b/evidence/research-20261029-readiness/pods-probe5b-20261029114403.txt new file mode 100644 index 00000000..a7b77679 --- /dev/null +++ b/evidence/research-20261029-readiness/pods-probe5b-20261029114403.txt @@ -0,0 +1,2 @@ +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +api-6748cbfcbb-c9lgz 1/1 Running 0 36s 10.1.25.68 dev.asisti.tech diff --git a/evidence/research-20261029-readiness/profiles.csv b/evidence/research-20261029-readiness/profiles.csv new file mode 100644 index 00000000..cce2594f --- /dev/null +++ b/evidence/research-20261029-readiness/profiles.csv @@ -0,0 +1,5 @@ +profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool,vus,duration +probe2a,probe2a-20261029113757,1,1000,512,8,32,30 +probe5a,probe5a-20261029113950,1,1000,512,8,32,30 +probe2b,probe2b-20261029114146,1,1000,512,8,32,30 +probe5b,probe5b-20261029114403,1,1000,512,8,32,30 diff --git a/evidence/research-20261029-readiness/resources-probe2a-20261029113757.txt b/evidence/research-20261029-readiness/resources-probe2a-20261029113757.txt new file mode 100644 index 00000000..d4311c03 --- /dev/null +++ b/evidence/research-20261029-readiness/resources-probe2a-20261029113757.txt @@ -0,0 +1,59 @@ +UTC 2026-10-29T11:39:00Z +error: Metrics API not available +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:39:09Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-kdhg8 2m 22Mi +api-84fbf9968-szvb2 2m 22Mi +postgres-0 4m 57Mi +valkey-0 10m 9Mi +valkey-1 5m 15Mi +valkey-2 6m 4Mi +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|3 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:39:15Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-kdhg8 199m 9Mi +api-84fbf9968-szvb2 145m 9Mi +load-probe2a-20261029113757-ql6t5 84m 19Mi +postgres-0 114m 64Mi +valkey-0 29m 9Mi +valkey-1 17m 15Mi +valkey-2 7m 4Mi +active|IO|WalSync|1 +active|LWLock|WALWrite|1 +active|||2 +idle|Client|ClientRead|10 +idle|||1 +idle in transaction|Client|ClientRead|3 +UTC 2026-10-29T11:39:38Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-kdhg8 5m 10Mi +api-84fbf9968-szvb2 41m 10Mi +load-probe2a-20261029113757-ql6t5 10m 24Mi +postgres-0 10m 64Mi +valkey-0 39m 9Mi +valkey-1 4m 14Mi +valkey-2 6m 4Mi +active|IO|WalSync|1 +active|LWLock|WALWrite|3 +active|||3 +idle|Client|ClientRead|7 +idle|||3 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:39:45Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-kdhg8 285m 14Mi +api-84fbf9968-szvb2 204m 13Mi +load-probe2a-20261029113757-ql6t5 64m 27Mi +postgres-0 422m 94Mi +valkey-0 75m 10Mi +valkey-1 98m 15Mi +valkey-2 29m 4Mi +active|||1 +idle|Client|ClientRead|16 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-readiness/resources-probe2b-20261029114146.txt b/evidence/research-20261029-readiness/resources-probe2b-20261029114146.txt new file mode 100644 index 00000000..df83d058 --- /dev/null +++ b/evidence/research-20261029-readiness/resources-probe2b-20261029114146.txt @@ -0,0 +1,48 @@ +UTC 2026-10-29T11:43:03Z +NAME CPU(cores) MEMORY(bytes) +api-84fbf9968-lhv2d 3m 22Mi +postgres-0 3m 59Mi +valkey-0 9m 10Mi +valkey-1 6m 14Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:43:18Z +error: Metrics API not available +active|||1 +idle|Client|ClientRead|1 +idle|||1 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:43:24Z +error: Metrics API not available +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:43:30Z +error: Metrics API not available +active|||4 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:43:36Z +error: Metrics API not available +active|Client|ClientRead|1 +active|||1 +idle|Client|ClientRead|6 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:43:44Z +error: Metrics API not available +active|Client|ClientRead|1 +active|||2 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:43:50Z +error: Metrics API not available +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:43:57Z +error: Metrics API not available +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-readiness/resources-probe5a-20261029113950.txt b/evidence/research-20261029-readiness/resources-probe5a-20261029113950.txt new file mode 100644 index 00000000..295890f9 --- /dev/null +++ b/evidence/research-20261029-readiness/resources-probe5a-20261029113950.txt @@ -0,0 +1,101 @@ +UTC 2026-10-29T11:40:35Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-fxqhl 2m 22Mi +postgres-0 8m 56Mi +valkey-0 12m 10Mi +valkey-1 6m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:40:57Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-fxqhl 3m 23Mi +load-probe5a-20261029113950-d67qv 11m 15Mi +postgres-0 5m 56Mi +valkey-0 10m 10Mi +valkey-1 4m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:41:03Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-fxqhl 121m 61Mi +load-probe5a-20261029113950-d67qv 14m 17Mi +postgres-0 17m 59Mi +valkey-0 8m 10Mi +valkey-1 6m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:41:10Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-fxqhl 121m 61Mi +load-probe5a-20261029113950-d67qv 14m 17Mi +postgres-0 17m 59Mi +valkey-0 8m 10Mi +valkey-1 6m 15Mi +valkey-2 6m 4Mi +active|||2 +idle|Client|ClientRead|6 +idle|||1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:41:16Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-fxqhl 168m 11Mi +load-probe5a-20261029113950-d67qv 14m 17Mi +postgres-0 17m 59Mi +valkey-0 37m 10Mi +valkey-1 5m 15Mi +valkey-2 40m 4Mi +active|IO|WalSync|1 +active|LWLock|WALWrite|1 +active|||1 +idle|Client|ClientRead|6 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:41:23Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-fxqhl 168m 11Mi +load-probe5a-20261029113950-d67qv 14m 17Mi +postgres-0 17m 59Mi +valkey-0 37m 10Mi +valkey-1 5m 15Mi +valkey-2 40m 4Mi +active|||2 +idle|Client|ClientRead|5 +idle|||1 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:41:30Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-fxqhl 695m 15Mi +load-probe5a-20261029113950-d67qv 168m 29Mi +postgres-0 370m 75Mi +valkey-0 155m 10Mi +valkey-1 34m 15Mi +valkey-2 40m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:41:37Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-fxqhl 695m 15Mi +load-probe5a-20261029113950-d67qv 168m 29Mi +postgres-0 370m 75Mi +valkey-0 155m 10Mi +valkey-1 34m 15Mi +valkey-2 40m 4Mi +active|||2 +idle|Client|ClientRead|6 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:41:43Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-fxqhl 695m 15Mi +postgres-0 370m 75Mi +valkey-0 155m 10Mi +valkey-1 34m 15Mi +valkey-2 40m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-readiness/resources-probe5b-20261029114403.txt b/evidence/research-20261029-readiness/resources-probe5b-20261029114403.txt new file mode 100644 index 00000000..48c148ae --- /dev/null +++ b/evidence/research-20261029-readiness/resources-probe5b-20261029114403.txt @@ -0,0 +1,89 @@ +UTC 2026-10-29T11:44:46Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-c9lgz 3m 23Mi +postgres-0 12m 62Mi +valkey-0 9m 10Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:44:53Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-c9lgz 3m 23Mi +postgres-0 5m 62Mi +valkey-0 9m 10Mi +valkey-1 5m 15Mi +valkey-2 6m 4Mi +active|||1 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:44:59Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-c9lgz 2m 23Mi +load-probe5b-20261029114403-phwgc 48m 18Mi +postgres-0 40m 69Mi +valkey-0 21m 10Mi +valkey-1 8m 15Mi +valkey-2 8m 4Mi +active|||1 +idle|Client|ClientRead|3 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:45:06Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-c9lgz 2m 23Mi +load-probe5b-20261029114403-phwgc 48m 18Mi +postgres-0 40m 69Mi +valkey-0 21m 10Mi +valkey-1 8m 15Mi +valkey-2 8m 4Mi +active|||1 +idle|Client|ClientRead|4 +idle|||1 +idle in transaction|Client|ClientRead|3 +idle in transaction|||1 +UTC 2026-10-29T11:45:13Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-c9lgz 2m 23Mi +load-probe5b-20261029114403-phwgc 48m 18Mi +postgres-0 40m 69Mi +valkey-0 21m 10Mi +valkey-1 8m 15Mi +valkey-2 8m 4Mi +active|IO|WalSync|1 +active|||1 +idle|Client|ClientRead|7 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:45:19Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-c9lgz 282m 12Mi +load-probe5b-20261029114403-phwgc 26m 18Mi +postgres-0 347m 81Mi +valkey-0 76m 10Mi +valkey-1 50m 15Mi +valkey-2 30m 5Mi +active|IO|WalWrite|1 +active|||3 +idle|Client|ClientRead|2 +idle in transaction|Client|ClientRead|4 +UTC 2026-10-29T11:45:26Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-c9lgz 282m 12Mi +load-probe5b-20261029114403-phwgc 26m 18Mi +postgres-0 347m 81Mi +valkey-0 76m 10Mi +valkey-1 50m 15Mi +valkey-2 30m 5Mi +active|||1 +idle|Client|ClientRead|7 +idle in transaction|Client|ClientRead|2 +UTC 2026-10-29T11:45:36Z +NAME CPU(cores) MEMORY(bytes) +api-6748cbfcbb-c9lgz 503m 13Mi +load-probe5b-20261029114403-phwgc 330m 30Mi +postgres-0 347m 81Mi +valkey-0 131m 10Mi +valkey-1 50m 15Mi +valkey-2 43m 4Mi +active|||1 +idle|Client|ClientRead|8 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029-readiness/restore-values.yaml b/evidence/research-20261029-readiness/restore-values.yaml new file mode 100644 index 00000000..4e915dac --- /dev/null +++ b/evidence/research-20261029-readiness/restore-values.yaml @@ -0,0 +1,61 @@ +api: + env: + DEPENDENCY_POOL_SIZE: "8" + DEPENDENCY_TIMEOUT_MS: "2000" + GOMEMLIMIT: 160MiB + REQUEST_TIMEOUT_SECONDS: "4" + SESSION_TTL_SECONDS: "3600" + SHUTDOWN_TIMEOUT_SECONDS: "5" + replicas: 2 + resources: + limits: + cpu: "1" + memory: 256Mi + requests: + cpu: 250m + memory: 128Mi +autoscaling: + cpuPercent: 60 + enabled: true + maxReplicas: 4 + minReplicas: 2 +databaseSecret: messenger-secrets +image: + digest: sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 + repository: asisti.registry.twcstorage.ru/mtusi2026lab3 +imagePullSecret: registry-pull +ingress: + className: traefik + clusterIssuer: letsencrypt-prod + host: hl.agapov.space +load: + duration: 30 + enabled: false + run: manual + script: scaling.js + vus: 32 +monitoring: + serviceMonitor: false +postgres: + image: postgres:17.6-alpine + resources: + limits: + cpu: "1" + memory: 512Mi + requests: + cpu: 250m + memory: 256Mi + storage: 2Gi +storageClass: "" +valkey: + image: valkey/valkey:8.1.3-alpine + maxmemory: 64mb + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 100m + memory: 96Mi + shards: 3 + storage: 1Gi diff --git a/evidence/research-20261029-readiness/restore.txt b/evidence/research-20261029-readiness/restore.txt new file mode 100644 index 00000000..72776e4f --- /dev/null +++ b/evidence/research-20261029-readiness/restore.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:45:43 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 32 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-readiness/rollout-probe2a.txt b/evidence/research-20261029-readiness/rollout-probe2a.txt new file mode 100644 index 00000000..04d28ab0 --- /dev/null +++ b/evidence/research-20261029-readiness/rollout-probe2a.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:37:58 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 28 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-readiness/rollout-probe2b.txt b/evidence/research-20261029-readiness/rollout-probe2b.txt new file mode 100644 index 00000000..3e88dca9 --- /dev/null +++ b/evidence/research-20261029-readiness/rollout-probe2b.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:41:47 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 30 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-readiness/rollout-probe5a.txt b/evidence/research-20261029-readiness/rollout-probe5a.txt new file mode 100644 index 00000000..8e52bac9 --- /dev/null +++ b/evidence/research-20261029-readiness/rollout-probe5a.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:39:52 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 29 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-readiness/rollout-probe5b.txt b/evidence/research-20261029-readiness/rollout-probe5b.txt new file mode 100644 index 00000000..4f389573 --- /dev/null +++ b/evidence/research-20261029-readiness/rollout-probe5b.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:44:05 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 31 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029-readiness/source.sha256 b/evidence/research-20261029-readiness/source.sha256 new file mode 100644 index 00000000..b6c26a83 --- /dev/null +++ b/evidence/research-20261029-readiness/source.sha256 @@ -0,0 +1,3 @@ +0a58dff9ad7acf8f228e0fd1c2a670bbe7e18a11360715b47659104832e34892 student-tests/load/scaling.js +c0506f65b976d54273f3e2fb3404b732929a276263ff8974c2a6ab6e27820b8b charts/messenger/values.yaml +60e09dd38fd1d413b744f21b57f64ba83e49a5ae1b4251aa5bf20be033f90cfb internal/controller/http/fiber/errors.go diff --git a/evidence/research-20261029-readiness/values-probe5b-20261029114403.json b/evidence/research-20261029-readiness/values-probe5b-20261029114403.json new file mode 100644 index 00000000..b11f8826 --- /dev/null +++ b/evidence/research-20261029-readiness/values-probe5b-20261029114403.json @@ -0,0 +1 @@ +{"api":{"env":{"DEPENDENCY_POOL_SIZE":"8","DEPENDENCY_TIMEOUT_MS":"2000","GOMEMLIMIT":"80MiB","REQUEST_TIMEOUT_SECONDS":"4","SESSION_TTL_SECONDS":"3600","SHUTDOWN_TIMEOUT_SECONDS":"5"},"nodeSelector":{"kubernetes.io/hostname":"dev.asisti.tech"},"readiness":{"failureThreshold":1,"timeoutSeconds":5},"replicas":1,"resources":{"limits":{"cpu":"1000m","memory":"512Mi"},"requests":{"cpu":"1000m","memory":"512Mi"}}},"autoscaling":{"cpuPercent":60,"enabled":false,"maxReplicas":4,"minReplicas":2},"databaseSecret":"messenger-secrets","image":{"digest":"sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3","repository":"asisti.registry.twcstorage.ru/mtusi2026lab3"},"imagePullSecret":"registry-pull","ingress":{"className":"traefik","clusterIssuer":"letsencrypt-prod","host":"hl.agapov.space"},"load":{"duration":30,"enabled":false,"run":"manual","script":"scaling.js","vus":32},"monitoring":{"serviceMonitor":false},"postgres":{"image":"postgres:17.6-alpine","resources":{"limits":{"cpu":"1","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}},"storage":"2Gi"},"storageClass":"","valkey":{"image":"valkey/valkey:8.1.3-alpine","maxmemory":"64mb","resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"96Mi"}},"shards":3,"storage":"1Gi"}} diff --git a/evidence/research-20261029/README.md b/evidence/research-20261029/README.md new file mode 100644 index 00000000..c7cc3c96 --- /dev/null +++ b/evidence/research-20261029/README.md @@ -0,0 +1,5 @@ +# Предварительная серия, не полная матрица + +Первый запуск 29.10.2026 остановился на подготовке fixed4: POST chat вернул 503. fixed1 и fixed2 содержат реальные измерения, но серия не завершена. Helm restore.txt подтверждает восстановление обычных значений. Эти результаты не подменяют окончательную матрицу research-20261029-final. + +Изменение следующего запуска касается подготовки: до пяти независимых попыток создать синтетического участника с новым именем. Нагрузка после setup сохраняет прежние операции и настройки. Неуспешные частичные fixtures остаются синтетическими и не используются при измерении. diff --git a/evidence/research-20261029/base-revision.txt b/evidence/research-20261029/base-revision.txt new file mode 100644 index 00000000..32abb9b4 --- /dev/null +++ b/evidence/research-20261029/base-revision.txt @@ -0,0 +1 @@ +7b7e23fd029beea47e6f625a96cb98d2fe04bafb diff --git a/evidence/research-20261029/dataset-during.txt b/evidence/research-20261029/dataset-during.txt new file mode 100644 index 00000000..c3cf3b56 --- /dev/null +++ b/evidence/research-20261029/dataset-during.txt @@ -0,0 +1,3 @@ +users|114 +chats|72 +messages|6541 diff --git a/evidence/research-20261029/date.txt b/evidence/research-20261029/date.txt new file mode 100644 index 00000000..db041ee5 --- /dev/null +++ b/evidence/research-20261029/date.txt @@ -0,0 +1 @@ +2026-10-29T10:56:32Z diff --git a/evidence/research-20261029/deployment-fixed4.json b/evidence/research-20261029/deployment-fixed4.json new file mode 100644 index 00000000..41b39b28 --- /dev/null +++ b/evidence/research-20261029/deployment-fixed4.json @@ -0,0 +1,214 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "8", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 14, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60157738", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "25be752194917b470e363f8148d7f90539ac1e677c53d10066d788634e0933dc", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "256Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T11:02:31Z", + "message": "ReplicaSet \"api-54f7cc6f98\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + }, + { + "lastTransitionTime": "2026-10-29T11:02:48Z", + "lastUpdateTime": "2026-10-29T11:02:48Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + } + ], + "observedGeneration": 14, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/research-20261029/load-fixed1-20261029105633.json b/evidence/research-20261029/load-fixed1-20261029105633.json new file mode 100644 index 00000000..862741e9 --- /dev/null +++ b/evidence/research-20261029/load-fixed1-20261029105633.json @@ -0,0 +1,381 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "metrics": { + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 22079, + "rate": 495.9949471155564 + } + }, + "message_latency_ms": { + "contains": "time", + "values": { + "avg": 13.097947987539532, + "p(50)": 1.574717, + "p(95)": 85.50984919999995, + "p(99)": 150.3723336400002, + "max": 4011.296367 + }, + "type": "trend" + }, + "application_errors{status:503}": { + "type": "counter", + "contains": "default", + "values": { + "count": 40380, + "rate": 907.1187990636427 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "count": 3618694, + "rate": 81292.35649972287 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 21829, + "rate": 490.37880794354277 + } + }, + "failed_writes": { + "type": "counter", + "contains": "default", + "values": { + "count": 20200, + "rate": 453.7840450987019 + } + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 44441, + "rate": 998.3473637738322 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.4209481391957903, + "p(50)": 0.147274, + "p(95)": 1.23312, + "p(99)": 5.622513199999918, + "max": 118.223969 + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 147.37608119999996, + "max": 17217.0233, + "avg": 19.97902145071003, + "p(50)": 1.591889, + "p(95)": 85.015744 + } + }, + "data_received": { + "type": "counter", + "contains": "data", + "values": { + "count": 9011186, + "rate": 202432.2987236035 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 1629, + "rate": 36.59476284484086 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 39.50049771819362, + "p(50)": 3.621493, + "p(95)": 173.62030449999978, + "p(99)": 313.30770866000023, + "max": 17333.339227 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 40405, + "rate": 907.680412980844 + } + }, + "vus_max": { + "contains": "default", + "values": { + "max": 32, + "value": 32, + "min": 32 + }, + "type": "gauge" + }, + "http_req_sending": { + "contains": "time", + "values": { + "avg": 0.07879365720843365, + "p(50)": 0.041363, + "p(95)": 0.210379, + "p(99)": 0.4355294, + "max": 22.5541 + }, + "type": "trend" + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "max": 1023.04951, + "avg": 0.048188861209238244, + "p(50)": 0.000248, + "p(95)": 0.001254, + "p(99)": 0.0014515999999999984 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 43840, + "rate": 984.8461652043114 + } + }, + "checks": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.08983398283513166, + "passes": 3988, + "fails": 40405 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "http_req_duration{expected_response:true}": { + "values": { + "avg": 118.0205892210109, + "p(50)": 87.690635, + "p(95)": 171.703979, + "p(99)": 224.8572748, + "max": 13464.977187 + }, + "type": "trend", + "contains": "time" + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0.9091829616795302, + "passes": 40405, + "fails": 4036 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 19.47927965430555, + "p(50)": 1.243483, + "p(95)": 84.549855, + "p(99)": 146.88012539999997, + "max": 17216.730576 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0, + "p(99)": 0, + "max": 10.083099, + "avg": 0.0023669291870119934, + "p(50)": 0 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "p(95)": 0, + "p(99)": 0, + "max": 50.075135, + "avg": 0.022014142323530078, + "p(50)": 0 + } + } + }, + "setup_data": [ + { + "chat": "c8c60bf0-7fcf-4274-8b50-5d6adb564946", + "token": "9duDXrD58v_2NMgZJPkHLRmyL3yOTElmvPgIUNjrcpo" + }, + { + "chat": "6edc3423-cc40-4723-85df-666ce0084329", + "token": "qRoW49ozXDobXzljQbTs39uLF8t2p-YQaDZVXh71CHg" + }, + { + "chat": "3470a12f-8e0b-4c2a-bd00-a53932d57586", + "token": "VabW8enBhdNe6fjbucW4wwTIlFYWJOTgG9VWLvs0cKs" + }, + { + "chat": "eb77134a-7a8c-4e82-a813-7379ff2fcdce", + "token": "7BjAAIUh3fw9J8wFFKpQMrWFH7L7mZem1nJDS2XvDQE" + }, + { + "chat": "7add9a73-e585-4e74-abff-dbc89c020615", + "token": "Y-8KJ9qP1srzvI1sqkx582GjLLcsYgkmesNzmHiw_Tc" + }, + { + "chat": "99414aa5-12e8-4d37-b7dd-63e4e80d99b6", + "token": "BCGZMDIFIHUJsorwX8l8BseiECDcFB695YQiqb8D37U" + }, + { + "chat": "dd34730f-2132-4f29-bbd1-a0514bd9e0df", + "token": "m1JXce2774OyAdePY1qkSHSMxr-3wZyVDtu86JyVefQ" + }, + { + "chat": "390a5c9e-ab33-44bb-a119-dde6b21ed707", + "token": "_zK3HD9XEllUjAxL_57AIm_bJstke50j2-SJidJbYIo" + }, + { + "chat": "49a1267e-21d8-46ea-9a25-919fe009c38e", + "token": "joGOpp-HBHpoiIeKrvpzq_QoRjIRAB5Vydfg4TIV3w0" + }, + { + "chat": "7558462d-fd6f-4104-8705-6257588c8a84", + "token": "edkhBYTzEC-UVVW1sO-brVT_ffH6kl9BZURMkXVDY1U" + }, + { + "chat": "4e355da1-f8a3-4f25-94eb-2350a2ae2808", + "token": "V1UrP-D1Ly0DsVAGVcYv1FdNMMkF5-xU1RUU9RZ5Qww" + }, + { + "chat": "36563727-64ed-469e-8d13-06574d327670", + "token": "qJHdSFhBA_Jgv3xIOqeuMoyNSTZpyJOw9BJu1hVnQlo" + }, + { + "chat": "2f19d4b5-bb30-45a9-8474-0fa5451f7e92", + "token": "_F52VbiEjVQQkAdWr30jaouL62c8M-skg3oMG9RBW6U" + }, + { + "chat": "c7602fae-761a-43b0-be07-b00bbd93d439", + "token": "kdTG_Al_X57k8w2CTaxGHl7eEvTTuS3Z4pcBlpWLyzw" + }, + { + "token": "XA_2iuThB_iaqHTToHO2fxQ1efVsIs2kLH5Mfhjcgic", + "chat": "89b7a31c-e581-4841-9e32-c234405a162f" + }, + { + "chat": "17ce6209-1f8b-4337-8901-88fd95c14a18", + "token": "8FB4pw0IYWKkCIfwB3P5QL84PzaTIZyENYsJrww-7fA" + } + ], + "root_group": { + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 1902, + "fails": 20200 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 205, + "fails": 7 + }, + { + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 1881, + "fails": 20198, + "name": "history readable" + } + ], + "name": "" + }, + "options": { + "summaryTimeUnit": "", + "noColor": false, + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ] + }, + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 44514.566385 + } + } +} diff --git a/evidence/research-20261029/load-fixed1-20261029105633.txt b/evidence/research-20261029/load-fixed1-20261029105633.txt new file mode 100644 index 00000000..8ed0a62f --- /dev/null +++ b/evidence/research-20261029/load-fixed1-20261029105633.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":22079,"rate":495.9949471155564}},"message_latency_ms":{"contains":"time","values":{"avg":13.097947987539532,"p(50)":1.574717,"p(95)":85.50984919999995,"p(99)":150.3723336400002,"max":4011.296367},"type":"trend"},"application_errors{status:503}":{"type":"counter","contains":"default","values":{"count":40380,"rate":907.1187990636427},"thresholds":{"count>=0":{"ok":true}}},"data_sent":{"type":"counter","contains":"data","values":{"count":3618694,"rate":81292.35649972287}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":21829,"rate":490.37880794354277}},"failed_writes":{"type":"counter","contains":"default","values":{"count":20200,"rate":453.7840450987019}},"http_reqs":{"type":"counter","contains":"default","values":{"count":44441,"rate":998.3473637738322}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.4209481391957903,"p(50)":0.147274,"p(95)":1.23312,"p(99)":5.622513199999918,"max":118.223969}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":147.37608119999996,"max":17217.0233,"avg":19.97902145071003,"p(50)":1.591889,"p(95)":85.015744}},"data_received":{"type":"counter","contains":"data","values":{"count":9011186,"rate":202432.2987236035}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":1629,"rate":36.59476284484086}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":39.50049771819362,"p(50)":3.621493,"p(95)":173.62030449999978,"p(99)":313.30770866000023,"max":17333.339227}},"application_errors":{"type":"counter","contains":"default","values":{"count":40405,"rate":907.680412980844}},"vus_max":{"contains":"default","values":{"max":32,"value":32,"min":32},"type":"gauge"},"http_req_sending":{"contains":"time","values":{"avg":0.07879365720843365,"p(50)":0.041363,"p(95)":0.210379,"p(99)":0.4355294,"max":22.5541},"type":"trend"},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":1023.04951,"avg":0.048188861209238244,"p(50)":0.000248,"p(95)":0.001254,"p(99)":0.0014515999999999984}},"measured_operations":{"type":"counter","contains":"default","values":{"count":43840,"rate":984.8461652043114}},"checks":{"type":"rate","contains":"default","values":{"rate":0.08983398283513166,"passes":3988,"fails":40405}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"http_req_duration{expected_response:true}":{"values":{"avg":118.0205892210109,"p(50)":87.690635,"p(95)":171.703979,"p(99)":224.8572748,"max":13464.977187},"type":"trend","contains":"time"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0.9091829616795302,"passes":40405,"fails":4036}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":19.47927965430555,"p(50)":1.243483,"p(95)":84.549855,"p(99)":146.88012539999997,"max":17216.730576}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":10.083099,"avg":0.0023669291870119934,"p(50)":0}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":50.075135,"avg":0.022014142323530078,"p(50)":0}}},"setup_data":[{"chat":"c8c60bf0-7fcf-4274-8b50-5d6adb564946","token":"9duDXrD58v_2NMgZJPkHLRmyL3yOTElmvPgIUNjrcpo"},{"chat":"6edc3423-cc40-4723-85df-666ce0084329","token":"qRoW49ozXDobXzljQbTs39uLF8t2p-YQaDZVXh71CHg"},{"chat":"3470a12f-8e0b-4c2a-bd00-a53932d57586","token":"VabW8enBhdNe6fjbucW4wwTIlFYWJOTgG9VWLvs0cKs"},{"chat":"eb77134a-7a8c-4e82-a813-7379ff2fcdce","token":"7BjAAIUh3fw9J8wFFKpQMrWFH7L7mZem1nJDS2XvDQE"},{"chat":"7add9a73-e585-4e74-abff-dbc89c020615","token":"Y-8KJ9qP1srzvI1sqkx582GjLLcsYgkmesNzmHiw_Tc"},{"chat":"99414aa5-12e8-4d37-b7dd-63e4e80d99b6","token":"BCGZMDIFIHUJsorwX8l8BseiECDcFB695YQiqb8D37U"},{"chat":"dd34730f-2132-4f29-bbd1-a0514bd9e0df","token":"m1JXce2774OyAdePY1qkSHSMxr-3wZyVDtu86JyVefQ"},{"chat":"390a5c9e-ab33-44bb-a119-dde6b21ed707","token":"_zK3HD9XEllUjAxL_57AIm_bJstke50j2-SJidJbYIo"},{"chat":"49a1267e-21d8-46ea-9a25-919fe009c38e","token":"joGOpp-HBHpoiIeKrvpzq_QoRjIRAB5Vydfg4TIV3w0"},{"chat":"7558462d-fd6f-4104-8705-6257588c8a84","token":"edkhBYTzEC-UVVW1sO-brVT_ffH6kl9BZURMkXVDY1U"},{"chat":"4e355da1-f8a3-4f25-94eb-2350a2ae2808","token":"V1UrP-D1Ly0DsVAGVcYv1FdNMMkF5-xU1RUU9RZ5Qww"},{"chat":"36563727-64ed-469e-8d13-06574d327670","token":"qJHdSFhBA_Jgv3xIOqeuMoyNSTZpyJOw9BJu1hVnQlo"},{"chat":"2f19d4b5-bb30-45a9-8474-0fa5451f7e92","token":"_F52VbiEjVQQkAdWr30jaouL62c8M-skg3oMG9RBW6U"},{"chat":"c7602fae-761a-43b0-be07-b00bbd93d439","token":"kdTG_Al_X57k8w2CTaxGHl7eEvTTuS3Z4pcBlpWLyzw"},{"token":"XA_2iuThB_iaqHTToHO2fxQ1efVsIs2kLH5Mfhjcgic","chat":"89b7a31c-e581-4841-9e32-c234405a162f"},{"chat":"17ce6209-1f8b-4337-8901-88fd95c14a18","token":"8FB4pw0IYWKkCIfwB3P5QL84PzaTIZyENYsJrww-7fA"}],"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":1902,"fails":20200},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":205,"fails":7},{"path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":1881,"fails":20198,"name":"history readable"}],"name":""},"options":{"summaryTimeUnit":"","noColor":false,"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":44514.566385}}} diff --git a/evidence/research-20261029/load-fixed2-20261029105833.json b/evidence/research-20261029/load-fixed2-20261029105833.json new file mode 100644 index 00000000..1c4788d0 --- /dev/null +++ b/evidence/research-20261029/load-fixed2-20261029105833.json @@ -0,0 +1,373 @@ +{ + "profile": { + "vus": 32, + "seconds": 30, + "warmup_seconds": 5, + "drain_seconds": 5, + "users": 16 + }, + "summary": { + "state": { + "isStdOutTTY": false, + "isStdErrTTY": false, + "testRunDurationMs": 45255.708247 + }, + "metrics": { + "checks": { + "contains": "default", + "values": { + "rate": 1, + "passes": 8345, + "fails": 0 + }, + "type": "rate" + }, + "http_req_sending": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.19132248016203945, + "p(50)": 0.127061, + "p(95)": 0.3955431999999998, + "p(99)": 1.29405884, + "max": 19.155584 + } + }, + "http_req_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 112.29785262206552, + "p(50)": 86.520001, + "p(95)": 228.33532659999997, + "p(99)": 494.5202958399996, + "max": 1474.495154 + } + }, + "data_received": { + "values": { + "count": 11480752, + "rate": 253686.27394669177 + }, + "type": "counter", + "contains": "data" + }, + "http_reqs": { + "type": "counter", + "contains": "default", + "values": { + "count": 8393, + "rate": 185.45726771509254 + } + }, + "http_req_duration{expected_response:true}": { + "type": "trend", + "contains": "time", + "values": { + "avg": 112.29785262206552, + "p(50)": 86.520001, + "p(95)": 228.33532659999997, + "p(99)": 494.5202958399996, + "max": 1474.495154 + } + }, + "attempted_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 3814, + "rate": 84.27666139227486 + } + }, + "application_errors{status:429}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "message_latency_ms": { + "type": "trend", + "contains": "time", + "values": { + "max": 1474.495154, + "avg": 133.09072025642362, + "p(50)": 104.40111999999999, + "p(95)": 252.26227369999998, + "p(99)": 545.8374000899996 + } + }, + "data_sent": { + "type": "counter", + "contains": "data", + "values": { + "rate": 17050.48997992759, + "count": 771632 + } + }, + "iterations": { + "type": "counter", + "contains": "default", + "values": { + "count": 3958, + "rate": 87.4585804380241 + } + }, + "measured_operations": { + "type": "counter", + "contains": "default", + "values": { + "count": 8022, + "rate": 177.25940684028026 + } + }, + "http_req_failed": { + "type": "rate", + "contains": "default", + "values": { + "rate": 0, + "passes": 0, + "fails": 8393 + } + }, + "http_req_waiting": { + "type": "trend", + "contains": "time", + "values": { + "p(99)": 493.6457210399996, + "max": 1472.956636, + "avg": 111.75939546145578, + "p(50)": 86.042615, + "p(95)": 227.74144959999995 + } + }, + "http_req_blocked": { + "type": "trend", + "contains": "time", + "values": { + "max": 1069.777577, + "avg": 0.4059274680090553, + "p(50)": 0.00082, + "p(95)": 0.0013733999999999997, + "p(99)": 0.003630199999999992 + } + }, + "confirmed_messages": { + "type": "counter", + "contains": "default", + "values": { + "count": 3814, + "rate": 84.27666139227486 + } + }, + "http_req_receiving": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.3471346804479915, + "p(50)": 0.170749, + "p(95)": 1.1181307999999996, + "p(99)": 2.6177550799999993, + "max": 16.454896 + } + }, + "iteration_duration": { + "type": "trend", + "contains": "time", + "values": { + "avg": 236.52024523370324, + "p(50)": 205.350779, + "p(95)": 431.8582000999999, + "p(99)": 935.8667843199955, + "max": 1867.295818 + } + }, + "application_errors": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + } + }, + "application_errors{status:0}": { + "type": "counter", + "contains": "default", + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + } + }, + "vus": { + "type": "gauge", + "contains": "default", + "values": { + "value": 32, + "min": 0, + "max": 32 + } + }, + "application_errors{status:503}": { + "values": { + "count": 0, + "rate": 0 + }, + "thresholds": { + "count>=0": { + "ok": true + } + }, + "type": "counter", + "contains": "default" + }, + "vus_max": { + "type": "gauge", + "contains": "default", + "values": { + "min": 32, + "max": 32, + "value": 32 + } + }, + "http_req_tls_handshaking": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.2594542579530561, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 265.689513 + } + }, + "http_req_connecting": { + "type": "trend", + "contains": "time", + "values": { + "avg": 0.01689568890742285, + "p(50)": 0, + "p(95)": 0, + "p(99)": 0, + "max": 7.397876 + } + } + }, + "setup_data": [ + { + "chat": "1feea1c0-1a58-4f09-be38-70929069e8bb", + "token": "rDw3EJH_XEADE8b5mkS7cfRdyFA0Qx_ApEPbuMsD8k8" + }, + { + "chat": "010ef4b5-1353-4fef-a889-644dc08973dc", + "token": "DVKZdQDcgdMzq-8tvYsvDZ5TuoeVLKc1Aa4HRlUtlQA" + }, + { + "token": "u-PWgUJ5wfEpLyO1DvF9OFuaprl2sbWc--Xa9Y4u6tg", + "chat": "1c16a1c1-9549-44e9-b6a5-4d519f2c2d83" + }, + { + "chat": "39f17cc2-e70c-4e56-ac2e-a9221535c293", + "token": "zvep40wpWWTbsAiw9pmGSBT3_XM5M-LYMuddfjkP3Ys" + }, + { + "chat": "30b0c47a-3147-4419-8338-9afb6a1bf5e8", + "token": "llQRzs6heT3ZavaRbciMD-Re1EQCjqM1HvVAI3Qo_FU" + }, + { + "chat": "9397ceab-333b-4e22-8198-af5c1d7d5913", + "token": "n2i3dL-4G-Ip21_jSF8UF1x0qHZBwu8vjrreyW1W0QM" + }, + { + "chat": "cf817bc1-d522-49bf-a05d-895b8a78f8fd", + "token": "IVosfZSIwJbvi-mgZ_i6r_IkcI9AD1mRl0ucwgNq6w4" + }, + { + "chat": "9637a37a-310f-41eb-ad60-b1896f55538a", + "token": "0i50hwhoT3XpgdL7eAe3GJx8ZLFXdQgem1AyrIL_JEY" + }, + { + "chat": "40aa0558-844d-4a49-8ecf-509abe415e96", + "token": "6fgA785h3vUVRIOCLS9zBeIB1Cd4S016OfQd-43NLOw" + }, + { + "chat": "e8a490b6-d8b3-4aed-9ecc-11df2e75ebe3", + "token": "sARolZ65RIkIJ3WhVNjiKQbRq9eddpNl3f_brvGvbNs" + }, + { + "chat": "ed5afd74-0369-41bf-b0a9-b5081f696bc1", + "token": "yNIq5wwnngB4_fU1WOTcU0xLbVX2OSWyDv8FgVbQTBg" + }, + { + "chat": "c1a3b314-443d-4f27-a096-891bf5912714", + "token": "N6L7tdvpNzeP85ij3l_X_AZpnrF-1goVFJNX2hhsycA" + }, + { + "chat": "c5c39d45-5139-4b05-bf0d-92a4c3b3d3b9", + "token": "zpYcXhXYXbc6ITLB_BGcloCYMDkuzie78uiQXluD7Ec" + }, + { + "chat": "b4ee9195-ceb6-4b55-a1f1-a89f4c64c589", + "token": "IoM5BXfH571YD6HxVb2zPsWvTNJ7Vktk1fsgFyeXqNM" + }, + { + "chat": "94243ef1-d911-4e7d-a8a1-2bfcfe3f03d9", + "token": "TRhjPnNVv5bz54oL7v4MZAPNxIR37zEpfbaJBuj9Kyo" + }, + { + "chat": "3b1988a1-b29b-4c89-a33b-82ef50ca17e3", + "token": "Ro6tGbRQY16QV7f5ppeCmnedh8c4FsL2AHc3n78sgZc" + } + ], + "root_group": { + "name": "", + "path": "", + "id": "d41d8cd98f00b204e9800998ecf8427e", + "groups": [], + "checks": [ + { + "name": "message confirmed", + "path": "::message confirmed", + "id": "d4155de45199bf62b8c3d5ba8866ac6e", + "passes": 3975, + "fails": 0 + }, + { + "name": "retry returns original", + "path": "::retry returns original", + "id": "f737ff9008ff036f7a4b775b05a953fa", + "passes": 412, + "fails": 0 + }, + { + "name": "history readable", + "path": "::history readable", + "id": "e5d19d1d900950fc71ea4c99c2bee0f8", + "passes": 3958, + "fails": 0 + } + ] + }, + "options": { + "summaryTrendStats": [ + "avg", + "p(50)", + "p(95)", + "p(99)", + "max" + ], + "summaryTimeUnit": "", + "noColor": false + } + } +} diff --git a/evidence/research-20261029/load-fixed2-20261029105833.txt b/evidence/research-20261029/load-fixed2-20261029105833.txt new file mode 100644 index 00000000..813363f3 --- /dev/null +++ b/evidence/research-20261029/load-fixed2-20261029105833.txt @@ -0,0 +1 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":45255.708247},"metrics":{"checks":{"contains":"default","values":{"rate":1,"passes":8345,"fails":0},"type":"rate"},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.19132248016203945,"p(50)":0.127061,"p(95)":0.3955431999999998,"p(99)":1.29405884,"max":19.155584}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":112.29785262206552,"p(50)":86.520001,"p(95)":228.33532659999997,"p(99)":494.5202958399996,"max":1474.495154}},"data_received":{"values":{"count":11480752,"rate":253686.27394669177},"type":"counter","contains":"data"},"http_reqs":{"type":"counter","contains":"default","values":{"count":8393,"rate":185.45726771509254}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":112.29785262206552,"p(50)":86.520001,"p(95)":228.33532659999997,"p(99)":494.5202958399996,"max":1474.495154}},"attempted_messages":{"type":"counter","contains":"default","values":{"count":3814,"rate":84.27666139227486}},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"message_latency_ms":{"type":"trend","contains":"time","values":{"max":1474.495154,"avg":133.09072025642362,"p(50)":104.40111999999999,"p(95)":252.26227369999998,"p(99)":545.8374000899996}},"data_sent":{"type":"counter","contains":"data","values":{"rate":17050.48997992759,"count":771632}},"iterations":{"type":"counter","contains":"default","values":{"count":3958,"rate":87.4585804380241}},"measured_operations":{"type":"counter","contains":"default","values":{"count":8022,"rate":177.25940684028026}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":8393}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":493.6457210399996,"max":1472.956636,"avg":111.75939546145578,"p(50)":86.042615,"p(95)":227.74144959999995}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":1069.777577,"avg":0.4059274680090553,"p(50)":0.00082,"p(95)":0.0013733999999999997,"p(99)":0.003630199999999992}},"confirmed_messages":{"type":"counter","contains":"default","values":{"count":3814,"rate":84.27666139227486}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.3471346804479915,"p(50)":0.170749,"p(95)":1.1181307999999996,"p(99)":2.6177550799999993,"max":16.454896}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":236.52024523370324,"p(50)":205.350779,"p(95)":431.8582000999999,"p(99)":935.8667843199955,"max":1867.295818}},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":0,"max":32}},"application_errors{status:503}":{"values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default"},"vus_max":{"type":"gauge","contains":"default","values":{"min":32,"max":32,"value":32}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0.2594542579530561,"p(50)":0,"p(95)":0,"p(99)":0,"max":265.689513}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.01689568890742285,"p(50)":0,"p(95)":0,"p(99)":0,"max":7.397876}}},"setup_data":[{"chat":"1feea1c0-1a58-4f09-be38-70929069e8bb","token":"rDw3EJH_XEADE8b5mkS7cfRdyFA0Qx_ApEPbuMsD8k8"},{"chat":"010ef4b5-1353-4fef-a889-644dc08973dc","token":"DVKZdQDcgdMzq-8tvYsvDZ5TuoeVLKc1Aa4HRlUtlQA"},{"token":"u-PWgUJ5wfEpLyO1DvF9OFuaprl2sbWc--Xa9Y4u6tg","chat":"1c16a1c1-9549-44e9-b6a5-4d519f2c2d83"},{"chat":"39f17cc2-e70c-4e56-ac2e-a9221535c293","token":"zvep40wpWWTbsAiw9pmGSBT3_XM5M-LYMuddfjkP3Ys"},{"chat":"30b0c47a-3147-4419-8338-9afb6a1bf5e8","token":"llQRzs6heT3ZavaRbciMD-Re1EQCjqM1HvVAI3Qo_FU"},{"chat":"9397ceab-333b-4e22-8198-af5c1d7d5913","token":"n2i3dL-4G-Ip21_jSF8UF1x0qHZBwu8vjrreyW1W0QM"},{"chat":"cf817bc1-d522-49bf-a05d-895b8a78f8fd","token":"IVosfZSIwJbvi-mgZ_i6r_IkcI9AD1mRl0ucwgNq6w4"},{"chat":"9637a37a-310f-41eb-ad60-b1896f55538a","token":"0i50hwhoT3XpgdL7eAe3GJx8ZLFXdQgem1AyrIL_JEY"},{"chat":"40aa0558-844d-4a49-8ecf-509abe415e96","token":"6fgA785h3vUVRIOCLS9zBeIB1Cd4S016OfQd-43NLOw"},{"chat":"e8a490b6-d8b3-4aed-9ecc-11df2e75ebe3","token":"sARolZ65RIkIJ3WhVNjiKQbRq9eddpNl3f_brvGvbNs"},{"chat":"ed5afd74-0369-41bf-b0a9-b5081f696bc1","token":"yNIq5wwnngB4_fU1WOTcU0xLbVX2OSWyDv8FgVbQTBg"},{"chat":"c1a3b314-443d-4f27-a096-891bf5912714","token":"N6L7tdvpNzeP85ij3l_X_AZpnrF-1goVFJNX2hhsycA"},{"chat":"c5c39d45-5139-4b05-bf0d-92a4c3b3d3b9","token":"zpYcXhXYXbc6ITLB_BGcloCYMDkuzie78uiQXluD7Ec"},{"chat":"b4ee9195-ceb6-4b55-a1f1-a89f4c64c589","token":"IoM5BXfH571YD6HxVb2zPsWvTNJ7Vktk1fsgFyeXqNM"},{"chat":"94243ef1-d911-4e7d-a8a1-2bfcfe3f03d9","token":"TRhjPnNVv5bz54oL7v4MZAPNxIR37zEpfbaJBuj9Kyo"},{"chat":"3b1988a1-b29b-4c89-a33b-82ef50ca17e3","token":"Ro6tGbRQY16QV7f5ppeCmnedh8c4FsL2AHc3n78sgZc"}],"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message confirmed","path":"::message confirmed","id":"d4155de45199bf62b8c3d5ba8866ac6e","passes":3975,"fails":0},{"name":"retry returns original","path":"::retry returns original","id":"f737ff9008ff036f7a4b775b05a953fa","passes":412,"fails":0},{"name":"history readable","path":"::history readable","id":"e5d19d1d900950fc71ea4c99c2bee0f8","passes":3958,"fails":0}]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false}}} diff --git a/evidence/research-20261029/load-fixed4-20261029110021.txt b/evidence/research-20261029/load-fixed4-20261029110021.txt new file mode 100644 index 00000000..26b8eebc --- /dev/null +++ b/evidence/research-20261029/load-fixed4-20261029110021.txt @@ -0,0 +1,2 @@ +{"profile":{"vus":32,"seconds":30,"warmup_seconds":5,"drain_seconds":5,"users":16},"summary":{"metrics":{"data_received":{"type":"counter","contains":"data","values":{"count":17626,"rate":1217.3039501253575}},"application_errors{status:0}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}},"application_errors":{"type":"counter","contains":"default","values":{"count":0,"rate":0}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_failed":{"values":{"rate":0.023809523809523808,"passes":1,"fails":41},"type":"rate","contains":"default"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":674.0106492,"max":687.569354,"avg":283.18361153658526,"p(50)":284.208662,"p(95)":586.691066}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":336.2059710899979,"max":569.826329,"avg":13.5687459047619,"p(50)":0.001005,"p(95)":0.001827199999999998}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0.3292637857142857,"p(50)":0,"p(95)":0,"p(99)":8.159156609999949,"max":13.829079}},"http_req_receiving":{"contains":"time","values":{"p(95)":0.44896049999999965,"p(99)":1.0334104199999976,"max":1.285289,"avg":0.2205079761904762,"p(50)":0.1569235},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"value":0,"min":0,"max":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":7190,"rate":496.5627709861182}},"http_reqs":{"type":"counter","contains":"default","values":{"count":42,"rate":2.900644837471066}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":330.7324318809523,"p(50)":298.326058,"p(95)":650.3235156999997,"p(99)":1627.241534079994,"max":2280.234066}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":0.746168,"avg":0.2487437857142857,"p(50)":0.2300245,"p(95)":0.41498954999999993,"p(99)":0.6258170099999989}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":2279.777719,"avg":330.2631801190476,"p(50)":297.450258,"p(95)":649.6964502499998,"p(99)":1626.8369430199941}},"application_errors{status:503}":{"contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}},"type":"counter"},"http_req_connecting":{"values":{"avg":0.07830409523809523,"p(50)":0,"p(95)":0,"p(99)":1.9403754799999877,"max":3.288772},"type":"trend","contains":"time"},"application_errors{status:429}":{"type":"counter","contains":"default","values":{"count":0,"rate":0},"thresholds":{"count>=0":{"ok":true}}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[]},"options":{"summaryTrendStats":["avg","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":false},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":14479.538983}}} +time="2026-10-29T11:02:21Z" level=error msg="Error: chat: 503\n\tat setup (file:///scripts/scaling.js:39:40(163))\n" hint="script exception" diff --git a/evidence/research-20261029/nodes.txt b/evidence/research-20261029/nodes.txt new file mode 100644 index 00000000..461dea77 --- /dev/null +++ b/evidence/research-20261029/nodes.txt @@ -0,0 +1,4 @@ +NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME +dev.asisti.tech Ready 252d v1.33.13 100.99.166.40 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 +marlosrv0 Ready 254d v1.33.13 192.168.1.37 Ubuntu 24.04.5 LTS 6.8.0-147-generic containerd://1.7.29 +srv0.agapov.space Ready 246d v1.33.13 100.108.186.94 Ubuntu 24.04.4 LTS 6.8.0-139-generic containerd://1.7.29 diff --git a/evidence/research-20261029/profiles.csv b/evidence/research-20261029/profiles.csv new file mode 100644 index 00000000..0e7498a6 --- /dev/null +++ b/evidence/research-20261029/profiles.csv @@ -0,0 +1,4 @@ +profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool,vus,duration +fixed1,fixed1-20261029105633,1,1000,512,8,32,30 +fixed2,fixed2-20261029105833,2,500,256,8,32,30 +fixed4,fixed4-20261029110021,4,250,128,8,32,30 diff --git a/evidence/research-20261029/readiness-events.json b/evidence/research-20261029/readiness-events.json new file mode 100644 index 00000000..62edab74 --- /dev/null +++ b/evidence/research-20261029/readiness-events.json @@ -0,0 +1,372 @@ +{ + "apiVersion": "v1", + "items": [ + { + "apiVersion": "v1", + "count": 12, + "eventTime": null, + "firstTimestamp": "2026-10-29T10:54:29Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-4xgnf", + "namespace": "highload-applications", + "resourceVersion": "60155132", + "uid": "90295b43-464f-4a5c-8b88-1ec0b476f40e" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T10:55:51Z", + "message": "Readiness probe failed: Get \"http://10.1.25.112:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T10:54:36Z", + "name": "api-54f7cc6f98-4xgnf.18e2fab7f0b1f4f5", + "namespace": "highload-applications", + "resourceVersion": "60155546", + "uid": "061062ea-64b4-4692-96d9-49100f681333" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T10:56:39Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-4xgnf", + "namespace": "highload-applications", + "resourceVersion": "60155132", + "uid": "90295b43-464f-4a5c-8b88-1ec0b476f40e" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T10:56:39Z", + "message": "Readiness probe failed: Get \"http://10.1.25.112:8080/health/ready\": dial tcp 10.1.25.112:8080: connect: invalid argument", + "metadata": { + "creationTimestamp": "2026-10-29T10:56:39Z", + "name": "api-54f7cc6f98-4xgnf.18e2fad636c81e2e", + "namespace": "highload-applications", + "resourceVersion": "60155760", + "uid": "e29177f3-ce15-47dc-b765-2d0846988cb5" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 9, + "eventTime": null, + "firstTimestamp": "2026-10-29T10:55:39Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-crhmd", + "namespace": "highload-applications", + "resourceVersion": "60155431", + "uid": "ddbfb114-c312-4f42-abc4-31ed3e9c7097" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T10:56:39Z", + "message": "Readiness probe failed: Get \"http://10.1.112.108:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T10:55:39Z", + "name": "api-54f7cc6f98-crhmd.18e2fac832d84b47", + "namespace": "highload-applications", + "resourceVersion": "60155754", + "uid": "a7799297-29e8-4f12-b885-05f058136a94" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 4, + "eventTime": null, + "firstTimestamp": "2026-10-29T10:54:30Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-txlh4", + "namespace": "highload-applications", + "resourceVersion": "60154930", + "uid": "e9c4add7-fd67-4650-a4a2-29ca5b9fd550" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T10:55:29Z", + "message": "Readiness probe failed: Get \"http://10.1.112.79:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T10:54:30Z", + "name": "api-54f7cc6f98-txlh4.18e2fab834bf2a49", + "namespace": "highload-applications", + "resourceVersion": "60155407", + "uid": "4d2bce6d-aed8-4833-aef4-54a830b74a7c" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T10:55:34Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-54f7cc6f98-txlh4", + "namespace": "highload-applications", + "resourceVersion": "60154930", + "uid": "e9c4add7-fd67-4650-a4a2-29ca5b9fd550" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T10:55:34Z", + "message": "Readiness probe failed: Get \"http://10.1.112.79:8080/health/ready\": dial tcp 10.1.112.79:8080: connect: connection refused", + "metadata": { + "creationTimestamp": "2026-10-29T10:55:34Z", + "name": "api-54f7cc6f98-txlh4.18e2fac72c04b76f", + "namespace": "highload-applications", + "resourceVersion": "60155456", + "uid": "8bb722ab-ed21-49fc-bc75-1c179c1fc14e" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T10:56:40Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-6fc45595fc-lzz7z", + "namespace": "highload-applications", + "resourceVersion": "60155699", + "uid": "8e5a9917-010b-4be5-bc15-21e54b5c8a2f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T10:56:40Z", + "message": "Startup probe failed: Get \"http://10.1.25.94:8080/health/ready\": dial tcp 10.1.25.94:8080: connect: connection refused", + "metadata": { + "creationTimestamp": "2026-10-29T10:56:40Z", + "name": "api-6fc45595fc-lzz7z.18e2fad66e1ebb48", + "namespace": "highload-applications", + "resourceVersion": "60155778", + "uid": "e0116806-66b7-4388-84af-239264979e5a" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 6, + "eventTime": null, + "firstTimestamp": "2026-10-29T10:56:59Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-6fc45595fc-lzz7z", + "namespace": "highload-applications", + "resourceVersion": "60155699", + "uid": "8e5a9917-010b-4be5-bc15-21e54b5c8a2f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T10:58:10Z", + "message": "Readiness probe failed: Get \"http://10.1.25.94:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T10:57:06Z", + "name": "api-6fc45595fc-lzz7z.18e2fadacd905ce6", + "namespace": "highload-applications", + "resourceVersion": "60156106", + "uid": "4702ce30-cfa8-46a9-90cf-91fc6b584f53" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 8, + "eventTime": null, + "firstTimestamp": "2026-10-29T10:58:10Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-6fc45595fc-lzz7z", + "namespace": "highload-applications", + "resourceVersion": "60155699", + "uid": "8e5a9917-010b-4be5-bc15-21e54b5c8a2f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T10:58:22Z", + "message": "Readiness probe failed: HTTP probe failed with statuscode: 503", + "metadata": { + "creationTimestamp": "2026-10-29T10:58:20Z", + "name": "api-6fc45595fc-lzz7z.18e2faeb726a6238", + "namespace": "highload-applications", + "resourceVersion": "60156137", + "uid": "cc075469-262a-4320-8d62-8db989f93fb4" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 1, + "eventTime": null, + "firstTimestamp": "2026-10-29T10:58:48Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-6fc45595fc-lzz7z", + "namespace": "highload-applications", + "resourceVersion": "60155699", + "uid": "8e5a9917-010b-4be5-bc15-21e54b5c8a2f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T10:58:48Z", + "message": "Readiness probe failed: Get \"http://10.1.25.94:8080/health/ready\": dial tcp 10.1.25.94:8080: connect: connection refused", + "metadata": { + "creationTimestamp": "2026-10-29T10:58:48Z", + "name": "api-6fc45595fc-lzz7z.18e2faf44b78f857", + "namespace": "highload-applications", + "resourceVersion": "60156376", + "uid": "d5517348-4aa9-4bce-ad19-3d2321d38e31" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "dev.asisti.tech", + "source": { + "component": "kubelet", + "host": "dev.asisti.tech" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 2, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:00:08Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-7f5b6b9d85-bs7mv", + "namespace": "highload-applications", + "resourceVersion": "60156221", + "uid": "240bf47a-6297-4cd8-86ef-fe011a81b4c4" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:00:10Z", + "message": "Readiness probe failed: Get \"http://10.1.131.46:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:00:13Z", + "name": "api-7f5b6b9d85-bs7mv.18e2fb06c7a9f8a3", + "namespace": "highload-applications", + "resourceVersion": "60156674", + "uid": "00ccd6d5-02db-4ad6-a5e5-c9538288a28d" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "srv0.agapov.space", + "source": { + "component": "kubelet", + "host": "srv0.agapov.space" + }, + "type": "Warning" + }, + { + "apiVersion": "v1", + "count": 3, + "eventTime": null, + "firstTimestamp": "2026-10-29T11:00:07Z", + "involvedObject": { + "apiVersion": "v1", + "fieldPath": "spec.containers{api}", + "kind": "Pod", + "name": "api-7f5b6b9d85-zvv5p", + "namespace": "highload-applications", + "resourceVersion": "60156310", + "uid": "f9985b3b-236f-4a24-aea3-cb6fdc2cdd0f" + }, + "kind": "Event", + "lastTimestamp": "2026-10-29T11:00:11Z", + "message": "Readiness probe failed: Get \"http://10.1.112.80:8080/health/ready\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", + "metadata": { + "creationTimestamp": "2026-10-29T11:00:07Z", + "name": "api-7f5b6b9d85-zvv5p.18e2fb069d2ec010", + "namespace": "highload-applications", + "resourceVersion": "60156658", + "uid": "85473d6e-7990-4c07-9857-13ddbb3a44f7" + }, + "reason": "Unhealthy", + "reportingComponent": "kubelet", + "reportingInstance": "marlosrv0", + "source": { + "component": "kubelet", + "host": "marlosrv0" + }, + "type": "Warning" + } + ], + "kind": "List", + "metadata": { + "resourceVersion": "" + } +} diff --git a/evidence/research-20261029/resources-fixed1-20261029105633.txt b/evidence/research-20261029/resources-fixed1-20261029105633.txt new file mode 100644 index 00000000..170b48eb --- /dev/null +++ b/evidence/research-20261029/resources-fixed1-20261029105633.txt @@ -0,0 +1,79 @@ +UTC 2026-10-29T10:57:39Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-lzz7z 3m 22Mi +postgres-0 6m 25Mi +valkey-0 7m 8Mi +valkey-1 5m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|1 +UTC 2026-10-29T10:57:45Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-lzz7z 2m 22Mi +postgres-0 6m 25Mi +valkey-0 7m 8Mi +valkey-1 6m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|1 +UTC 2026-10-29T10:57:52Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-lzz7z 2m 22Mi +postgres-0 6m 25Mi +valkey-0 7m 8Mi +valkey-1 6m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|4 +UTC 2026-10-29T10:57:58Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-lzz7z 2m 22Mi +postgres-0 6m 25Mi +valkey-0 7m 8Mi +valkey-1 6m 13Mi +valkey-2 6m 3Mi +active|||2 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|1 +idle in transaction|||1 +UTC 2026-10-29T10:58:04Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-lzz7z 235m 8Mi +load-fixed1-20261029105633-qb7n9 78m 19Mi +postgres-0 115m 33Mi +valkey-0 48m 8Mi +valkey-1 12m 13Mi +valkey-2 6m 3Mi +active|Client|ClientRead|1 +active|IO|WalSync|1 +active|||2 +idle|Client|ClientRead|1 +idle in transaction|Client|ClientRead|3 +idle in transaction|||1 +UTC 2026-10-29T10:58:11Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-lzz7z 235m 8Mi +load-fixed1-20261029105633-qb7n9 78m 19Mi +postgres-0 115m 33Mi +valkey-0 48m 8Mi +valkey-1 12m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|8 +UTC 2026-10-29T10:58:27Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-lzz7z 259m 12Mi +load-fixed1-20261029105633-qb7n9 264m 29Mi +postgres-0 250m 43Mi +valkey-0 84m 8Mi +valkey-1 69m 13Mi +valkey-2 46m 3Mi +active|||1 +idle|Client|ClientRead|8 +UTC 2026-10-29T10:58:33Z +NAME CPU(cores) MEMORY(bytes) +api-6fc45595fc-lzz7z 259m 12Mi +postgres-0 250m 43Mi +valkey-0 35m 8Mi +valkey-1 3m 13Mi +valkey-2 22m 3Mi diff --git a/evidence/research-20261029/resources-fixed2-20261029105833.txt b/evidence/research-20261029/resources-fixed2-20261029105833.txt new file mode 100644 index 00000000..4223f07f --- /dev/null +++ b/evidence/research-20261029/resources-fixed2-20261029105833.txt @@ -0,0 +1,109 @@ +UTC 2026-10-29T10:59:20Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-bs7mv 3m 22Mi +api-7f5b6b9d85-zvv5p 3m 22Mi +postgres-0 9m 27Mi +valkey-0 7m 8Mi +valkey-1 6m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|2 +UTC 2026-10-29T10:59:26Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-bs7mv 3m 22Mi +api-7f5b6b9d85-zvv5p 3m 22Mi +postgres-0 9m 27Mi +valkey-0 7m 8Mi +valkey-1 6m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|5 +UTC 2026-10-29T10:59:33Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-bs7mv 50m 61Mi +api-7f5b6b9d85-zvv5p 2m 22Mi +postgres-0 16m 28Mi +valkey-0 31m 8Mi +valkey-1 5m 13Mi +valkey-2 8m 3Mi +active|||1 +idle|Client|ClientRead|5 +UTC 2026-10-29T10:59:39Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-bs7mv 50m 61Mi +api-7f5b6b9d85-zvv5p 2m 22Mi +postgres-0 16m 28Mi +valkey-0 31m 8Mi +valkey-1 5m 13Mi +valkey-2 8m 3Mi +active|Client|ClientRead|1 +active|||1 +idle|Client|ClientRead|10 +idle in transaction|Client|ClientRead|4 +idle in transaction|||1 +UTC 2026-10-29T10:59:45Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-bs7mv 145m 10Mi +api-7f5b6b9d85-zvv5p 125m 10Mi +load-fixed2-20261029105833-gd8x5 67m 18Mi +postgres-0 374m 63Mi +valkey-0 93m 8Mi +valkey-1 12m 14Mi +valkey-2 36m 3Mi +active|Client|ClientRead|2 +active|IO|WalSync|1 +active|LWLock|WALWrite|1 +active|||5 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|2 +idle in transaction|||1 +UTC 2026-10-29T10:59:52Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-bs7mv 145m 10Mi +api-7f5b6b9d85-zvv5p 125m 10Mi +load-fixed2-20261029105833-gd8x5 67m 18Mi +postgres-0 374m 63Mi +valkey-0 93m 8Mi +valkey-1 12m 14Mi +valkey-2 36m 3Mi +active|Lock|transactionid|1 +active|||1 +idle|Client|ClientRead|11 +idle in transaction|Client|ClientRead|4 +UTC 2026-10-29T10:59:59Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-bs7mv 427m 11Mi +api-7f5b6b9d85-zvv5p 419m 15Mi +load-fixed2-20261029105833-gd8x5 310m 29Mi +postgres-0 767m 65Mi +valkey-0 149m 8Mi +valkey-1 81m 14Mi +valkey-2 75m 3Mi +active|||3 +idle|Client|ClientRead|8 +idle|||1 +idle in transaction|Client|ClientRead|4 +idle in transaction|||1 +UTC 2026-10-29T11:00:06Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-bs7mv 427m 11Mi +api-7f5b6b9d85-zvv5p 419m 15Mi +load-fixed2-20261029105833-gd8x5 310m 29Mi +postgres-0 767m 65Mi +valkey-0 149m 8Mi +valkey-1 81m 14Mi +valkey-2 75m 3Mi +active|||1 +idle|Client|ClientRead|13 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:00:14Z +NAME CPU(cores) MEMORY(bytes) +api-7f5b6b9d85-bs7mv 427m 11Mi +api-7f5b6b9d85-zvv5p 272m 15Mi +postgres-0 371m 55Mi +valkey-0 149m 8Mi +valkey-1 93m 14Mi +valkey-2 48m 3Mi +active|||1 +idle|Client|ClientRead|11 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029/resources-fixed4-20261029110021.txt b/evidence/research-20261029/resources-fixed4-20261029110021.txt new file mode 100644 index 00000000..43dbf243 --- /dev/null +++ b/evidence/research-20261029/resources-fixed4-20261029110021.txt @@ -0,0 +1,47 @@ +UTC 2026-10-29T11:01:47Z +Error from server (ServiceUnavailable): the server is currently unable to handle the request (get pods.metrics.k8s.io) +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:02:01Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-2j5qf 3m 22Mi +api-855b9f4fb5-vkmkv 2m 22Mi +postgres-0 8m 35Mi +valkey-0 8m 9Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:02:07Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-2j5qf 3m 22Mi +api-855b9f4fb5-vkmkv 2m 22Mi +postgres-0 8m 35Mi +valkey-0 8m 9Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|4 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:02:14Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-2j5qf 3m 22Mi +api-855b9f4fb5-vkmkv 2m 22Mi +postgres-0 8m 35Mi +valkey-0 8m 9Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|1 +UTC 2026-10-29T11:02:20Z +NAME CPU(cores) MEMORY(bytes) +api-855b9f4fb5-2j5qf 18m 61Mi +api-855b9f4fb5-vkmkv 3m 23Mi +load-fixed4-20261029110021-6kzss 42m 19Mi +postgres-0 19m 37Mi +valkey-0 8m 9Mi +valkey-1 6m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|5 +idle in transaction|Client|ClientRead|1 diff --git a/evidence/research-20261029/restore-values.yaml b/evidence/research-20261029/restore-values.yaml new file mode 100644 index 00000000..4e915dac --- /dev/null +++ b/evidence/research-20261029/restore-values.yaml @@ -0,0 +1,61 @@ +api: + env: + DEPENDENCY_POOL_SIZE: "8" + DEPENDENCY_TIMEOUT_MS: "2000" + GOMEMLIMIT: 160MiB + REQUEST_TIMEOUT_SECONDS: "4" + SESSION_TTL_SECONDS: "3600" + SHUTDOWN_TIMEOUT_SECONDS: "5" + replicas: 2 + resources: + limits: + cpu: "1" + memory: 256Mi + requests: + cpu: 250m + memory: 128Mi +autoscaling: + cpuPercent: 60 + enabled: true + maxReplicas: 4 + minReplicas: 2 +databaseSecret: messenger-secrets +image: + digest: sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 + repository: asisti.registry.twcstorage.ru/mtusi2026lab3 +imagePullSecret: registry-pull +ingress: + className: traefik + clusterIssuer: letsencrypt-prod + host: hl.agapov.space +load: + duration: 30 + enabled: false + run: manual + script: scaling.js + vus: 32 +monitoring: + serviceMonitor: false +postgres: + image: postgres:17.6-alpine + resources: + limits: + cpu: "1" + memory: 512Mi + requests: + cpu: 250m + memory: 256Mi + storage: 2Gi +storageClass: "" +valkey: + image: valkey/valkey:8.1.3-alpine + maxmemory: 64mb + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 100m + memory: 96Mi + shards: 3 + storage: 1Gi diff --git a/evidence/research-20261029/restore.txt b/evidence/research-20261029/restore.txt new file mode 100644 index 00000000..3b9d354d --- /dev/null +++ b/evidence/research-20261029/restore.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:02:26 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 7 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029/rollout-fixed1.txt b/evidence/research-20261029/rollout-fixed1.txt new file mode 100644 index 00000000..55849476 --- /dev/null +++ b/evidence/research-20261029/rollout-fixed1.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 13:56:34 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 4 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029/rollout-fixed2.txt b/evidence/research-20261029/rollout-fixed2.txt new file mode 100644 index 00000000..1920a4c2 --- /dev/null +++ b/evidence/research-20261029/rollout-fixed2.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 13:58:35 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 5 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029/rollout-fixed4.txt b/evidence/research-20261029/rollout-fixed4.txt new file mode 100644 index 00000000..39e8165d --- /dev/null +++ b/evidence/research-20261029/rollout-fixed4.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 14:00:22 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 6 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/research-20261029/source.sha256 b/evidence/research-20261029/source.sha256 new file mode 100644 index 00000000..0f94fb32 --- /dev/null +++ b/evidence/research-20261029/source.sha256 @@ -0,0 +1,3 @@ +8fdd5ea6ef1d21ada68f6bc3068ccf3d8da8d2280634017bc9b44e877565ed79 student-tests/load/scaling.js +dcc8dc1217792aca3385c8e3195b236058ee9b2df912e60f9af46dc51b9a6c86 charts/messenger/values.yaml +60e09dd38fd1d413b744f21b57f64ba83e49a5ae1b4251aa5bf20be033f90cfb internal/controller/http/fiber/errors.go diff --git a/evidence/research-20261029/values-fixed1.json b/evidence/research-20261029/values-fixed1.json new file mode 100644 index 00000000..0fdce262 --- /dev/null +++ b/evidence/research-20261029/values-fixed1.json @@ -0,0 +1 @@ +{"api":{"env":{"DEPENDENCY_POOL_SIZE":"8","DEPENDENCY_TIMEOUT_MS":"2000","GOMEMLIMIT":"80MiB","REQUEST_TIMEOUT_SECONDS":"4","SESSION_TTL_SECONDS":"3600","SHUTDOWN_TIMEOUT_SECONDS":"5"},"replicas":1,"resources":{"limits":{"cpu":"1000m","memory":"512Mi"},"requests":{"cpu":"1000m","memory":"512Mi"}}},"autoscaling":{"cpuPercent":60,"enabled":false,"maxReplicas":4,"minReplicas":2},"databaseSecret":"messenger-secrets","image":{"digest":"sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3","repository":"asisti.registry.twcstorage.ru/mtusi2026lab3"},"imagePullSecret":"registry-pull","ingress":{"className":"traefik","clusterIssuer":"letsencrypt-prod","host":"hl.agapov.space"},"load":{"duration":30,"enabled":false,"run":"manual","script":"scaling.js","vus":32},"monitoring":{"serviceMonitor":false},"postgres":{"image":"postgres:17.6-alpine","resources":{"limits":{"cpu":"1","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}},"storage":"2Gi"},"storageClass":"","valkey":{"image":"valkey/valkey:8.1.3-alpine","maxmemory":"64mb","resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"96Mi"}},"shards":3,"storage":"1Gi"}} diff --git a/evidence/research-20261029/values-fixed2.json b/evidence/research-20261029/values-fixed2.json new file mode 100644 index 00000000..0635c03d --- /dev/null +++ b/evidence/research-20261029/values-fixed2.json @@ -0,0 +1 @@ +{"api":{"env":{"DEPENDENCY_POOL_SIZE":"8","DEPENDENCY_TIMEOUT_MS":"2000","GOMEMLIMIT":"80MiB","REQUEST_TIMEOUT_SECONDS":"4","SESSION_TTL_SECONDS":"3600","SHUTDOWN_TIMEOUT_SECONDS":"5"},"replicas":2,"resources":{"limits":{"cpu":"500m","memory":"256Mi"},"requests":{"cpu":"500m","memory":"256Mi"}}},"autoscaling":{"cpuPercent":60,"enabled":false,"maxReplicas":4,"minReplicas":2},"databaseSecret":"messenger-secrets","image":{"digest":"sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3","repository":"asisti.registry.twcstorage.ru/mtusi2026lab3"},"imagePullSecret":"registry-pull","ingress":{"className":"traefik","clusterIssuer":"letsencrypt-prod","host":"hl.agapov.space"},"load":{"duration":30,"enabled":false,"run":"manual","script":"scaling.js","vus":32},"monitoring":{"serviceMonitor":false},"postgres":{"image":"postgres:17.6-alpine","resources":{"limits":{"cpu":"1","memory":"512Mi"},"requests":{"cpu":"250m","memory":"256Mi"}},"storage":"2Gi"},"storageClass":"","valkey":{"image":"valkey/valkey:8.1.3-alpine","maxmemory":"64mb","resources":{"limits":{"cpu":"500m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"96Mi"}},"shards":3,"storage":"1Gi"}} diff --git a/evidence/review-20261029/413-body.json b/evidence/review-20261029/413-body.json new file mode 100644 index 00000000..db0aab39 --- /dev/null +++ b/evidence/review-20261029/413-body.json @@ -0,0 +1 @@ +{"error":{"code":"payload_too_large","message":"request body is too large","request_id":"845b65a5-6688-4309-9619-71a317302ca5"}} \ No newline at end of file diff --git a/evidence/review-20261029/413-headers.txt b/evidence/review-20261029/413-headers.txt new file mode 100644 index 00000000..0689f08b --- /dev/null +++ b/evidence/review-20261029/413-headers.txt @@ -0,0 +1,7 @@ +HTTP/2 413 +content-type: application/json +date: Thu, 29 Oct 2026 10:57:54 GMT +x-instance-id: api-6fc45595fc-lzz7z +x-request-id: 845b65a5-6688-4309-9619-71a317302ca5 +content-length: 128 + diff --git a/evidence/review-20261029/README.md b/evidence/review-20261029/README.md new file mode 100644 index 00000000..4f6a4d2b --- /dev/null +++ b/evidence/review-20261029/README.md @@ -0,0 +1,20 @@ +# Исправления 29.10.2026 + +Образ исправления: digest в image.json; исходная ревизия 7b7e23f плюс diff итогового коммита. Результаты сборки и развёртывания сохранены, Kubernetes release lab2 / highload-applications. + +- body-limit.txt: настоящий TCP-запрос превышает BodyLimit и проверяет 413, X-Instance-Id и согласованный X-Request-Id. +- 413-headers.txt и 413-body.json: тот же контракт подтверждён через публичный HTTPS. +- coverage.txt, coverage-per-file.json: race, реальные PostgreSQL/Valkey, процесс и SIGTERM; 59 исполняемых файлов, минимум 90%. +- lint.txt, vet.txt, contract.txt: статические проверки и неизменный контракт. +- initial-api.json, targets.txt: две исходные реплики. +- failover-1-20261029105415-*: остановлена api-54f7cc6f98-7c56z; 44 подтверждённых сообщения включая исходное, 42 чтения, 5 ошибок операций, восстановление 0.190 с. +- failover-2-20261029105524-*: остановлена api-54f7cc6f98-txlh4; 21 подтверждённое сообщение включая исходное, 19 чтений, 7 ошибок операций, восстановление 2.547 с. +- load-failover-*.txt: запросы через Traefik; перед каждым отказом наблюдались две реплики, после — подтверждена сохранность всех сообщений, отсутствие дублей и использование прежней сессии. Между отказами первая реплика восстановлена Deployment; второй setup повторно проверил две реплики. +- smoke.txt: неуспешный прогон во время первого отказа (503), не используется как положительное доказательство. +- smoke-after.txt: публичный smoke после восстановления PASS. + +Первый сборщик summary использовал отсутствующий в Ruby 2.6 filter_map. Ошибка касалась обработки уже полученного успешного k6-результата; после замены на map/compact исходный лог обработан, проверка продолжена со второй сохранённой целью. Исходная ошибка сохранена в both-replicas.txt. + +Время восстановления считается от момента перед kubectl get/delete до первой успешной записи через другую реплику. Ошибки включают записи и чтения. RPS в summary использует номинальное окно 25 секунд и не включает начальную запись; запрос, начатый в конце окна, может завершиться чуть позже. Потеря узла/БД в этих сценариях не моделируется. + +После всех нагрузочных серий rollout завершился (final-rollout.txt). Финальные публичные smoke и повтор завершились connection/TLS failure: final-smoke.txt, final-smoke-retry.txt. Это отдельный текущий инфраструктурный сбой; прежний smoke-after PASS не доказывает стабильность доступа в конце исследования. final-deployment.json фиксирует состояние Deployment после восстановления. diff --git a/evidence/review-20261029/body-limit.txt b/evidence/review-20261029/body-limit.txt new file mode 100644 index 00000000..9822c59c --- /dev/null +++ b/evidence/review-20261029/body-limit.txt @@ -0,0 +1 @@ +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/controller/http/fiber 1.084s diff --git a/evidence/review-20261029/both-replicas.txt b/evidence/review-20261029/both-replicas.txt new file mode 100644 index 00000000..665ee8a1 --- /dev/null +++ b/evidence/review-20261029/both-replicas.txt @@ -0,0 +1,3 @@ +scripts/summarize-failover.rb:5:in `

': undefined method `filter_map' for # (NoMethodError) +Did you mean? filter +{"target":"api-54f7cc6f98-txlh4","started_epoch_ms":1793271329571,"confirmed":21,"reads":19,"errors":7,"pass":true,"recovery_seconds":2.547,"confirmed_rps":0.8} diff --git a/evidence/review-20261029/build.txt b/evidence/review-20261029/build.txt new file mode 100644 index 00000000..7dcbc40c --- /dev/null +++ b/evidence/review-20261029/build.txt @@ -0,0 +1,65 @@ +#0 building with "asisti-builder" instance using docker-container driver + +#1 [internal] load build definition from Dockerfile +#1 transferring dockerfile: 583B done +#1 DONE 0.0s + +#2 [internal] load metadata for docker.io/library/golang:1.26.1-alpine3.23 +#2 DONE 3.3s + +#3 [internal] load .dockerignore +#3 transferring context: 145B done +#3 DONE 0.0s + +#4 [build 1/7] FROM docker.io/library/golang:1.26.1-alpine3.23@sha256:2389ebfa5b7f43eeafbd6be0c3700cc46690ef842ad962f6c5bd6be49ed82039 +#4 resolve docker.io/library/golang:1.26.1-alpine3.23@sha256:2389ebfa5b7f43eeafbd6be0c3700cc46690ef842ad962f6c5bd6be49ed82039 done +#4 DONE 0.0s + +#5 [internal] load build context +#5 transferring context: 329.68kB 0.0s done +#5 DONE 0.0s + +#6 [build 2/7] WORKDIR /src +#6 CACHED + +#7 [build 3/7] COPY go.mod go.sum ./ +#7 DONE 0.1s + +#8 [build 4/7] RUN go mod download +#8 DONE 56.6s + +#9 [build 5/7] COPY cmd/ ./cmd/ +#9 DONE 0.1s + +#10 [build 6/7] COPY internal/ ./internal/ +#10 DONE 0.0s + +#11 [build 7/7] RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/server ./cmd/server +#11 DONE 97.0s + +#12 [runtime 1/1] COPY --from=build /out/server /server +#12 DONE 0.1s + +#13 exporting to image +#13 exporting layers +#13 exporting layers 0.8s done +#13 exporting manifest sha256:ce262dcd1c98aff40067305e210037ae421e1da62f825a9066cdb13776f848d4 done +#13 exporting config sha256:9be8ec92531a22d2cef260b08669df6e8169d846aa47aaa709d50f1e602285cb done +#13 exporting attestation manifest sha256:e9483b1d5c76897b691143a16c09250fe5d0849edc41a42345792f8d1ea6cb3c 0.0s done +#13 exporting manifest list sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 0.0s done +#13 pushing layers +#13 ... + +#14 [auth] mtusi2026lab3:pull,push token for asisti.registry.twcstorage.ru +#14 DONE 0.0s + +#13 exporting to image +#13 pushing layers 19.7s done +#13 pushing manifest for asisti.registry.twcstorage.ru/mtusi2026lab3:review-20261029@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 +#13 pushing manifest for asisti.registry.twcstorage.ru/mtusi2026lab3:review-20261029@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3 1.2s done +#13 DONE 21.7s + +#15 resolving provenance for metadata file +#15 DONE 0.0s + +View build details: docker-desktop://dashboard/build/asisti-builder/asisti-builder0/ccwfu2v84bvpitu67b53xiunu diff --git a/evidence/review-20261029/contract.txt b/evidence/review-20261029/contract.txt new file mode 100644 index 00000000..9a553306 --- /dev/null +++ b/evidence/review-20261029/contract.txt @@ -0,0 +1,2 @@ +python3 scripts/check_contract.py +PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. diff --git a/evidence/review-20261029/coverage-per-file.json b/evidence/review-20261029/coverage-per-file.json new file mode 100644 index 00000000..8c42e0d4 --- /dev/null +++ b/evidence/review-20261029/coverage-per-file.json @@ -0,0 +1,75 @@ +{"threshold_per_file":90,"files":[ +{"file":"internal/service/cursor.go","statements":0,"covered":0,"percent":null,"sha256":"cba6026849467d3662994d59983dd0d6a5ffbe9d934ff539115fd2669b89013f"}, +{"file":"cmd/server/app.go","statements":9,"covered":9,"percent":100.00000000,"sha256":"447460bce6ad010ecc4f191873cad6980f6d7c2a7665eed756d85d40aa0fad70"}, +{"file":"internal/service/production/members.go","statements":19,"covered":19,"percent":100.00000000,"sha256":"578da47ba2567a4fc44de3e087b2e60a6da17e0585ca6215187d5aa5783bfdc7"}, +{"file":"internal/service/production/errors.go","statements":5,"covered":5,"percent":100.00000000,"sha256":"723b0824177b313746dd02fcc9809403b75be128d98520dd69b8fc7cb0244b72"}, +{"file":"internal/controller/interface.go","statements":0,"covered":0,"percent":null,"sha256":"24b6b06d6fab919cd2130697b44fd0d358265184dca0ca8362e0b4fcc2ae5a68"}, +{"file":"internal/service/interface.go","statements":0,"covered":0,"percent":null,"sha256":"1012793cc519112340ee14dac945597da411d5b9f78ce5da6a25dd73ea72d8f6"}, +{"file":"internal/admission/limiter.go","statements":16,"covered":16,"percent":100.00000000,"sha256":"a373c9539167a4b7c35d45334d35ffd4e9d124c1740c88c12094fededd9643b4"}, +{"file":"internal/service/production/service.go","statements":10,"covered":10,"percent":100.00000000,"sha256":"7b24930b8fd7342b0373d687bb775163c332e6620ccc893516f865c433b59056"}, +{"file":"internal/hashring/ring.go","statements":21,"covered":20,"percent":95.23809524,"sha256":"e205901cec2e66011ec764b70879b0eb0d28a78c4dea8913a9fb30c2d778fa8c"}, +{"file":"internal/cursor/codec.go","statements":39,"covered":37,"percent":94.87179487,"sha256":"678e197744fb2fc4b51715f51593b98761125bbaddbe4cb1b7032bd6b173ef04"}, +{"file":"internal/controller/http/fiber/headers.go","statements":0,"covered":0,"percent":null,"sha256":"d32a9a01a8b391f4d986e14947a25a0504f4363335ea1524df05e0dd8e9e61bd"}, +{"file":"internal/store/memory/capacity.go","statements":7,"covered":7,"percent":100.00000000,"sha256":"4dbced908f9d1e802ece79d2a436cbbaa2bff807a19a5fc4bc658eb3f361a5e7"}, +{"file":"cmd/server/persistence.go","statements":18,"covered":18,"percent":100.00000000,"sha256":"a9bfa3bcc68d1b045ec21c193118bb209dfd7bdcbee3cbd28efc5573dc6db3c8"}, +{"file":"internal/service/errors.go","statements":0,"covered":0,"percent":null,"sha256":"f7fd9ca5335f9119d5ed1714c39c3d19e840528a0248fda5d08f60a10d2060ac"}, +{"file":"cmd/server/main.go","statements":3,"covered":3,"percent":100.00000000,"sha256":"c22d8cdf4ce31fde29945e967d3f025e280a7dc4d2022329d51be972d2a0f495"}, +{"file":"internal/controller/http/fiber/routes.go","statements":60,"covered":60,"percent":100.00000000,"sha256":"455d0b2a3fe2f7de947d499e99e660360395338a87d9225b5f8ac525862434fe"}, +{"file":"internal/controller/http/fiber/health.go","statements":7,"covered":7,"percent":100.00000000,"sha256":"813db79a23f6b093ccc510444c883b53f7f98e7d26c927441089f57c73fea12d"}, +{"file":"internal/config/controller.go","statements":25,"covered":24,"percent":96.00000000,"sha256":"c2736f1438746ff293197e002e4352a316987fee9c1307c3cc4190120971098c"}, +{"file":"internal/controller/http/fiber/metrics.go","statements":20,"covered":18,"percent":90.00000000,"sha256":"54db82201697bdfcc65712afe61b650f8f0885fc65222dc4cc6d1c3bb07d82dd"}, +{"file":"internal/config/memory.go","statements":11,"covered":11,"percent":100.00000000,"sha256":"86cdf9e90b576f4484946bfd9605333fc52077f38d3a39c5d71ddca4cdeecda0"}, +{"file":"internal/service/production/creation.go","statements":19,"covered":19,"percent":100.00000000,"sha256":"766f920addddaccdec25fae78728af56a825ab8c57eae29cc8839d85ab5a648f"}, +{"file":"internal/controller/http/fiber/configure.go","statements":7,"covered":7,"percent":100.00000000,"sha256":"be356cf26c228958d51f5bafa4305d7325e81ab01065575acbc9b2d7a6ddd4bd"}, +{"file":"internal/service/production/pages.go","statements":17,"covered":16,"percent":94.11764706,"sha256":"d4db6f0ad1caabc66f8bbb365e56cc84930047b640619bbe5f4e58fce0644877"}, +{"file":"internal/service/authentication/service.go","statements":48,"covered":47,"percent":97.91666667,"sha256":"8300ff37fbce6ce2985375e8c42c6d1793017b36cec8f27b0c0dc80ef2671b85"}, +{"file":"internal/password/password.go","statements":18,"covered":17,"percent":94.44444444,"sha256":"fe2df6990331573bbf0202ebc81c58263a7c16a29b713eefa0f0e852e4ee4a76"}, +{"file":"internal/controller/http/fiber/lifecycle.go","statements":24,"covered":22,"percent":91.66666667,"sha256":"f39cf7a0049a2ed39d6cc1fcc66b44656d9d6120914d0e973b032e12f3d0de08"}, +{"file":"cmd/server/logger.go","statements":10,"covered":9,"percent":90.00000000,"sha256":"93cd37b8e2ec1e6088b82f348a59e6862951f8462df4cd5448562489b05dce1f"}, +{"file":"internal/valkey/client.go","statements":35,"covered":34,"percent":97.14285714,"sha256":"67f32fa5bda94388c0a5fef87e93680a77a513de3a3b7522a38659acde088357"}, +{"file":"internal/strictjson/decode.go","statements":37,"covered":36,"percent":97.29729730,"sha256":"ef9bfaf3bd684fded87c92a15b3e5c706a794caf04cc4ef711c4185e9c7fb12a"}, +{"file":"internal/store/memory/messages.go","statements":19,"covered":18,"percent":94.73684211,"sha256":"36328ae3809af4fd0d10f4ab892e32c4643ad0c6b062aa9924ffd9e51c767500"}, +{"file":"internal/service/production/messages.go","statements":18,"covered":18,"percent":100.00000000,"sha256":"f25725720d7035a688ae4c5aaad34c6e78f3336fd927469570dc8a9a262608cd"}, +{"file":"internal/service/production/pagination.go","statements":21,"covered":21,"percent":100.00000000,"sha256":"eac2861f1743b692f7a6910949dad933d52db9b0211f3422dce09b3c7de49a49"}, +{"file":"internal/store/postgres/idempotency.go","statements":21,"covered":19,"percent":90.47619048,"sha256":"24d463067d1b51eaad5f7b21013be2ab836dea78f7314469779e2336cf57cb9c"}, +{"file":"internal/store/postgres/chats.go","statements":26,"covered":24,"percent":92.30769231,"sha256":"f191cc4d00d13a1e9c46323d545f3310ac2e7d23bb93d76060e282d1fbd220f3"}, +{"file":"internal/service/production/validation.go","statements":13,"covered":13,"percent":100.00000000,"sha256":"33970978507498dbba8e599ac20f7139a10f82705f86a7e058e668742ebefba2"}, +{"file":"internal/service/production/chats.go","statements":22,"covered":22,"percent":100.00000000,"sha256":"a6fce9188c52032fbc035bb08fc06c23b59fabf1534dc0a26205de72609ffbb6"}, +{"file":"internal/config/config.go","statements":17,"covered":17,"percent":100.00000000,"sha256":"8cb675a0bef8b1645071e4cb85b79a467620e99b375db5d8d3e16a54b4c5b5fa"}, +{"file":"cmd/server/commands.go","statements":16,"covered":16,"percent":100.00000000,"sha256":"2631df45b82c7cf99626ae6fe6c5b05ef18254b487d034ad98af26792e569bc8"}, +{"file":"internal/config/environment.go","statements":14,"covered":14,"percent":100.00000000,"sha256":"027761b059b76898a84318ec1a8b43158d8bafd6e0b15b52efbe902b4d8c5ea3"}, +{"file":"internal/valkey/cache.go","statements":19,"covered":18,"percent":94.73684211,"sha256":"25d3a4a4b47fbfedb5c9b31541f8818c7cee46407ba58d1068bdcd4590e72f12"}, +{"file":"internal/service/auth.go","statements":0,"covered":0,"percent":null,"sha256":"a6b0eb6d5759bf87bb2737ae07c9c916c749a107e6acb3542b63461363eb892f"}, +{"file":"internal/valkey/admission.go","statements":45,"covered":45,"percent":100.00000000,"sha256":"d2a4a93a0cffaadb18e94292f67a20e1d5113654e2f5ad55dae5d0009d74f4bb"}, +{"file":"internal/controller/http/fiber/auth.go","statements":29,"covered":29,"percent":100.00000000,"sha256":"8a7687d7ee133290f2bbead47796830caad1439990b60e940b625fede74a6837"}, +{"file":"cmd/server/healthcheck.go","statements":19,"covered":18,"percent":94.73684211,"sha256":"c62b7a6897b300e25fdcfd6650cd256f008207146f1a45c00d77f0db1ab01575"}, +{"file":"internal/store/memory/ordering.go","statements":6,"covered":6,"percent":100.00000000,"sha256":"93ce30f07bb6f056c9a355831b0e0ae7ec5a2cb0fa817bddeb17727c96edb491"}, +{"file":"internal/service/cache.go","statements":0,"covered":0,"percent":null,"sha256":"70bcf36246dc5cff0e3a726f20859dbab85d346dc35664c9f4ae125c23d8bfc9"}, +{"file":"internal/store/memory/chats.go","statements":31,"covered":31,"percent":100.00000000,"sha256":"9404b9576e041ad1d6fa4d297245c5224b7cc6f70272b7c99e9d531e7450519a"}, +{"file":"internal/controller/http/fiber/decode.go","statements":6,"covered":6,"percent":100.00000000,"sha256":"b02e9a9118e9ad0458ae98e79d6bc4d9a65f885bc4f6734a5a84d0cd9fa954f1"}, +{"file":"internal/controller/http/fiber/controller.go","statements":13,"covered":13,"percent":100.00000000,"sha256":"e6cba36cd5cb84e0f9b5dd2f1607704d3556f12c6a9cc92caa515e6d146338a3"}, +{"file":"internal/controller/http/fiber/public_errors.go","statements":13,"covered":13,"percent":100.00000000,"sha256":"18e1bbaa5ac64311e208c23ca3eca3fc543b48f5187b22313735b7df83603ce3"}, +{"file":"internal/controller/http/fiber/handlers.go","statements":37,"covered":36,"percent":97.29729730,"sha256":"0bdd0cfe8578e0e163cfe8945c57615b91d1990770a4d46a03c88c94996a0083"}, +{"file":"internal/store/postgres/sessions.go","statements":13,"covered":13,"percent":100.00000000,"sha256":"889a63b51b29012f4ae5499d1c0577fe29f2f2959b05629f8e123715cfc1f75f"}, +{"file":"internal/admission/distributed.go","statements":0,"covered":0,"percent":null,"sha256":"41ef40897886c0878cbfe52f6716bdcb8433fb7eaddcfff298e1d54c55db423d"}, +{"file":"internal/store/interface.go","statements":0,"covered":0,"percent":null,"sha256":"15ada2fcbbb06ce210e1978b0c2aa4316e9786c6b0252ceec80e169ae08c0fe9"}, +{"file":"internal/controller/http/fiber/middleware.go","statements":39,"covered":38,"percent":97.43589744,"sha256":"af6796f95b1e89cb053d2440b803d66d1a722280b8c46dc1a99a99fa92ac824a"}, +{"file":"internal/config/logger.go","statements":7,"covered":7,"percent":100.00000000,"sha256":"3a69e20a00fa2ed816f344a990e9e0ef0077e1607d4207858b4b00e4ff5d1988"}, +{"file":"internal/controller/http/fiber/errors.go","statements":29,"covered":29,"percent":100.00000000,"sha256":"60e09dd38fd1d413b744f21b57f64ba83e49a5ae1b4251aa5bf20be033f90cfb"}, +{"file":"internal/controller/http/fiber/error_codes.go","statements":0,"covered":0,"percent":null,"sha256":"3351a019c43d0360ee0fd68afabb5200422d065ae7bd908b1c0a5c02a0c1ad41"}, +{"file":"internal/store/postgres/store.go","statements":61,"covered":56,"percent":91.80327869,"sha256":"f50dbf2409c511f3b4b3cc72555a80e621e1ca1e4e314112ead35e1a34623de1"}, +{"file":"internal/store/postgres/users.go","statements":21,"covered":20,"percent":95.23809524,"sha256":"8c77a2ebc8e7cdf4bcaad173feb413fcfe2691e50bc61b0e70a5e8748f167ce6"}, +{"file":"internal/service/production/users.go","statements":19,"covered":19,"percent":100.00000000,"sha256":"b61747c3e5d7bee523ba82817a6a450e7f978fda4df10b8870d53a01bc4742d9"}, +{"file":"internal/model/http/models.go","statements":0,"covered":0,"percent":null,"sha256":"8c183b065bc3ab4cad20570eab79f334ca75a3309186fdf832fb1aa598894465"}, +{"file":"internal/model/dto/models.go","statements":0,"covered":0,"percent":null,"sha256":"23c3b9cf3de49c015a0eac85e19fb287ffdd3133de16035f74db34ec9a6df220"}, +{"file":"internal/config/persistence.go","statements":15,"covered":15,"percent":100.00000000,"sha256":"28c61d23db4ca2ef7ed952451f465318865076d2393eaa94ff5d7bb339c4c06b"}, +{"file":"internal/store/postgres/messages.go","statements":29,"covered":27,"percent":93.10344828,"sha256":"114f7f6dd12feb80e709e704a83f59d8c7f33fbd62e3a137f53219fa5f03d046"}, +{"file":"internal/model/dto/session.go","statements":0,"covered":0,"percent":null,"sha256":"896a694b0c217240343077d4287f4a6e447338c38571abbebcb3d16a519137fb"}, +{"file":"internal/controller/http/fiber/dependencies.go","statements":0,"covered":0,"percent":null,"sha256":"6ee07f110bdb29d8d2191ab8889ba60474b33a5b225739875c8a57d8434be15d"}, +{"file":"internal/store/memory/store.go","statements":3,"covered":3,"percent":100.00000000,"sha256":"973e451d35a79af4614a8727439bfdf5c72b55e03d904b59cb3f39ce0edcb83b"}, +{"file":"internal/service/production/access.go","statements":27,"covered":27,"percent":100.00000000,"sha256":"260f7c77bdbcb1913ebd487e531aa6bb1621d10cd1c4cad91ab34d11cd4fec16"}, +{"file":"internal/controller/fx.go","statements":1,"covered":1,"percent":100.00000000,"sha256":"af72da25fea9811c13a50c8133e9e8b35e070c5295069c40c0ae89cdc0aff19a"}, +{"file":"internal/store/memory/users.go","statements":22,"covered":21,"percent":95.45454545,"sha256":"494a5c8dda4d6a158bc3629f735c12cef36abfb19353d65380e0e4696de9284a"}, +{"file":"internal/controller/http/fiber/mapping.go","statements":19,"covered":19,"percent":100.00000000,"sha256":"cd79419f940868066dffbcc3cd8a024d4e0c9113785f89d7a3f2d6ff57223597"}, +{"file":"internal/controller/http/fiber/error_registry.go","statements":2,"covered":2,"percent":100.00000000,"sha256":"9d5da8d98ece2706e324cb2deca915e0811b6ad98f7aaac5805ca0f3cc0a1f9a"} +],"passed":true} diff --git a/evidence/review-20261029/coverage.txt b/evidence/review-20261029/coverage.txt new file mode 100644 index 00000000..218d6408 --- /dev/null +++ b/evidence/review-20261029/coverage.txt @@ -0,0 +1,95 @@ +GO="go" scripts/coverage.sh +warning: GOCOVERDIR not set, no coverage data emitted +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/cmd/server 3.093s coverage: 32.4% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/admission 2.051s coverage: 1.3% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config 2.048s coverage: 7.0% of statements in ./... + gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/controller coverage: 0.0% of statements +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/controller/http/fiber 2.423s coverage: 54.0% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/cursor 2.568s coverage: 3.1% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/hashring 3.197s coverage: 1.7% of statements in ./... +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/dto [no test files] +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/http [no test files] +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/password 3.196s coverage: 1.4% of statements in ./... +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service [no test files] +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service/authentication 2.226s coverage: 4.5% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/service/production 2.572s coverage: 18.0% of statements in ./... +? gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store [no test files] +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/memory 2.220s coverage: 7.7% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/store/postgres 3.680s coverage: 13.3% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/strictjson 2.539s coverage: 3.0% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/valkey 2.635s coverage: 9.7% of statements in ./... +ok gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/student-tests 2.434s coverage: 0.0% of statements in ./... +PASS: lab3 public API scenario; infrastructure and grading evidence remain separate. + N/A internal/service/cursor.go + 100.00% cmd/server/app.go + 100.00% internal/service/production/members.go + 100.00% internal/service/production/errors.go + N/A internal/controller/interface.go + N/A internal/service/interface.go + 100.00% internal/admission/limiter.go + 100.00% internal/service/production/service.go + 95.24% internal/hashring/ring.go + 94.87% internal/cursor/codec.go + N/A internal/controller/http/fiber/headers.go + 100.00% internal/store/memory/capacity.go + 100.00% cmd/server/persistence.go + N/A internal/service/errors.go + 100.00% cmd/server/main.go + 100.00% internal/controller/http/fiber/routes.go + 100.00% internal/controller/http/fiber/health.go + 96.00% internal/config/controller.go + 90.00% internal/controller/http/fiber/metrics.go + 100.00% internal/config/memory.go + 100.00% internal/service/production/creation.go + 100.00% internal/controller/http/fiber/configure.go + 94.12% internal/service/production/pages.go + 97.92% internal/service/authentication/service.go + 94.44% internal/password/password.go + 91.67% internal/controller/http/fiber/lifecycle.go + 90.00% cmd/server/logger.go + 97.14% internal/valkey/client.go + 97.30% internal/strictjson/decode.go + 94.74% internal/store/memory/messages.go + 100.00% internal/service/production/messages.go + 100.00% internal/service/production/pagination.go + 90.48% internal/store/postgres/idempotency.go + 92.31% internal/store/postgres/chats.go + 100.00% internal/service/production/validation.go + 100.00% internal/service/production/chats.go + 100.00% internal/config/config.go + 100.00% cmd/server/commands.go + 100.00% internal/config/environment.go + 94.74% internal/valkey/cache.go + N/A internal/service/auth.go + 100.00% internal/valkey/admission.go + 100.00% internal/controller/http/fiber/auth.go + 94.74% cmd/server/healthcheck.go + 100.00% internal/store/memory/ordering.go + N/A internal/service/cache.go + 100.00% internal/store/memory/chats.go + 100.00% internal/controller/http/fiber/decode.go + 100.00% internal/controller/http/fiber/controller.go + 100.00% internal/controller/http/fiber/public_errors.go + 97.30% internal/controller/http/fiber/handlers.go + 100.00% internal/store/postgres/sessions.go + N/A internal/admission/distributed.go + N/A internal/store/interface.go + 97.44% internal/controller/http/fiber/middleware.go + 100.00% internal/config/logger.go + 100.00% internal/controller/http/fiber/errors.go + N/A internal/controller/http/fiber/error_codes.go + 91.80% internal/store/postgres/store.go + 95.24% internal/store/postgres/users.go + 100.00% internal/service/production/users.go + N/A internal/model/http/models.go + N/A internal/model/dto/models.go + 100.00% internal/config/persistence.go + 93.10% internal/store/postgres/messages.go + N/A internal/model/dto/session.go + N/A internal/controller/http/fiber/dependencies.go + 100.00% internal/store/memory/store.go + 100.00% internal/service/production/access.go + 100.00% internal/controller/fx.go + 95.45% internal/store/memory/users.go + 100.00% internal/controller/http/fiber/mapping.go + 100.00% internal/controller/http/fiber/error_registry.go diff --git a/evidence/review-20261029/deploy.txt b/evidence/review-20261029/deploy.txt new file mode 100644 index 00000000..feed43cb --- /dev/null +++ b/evidence/review-20261029/deploy.txt @@ -0,0 +1,8 @@ +Release "lab2" has been upgraded. Happy Helming! +NAME: lab2 +LAST DEPLOYED: Thu Oct 29 13:53:12 2026 +NAMESPACE: highload-applications +STATUS: deployed +REVISION: 3 +DESCRIPTION: Upgrade complete +TEST SUITE: None diff --git a/evidence/review-20261029/failover-1-20261029105415-delete.txt b/evidence/review-20261029/failover-1-20261029105415-delete.txt new file mode 100644 index 00000000..5cc6b346 --- /dev/null +++ b/evidence/review-20261029/failover-1-20261029105415-delete.txt @@ -0,0 +1 @@ +pod "api-54f7cc6f98-7c56z" deleted from highload-applications namespace diff --git a/evidence/review-20261029/failover-1-20261029105415-run.txt b/evidence/review-20261029/failover-1-20261029105415-run.txt new file mode 100644 index 00000000..d177a0f6 --- /dev/null +++ b/evidence/review-20261029/failover-1-20261029105415-run.txt @@ -0,0 +1,2 @@ +configmap/load-scripts configured +job.batch/load-failover-1-20261029105415 created diff --git a/evidence/review-20261029/failover-1-20261029105415-stop-epoch.txt b/evidence/review-20261029/failover-1-20261029105415-stop-epoch.txt new file mode 100644 index 00000000..3512ea0b --- /dev/null +++ b/evidence/review-20261029/failover-1-20261029105415-stop-epoch.txt @@ -0,0 +1 @@ +1793271261.339473 diff --git a/evidence/review-20261029/failover-1-20261029105415-summary.json b/evidence/review-20261029/failover-1-20261029105415-summary.json new file mode 100644 index 00000000..5f8ef757 --- /dev/null +++ b/evidence/review-20261029/failover-1-20261029105415-summary.json @@ -0,0 +1,10 @@ +{ + "target": "api-54f7cc6f98-7c56z", + "started_epoch_ms": 1793271259858, + "confirmed": 44, + "reads": 42, + "errors": 5, + "pass": true, + "recovery_seconds": 0.19, + "confirmed_rps": 1.72 +} diff --git a/evidence/review-20261029/failover-1-20261029105415-target.json b/evidence/review-20261029/failover-1-20261029105415-target.json new file mode 100644 index 00000000..1067a01f --- /dev/null +++ b/evidence/review-20261029/failover-1-20261029105415-target.json @@ -0,0 +1,329 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "annotations": { + "checksum/config": "25be752194917b470e363f8148d7f90539ac1e677c53d10066d788634e0933dc", + "cni.projectcalico.org/containerID": "c9f317c330be89a87aabd36ab90ea573f7472d51084b1e685eb5b11362a91557", + "cni.projectcalico.org/podIP": "10.1.25.114/32", + "cni.projectcalico.org/podIPs": "10.1.25.114/32", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": "2026-10-29T10:53:14Z", + "generateName": "api-54f7cc6f98-", + "generation": 1, + "labels": { + "app": "api", + "pod-template-hash": "54f7cc6f98" + }, + "name": "api-54f7cc6f98-7c56z", + "namespace": "highload-applications", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "blockOwnerDeletion": true, + "controller": true, + "kind": "ReplicaSet", + "name": "api-54f7cc6f98", + "uid": "9a9710e1-f5e8-456c-a8d9-6a6a06fe4839" + } + ], + "resourceVersion": "60154912", + "uid": "9ba114d8-8300-4035-8f6e-4a488ef1b88e" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "256Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-ddq2s", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "enableServiceLinks": true, + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeName": "dev.asisti.tech", + "preemptionPolicy": "PreemptLowerPriority", + "priority": 0, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 20, + "tolerations": [ + { + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ], + "volumes": [ + { + "name": "kube-api-access-ddq2s", + "projected": { + "defaultMode": 420, + "sources": [ + { + "serviceAccountToken": { + "expirationSeconds": 3607, + "path": "token" + } + }, + { + "configMap": { + "items": [ + { + "key": "ca.crt", + "path": "ca.crt" + } + ], + "name": "kube-root-ca.crt" + } + }, + { + "downwardAPI": { + "items": [ + { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + }, + "path": "namespace" + } + ] + } + } + ] + } + } + ] + }, + "status": { + "conditions": [ + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:19Z", + "status": "True", + "type": "PodReadyToStartContainers" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:14Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:35Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:35Z", + "status": "True", + "type": "ContainersReady" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:14Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [ + { + "allocatedResources": { + "cpu": "250m", + "memory": "128Mi" + }, + "containerID": "containerd://4631cb93f41b3636e0662a05dae721ef528e603889d8bfb964d9988d33b4cd82", + "image": "sha256:9be8ec92531a22d2cef260b08669df6e8169d846aa47aaa709d50f1e602285cb", + "imageID": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "lastState": {}, + "name": "api", + "ready": true, + "resources": { + "limits": { + "cpu": "1", + "memory": "256Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "restartCount": 0, + "started": true, + "state": { + "running": { + "startedAt": "2026-10-29T10:53:33Z" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-ddq2s", + "readOnly": true, + "recursiveReadOnly": "Disabled" + } + ] + } + ], + "hostIP": "100.99.166.40", + "hostIPs": [ + { + "ip": "100.99.166.40" + } + ], + "phase": "Running", + "podIP": "10.1.25.114", + "podIPs": [ + { + "ip": "10.1.25.114" + } + ], + "qosClass": "Burstable", + "startTime": "2026-10-29T10:53:14Z" + } +} diff --git a/evidence/review-20261029/failover-2-20261029105524-delete.txt b/evidence/review-20261029/failover-2-20261029105524-delete.txt new file mode 100644 index 00000000..dae4a4dc --- /dev/null +++ b/evidence/review-20261029/failover-2-20261029105524-delete.txt @@ -0,0 +1 @@ +pod "api-54f7cc6f98-txlh4" deleted from highload-applications namespace diff --git a/evidence/review-20261029/failover-2-20261029105524-restored.txt b/evidence/review-20261029/failover-2-20261029105524-restored.txt new file mode 100644 index 00000000..35f0316d --- /dev/null +++ b/evidence/review-20261029/failover-2-20261029105524-restored.txt @@ -0,0 +1 @@ +deployment "api" successfully rolled out diff --git a/evidence/review-20261029/failover-2-20261029105524-run.txt b/evidence/review-20261029/failover-2-20261029105524-run.txt new file mode 100644 index 00000000..cd6310c5 --- /dev/null +++ b/evidence/review-20261029/failover-2-20261029105524-run.txt @@ -0,0 +1,2 @@ +configmap/load-scripts configured +job.batch/load-failover-2-20261029105524 created diff --git a/evidence/review-20261029/failover-2-20261029105524-stop-epoch.txt b/evidence/review-20261029/failover-2-20261029105524-stop-epoch.txt new file mode 100644 index 00000000..09dd250d --- /dev/null +++ b/evidence/review-20261029/failover-2-20261029105524-stop-epoch.txt @@ -0,0 +1 @@ +1793271332.256543 diff --git a/evidence/review-20261029/failover-2-20261029105524-summary.json b/evidence/review-20261029/failover-2-20261029105524-summary.json new file mode 100644 index 00000000..61ce6552 --- /dev/null +++ b/evidence/review-20261029/failover-2-20261029105524-summary.json @@ -0,0 +1,10 @@ +{ + "target": "api-54f7cc6f98-txlh4", + "started_epoch_ms": 1793271329571, + "confirmed": 21, + "reads": 19, + "errors": 7, + "pass": true, + "recovery_seconds": 2.547, + "confirmed_rps": 0.8 +} diff --git a/evidence/review-20261029/failover-2-20261029105524-target.json b/evidence/review-20261029/failover-2-20261029105524-target.json new file mode 100644 index 00000000..6e91c7c7 --- /dev/null +++ b/evidence/review-20261029/failover-2-20261029105524-target.json @@ -0,0 +1,329 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "annotations": { + "checksum/config": "25be752194917b470e363f8148d7f90539ac1e677c53d10066d788634e0933dc", + "cni.projectcalico.org/containerID": "64c7decc0fbadc6eb0b82c66ce1b69fc6e2ef13c27607b8b0cc621c1464300b0", + "cni.projectcalico.org/podIP": "10.1.112.79/32", + "cni.projectcalico.org/podIPs": "10.1.112.79/32", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": "2026-10-29T10:53:35Z", + "generateName": "api-54f7cc6f98-", + "generation": 1, + "labels": { + "app": "api", + "pod-template-hash": "54f7cc6f98" + }, + "name": "api-54f7cc6f98-txlh4", + "namespace": "highload-applications", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "blockOwnerDeletion": true, + "controller": true, + "kind": "ReplicaSet", + "name": "api-54f7cc6f98", + "uid": "9a9710e1-f5e8-456c-a8d9-6a6a06fe4839" + } + ], + "resourceVersion": "60155416", + "uid": "e9c4add7-fd67-4650-a4a2-29ca5b9fd550" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "256Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-mnrp5", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "enableServiceLinks": true, + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeName": "marlosrv0", + "preemptionPolicy": "PreemptLowerPriority", + "priority": 0, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 20, + "tolerations": [ + { + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ], + "volumes": [ + { + "name": "kube-api-access-mnrp5", + "projected": { + "defaultMode": 420, + "sources": [ + { + "serviceAccountToken": { + "expirationSeconds": 3607, + "path": "token" + } + }, + { + "configMap": { + "items": [ + { + "key": "ca.crt", + "path": "ca.crt" + } + ], + "name": "kube-root-ca.crt" + } + }, + { + "downwardAPI": { + "items": [ + { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + }, + "path": "namespace" + } + ] + } + } + ] + } + } + ] + }, + "status": { + "conditions": [ + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:39Z", + "status": "True", + "type": "PodReadyToStartContainers" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:35Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:55:30Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:55:30Z", + "status": "True", + "type": "ContainersReady" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:35Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [ + { + "allocatedResources": { + "cpu": "250m", + "memory": "128Mi" + }, + "containerID": "containerd://dd8482e1e67dc153f5787894d4974b39d5e7fead678a7e6695974297d0b75591", + "image": "sha256:9be8ec92531a22d2cef260b08669df6e8169d846aa47aaa709d50f1e602285cb", + "imageID": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "lastState": {}, + "name": "api", + "ready": true, + "resources": { + "limits": { + "cpu": "1", + "memory": "256Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "restartCount": 0, + "started": true, + "state": { + "running": { + "startedAt": "2026-10-29T10:53:39Z" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-mnrp5", + "readOnly": true, + "recursiveReadOnly": "Disabled" + } + ] + } + ], + "hostIP": "192.168.1.37", + "hostIPs": [ + { + "ip": "192.168.1.37" + } + ], + "phase": "Running", + "podIP": "10.1.112.79", + "podIPs": [ + { + "ip": "10.1.112.79" + } + ], + "qosClass": "Burstable", + "startTime": "2026-10-29T10:53:35Z" + } +} diff --git a/evidence/review-20261029/final-deployment.json b/evidence/review-20261029/final-deployment.json new file mode 100644 index 00000000..7e4bddfa --- /dev/null +++ b/evidence/review-20261029/final-deployment.json @@ -0,0 +1,214 @@ +{ + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": { + "deployment.kubernetes.io/revision": "34", + "meta.helm.sh/release-name": "lab2", + "meta.helm.sh/release-namespace": "highload-applications" + }, + "creationTimestamp": "2026-10-16T07:38:22Z", + "generation": 52, + "labels": { + "app.kubernetes.io/managed-by": "Helm" + }, + "name": "api", + "namespace": "highload-applications", + "resourceVersion": "60177495", + "uid": "5e9bf549-45c6-40b4-b86e-d5d14a1cb5bc" + }, + "spec": { + "progressDeadlineSeconds": 600, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "app": "api" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 0 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "annotations": { + "checksum/config": "25be752194917b470e363f8148d7f90539ac1e677c53d10066d788634e0933dc", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": null, + "labels": { + "app": "api" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "256Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File" + } + ], + "dnsPolicy": "ClusterFirst", + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "terminationGracePeriodSeconds": 20, + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ] + } + } + }, + "status": { + "availableReplicas": 2, + "conditions": [ + { + "lastTransitionTime": "2026-10-16T07:38:22Z", + "lastUpdateTime": "2026-10-29T12:21:54Z", + "message": "ReplicaSet \"api-54f7cc6f98\" has successfully progressed.", + "reason": "NewReplicaSetAvailable", + "status": "True", + "type": "Progressing" + }, + { + "lastTransitionTime": "2026-10-29T12:24:53Z", + "lastUpdateTime": "2026-10-29T12:24:53Z", + "message": "Deployment has minimum availability.", + "reason": "MinimumReplicasAvailable", + "status": "True", + "type": "Available" + } + ], + "observedGeneration": 52, + "readyReplicas": 2, + "replicas": 2, + "updatedReplicas": 2 + } +} diff --git a/evidence/review-20261029/final-rollout.txt b/evidence/review-20261029/final-rollout.txt new file mode 100644 index 00000000..35f0316d --- /dev/null +++ b/evidence/review-20261029/final-rollout.txt @@ -0,0 +1 @@ +deployment "api" successfully rolled out diff --git a/evidence/review-20261029/final-smoke-retry.txt b/evidence/review-20261029/final-smoke-retry.txt new file mode 100644 index 00000000..d64ab8ff --- /dev/null +++ b/evidence/review-20261029/final-smoke-retry.txt @@ -0,0 +1,3 @@ +python3 tests/smoke.py --base-url "https://hl.agapov.space" +FAIL: POST /api/v1/auth/sessions: connection/TLS failure (URLError) +make: *** [test] Error 1 diff --git a/evidence/review-20261029/final-smoke.txt b/evidence/review-20261029/final-smoke.txt new file mode 100644 index 00000000..c1486ae1 --- /dev/null +++ b/evidence/review-20261029/final-smoke.txt @@ -0,0 +1,3 @@ +python3 tests/smoke.py --base-url "https://hl.agapov.space" +FAIL: POST /api/v1/users: connection/TLS failure (URLError) +make: *** [test] Error 1 diff --git a/evidence/review-20261029/go-version.txt b/evidence/review-20261029/go-version.txt new file mode 100644 index 00000000..f24c583a --- /dev/null +++ b/evidence/review-20261029/go-version.txt @@ -0,0 +1 @@ +go version go1.27.1 darwin/arm64 diff --git a/evidence/review-20261029/helm-lint.txt b/evidence/review-20261029/helm-lint.txt new file mode 100644 index 00000000..da8e6a67 --- /dev/null +++ b/evidence/review-20261029/helm-lint.txt @@ -0,0 +1,4 @@ +==> Linting charts/messenger +[INFO] Chart.yaml: icon is recommended + +1 chart(s) linted, 0 chart(s) failed diff --git a/evidence/review-20261029/helm-version.txt b/evidence/review-20261029/helm-version.txt new file mode 100644 index 00000000..9efc478f --- /dev/null +++ b/evidence/review-20261029/helm-version.txt @@ -0,0 +1 @@ +v4.3.1+gc0d08d0 diff --git a/evidence/review-20261029/image.json b/evidence/review-20261029/image.json new file mode 100644 index 00000000..9afcdf46 --- /dev/null +++ b/evidence/review-20261029/image.json @@ -0,0 +1,20 @@ +{ + "buildx.build.provenance": { + "buildType": "", + "invocation": { + "configSource": {}, + "parameters": {}, + "environment": { + "platform": "" + } + } + }, + "buildx.build.ref": "asisti-builder/asisti-builder0/ccwfu2v84bvpitu67b53xiunu", + "containerimage.descriptor": { + "mediaType": "application/vnd.oci.image.index.v1+json", + "digest": "sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "size": 855 + }, + "containerimage.digest": "sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "image.name": "asisti.registry.twcstorage.ru/mtusi2026lab3:review-20261029" +} \ No newline at end of file diff --git a/evidence/review-20261029/initial-api.json b/evidence/review-20261029/initial-api.json new file mode 100644 index 00000000..accf8bee --- /dev/null +++ b/evidence/review-20261029/initial-api.json @@ -0,0 +1,667 @@ +{ + "apiVersion": "v1", + "items": [ + { + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "annotations": { + "checksum/config": "25be752194917b470e363f8148d7f90539ac1e677c53d10066d788634e0933dc", + "cni.projectcalico.org/containerID": "c9f317c330be89a87aabd36ab90ea573f7472d51084b1e685eb5b11362a91557", + "cni.projectcalico.org/podIP": "10.1.25.114/32", + "cni.projectcalico.org/podIPs": "10.1.25.114/32", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": "2026-10-29T10:53:14Z", + "generateName": "api-54f7cc6f98-", + "generation": 1, + "labels": { + "app": "api", + "pod-template-hash": "54f7cc6f98" + }, + "name": "api-54f7cc6f98-7c56z", + "namespace": "highload-applications", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "blockOwnerDeletion": true, + "controller": true, + "kind": "ReplicaSet", + "name": "api-54f7cc6f98", + "uid": "9a9710e1-f5e8-456c-a8d9-6a6a06fe4839" + } + ], + "resourceVersion": "60154912", + "uid": "9ba114d8-8300-4035-8f6e-4a488ef1b88e" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "256Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-ddq2s", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "enableServiceLinks": true, + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeName": "dev.asisti.tech", + "preemptionPolicy": "PreemptLowerPriority", + "priority": 0, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 20, + "tolerations": [ + { + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ], + "volumes": [ + { + "name": "kube-api-access-ddq2s", + "projected": { + "defaultMode": 420, + "sources": [ + { + "serviceAccountToken": { + "expirationSeconds": 3607, + "path": "token" + } + }, + { + "configMap": { + "items": [ + { + "key": "ca.crt", + "path": "ca.crt" + } + ], + "name": "kube-root-ca.crt" + } + }, + { + "downwardAPI": { + "items": [ + { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + }, + "path": "namespace" + } + ] + } + } + ] + } + } + ] + }, + "status": { + "conditions": [ + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:19Z", + "status": "True", + "type": "PodReadyToStartContainers" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:14Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:35Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:35Z", + "status": "True", + "type": "ContainersReady" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:14Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [ + { + "allocatedResources": { + "cpu": "250m", + "memory": "128Mi" + }, + "containerID": "containerd://4631cb93f41b3636e0662a05dae721ef528e603889d8bfb964d9988d33b4cd82", + "image": "sha256:9be8ec92531a22d2cef260b08669df6e8169d846aa47aaa709d50f1e602285cb", + "imageID": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "lastState": {}, + "name": "api", + "ready": true, + "resources": { + "limits": { + "cpu": "1", + "memory": "256Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "restartCount": 0, + "started": true, + "state": { + "running": { + "startedAt": "2026-10-29T10:53:33Z" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-ddq2s", + "readOnly": true, + "recursiveReadOnly": "Disabled" + } + ] + } + ], + "hostIP": "100.99.166.40", + "hostIPs": [ + { + "ip": "100.99.166.40" + } + ], + "phase": "Running", + "podIP": "10.1.25.114", + "podIPs": [ + { + "ip": "10.1.25.114" + } + ], + "qosClass": "Burstable", + "startTime": "2026-10-29T10:53:14Z" + } + }, + { + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "annotations": { + "checksum/config": "25be752194917b470e363f8148d7f90539ac1e677c53d10066d788634e0933dc", + "cni.projectcalico.org/containerID": "64c7decc0fbadc6eb0b82c66ce1b69fc6e2ef13c27607b8b0cc621c1464300b0", + "cni.projectcalico.org/podIP": "10.1.112.79/32", + "cni.projectcalico.org/podIPs": "10.1.112.79/32", + "kubectl.kubernetes.io/restartedAt": "2026-10-16T11:50:37+03:00" + }, + "creationTimestamp": "2026-10-29T10:53:35Z", + "generateName": "api-54f7cc6f98-", + "generation": 1, + "labels": { + "app": "api", + "pod-template-hash": "54f7cc6f98" + }, + "name": "api-54f7cc6f98-txlh4", + "namespace": "highload-applications", + "ownerReferences": [ + { + "apiVersion": "apps/v1", + "blockOwnerDeletion": true, + "controller": true, + "kind": "ReplicaSet", + "name": "api-54f7cc6f98", + "uid": "9a9710e1-f5e8-456c-a8d9-6a6a06fe4839" + } + ], + "resourceVersion": "60154970", + "uid": "e9c4add7-fd67-4650-a4a2-29ca5b9fd550" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "INSTANCE_ID", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.name" + } + } + }, + { + "name": "CURSOR_SIGNING_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "cursor-key", + "name": "messenger-secrets" + } + } + }, + { + "name": "DATABASE_URL", + "valueFrom": { + "secretKeyRef": { + "key": "database-url", + "name": "messenger-secrets" + } + } + } + ], + "envFrom": [ + { + "configMapRef": { + "name": "messenger-config" + } + } + ], + "image": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "imagePullPolicy": "IfNotPresent", + "lifecycle": { + "preStop": { + "sleep": { + "seconds": 3 + } + } + }, + "livenessProbe": { + "failureThreshold": 3, + "httpGet": { + "path": "/health/live", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 5, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "name": "api", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "readinessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 2 + }, + "resources": { + "limits": { + "cpu": "1", + "memory": "256Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "drop": [ + "ALL" + ] + }, + "readOnlyRootFilesystem": true + }, + "startupProbe": { + "failureThreshold": 30, + "httpGet": { + "path": "/health/ready", + "port": 8080, + "scheme": "HTTP" + }, + "periodSeconds": 2, + "successThreshold": 1, + "timeoutSeconds": 1 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-mnrp5", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "enableServiceLinks": true, + "imagePullSecrets": [ + { + "name": "registry-pull" + } + ], + "nodeName": "marlosrv0", + "preemptionPolicy": "PreemptLowerPriority", + "priority": 0, + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": { + "runAsNonRoot": true, + "runAsUser": 65532, + "seccompProfile": { + "type": "RuntimeDefault" + } + }, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 20, + "tolerations": [ + { + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "topologySpreadConstraints": [ + { + "labelSelector": { + "matchLabels": { + "app": "api" + } + }, + "maxSkew": 1, + "topologyKey": "kubernetes.io/hostname", + "whenUnsatisfiable": "ScheduleAnyway" + } + ], + "volumes": [ + { + "name": "kube-api-access-mnrp5", + "projected": { + "defaultMode": 420, + "sources": [ + { + "serviceAccountToken": { + "expirationSeconds": 3607, + "path": "token" + } + }, + { + "configMap": { + "items": [ + { + "key": "ca.crt", + "path": "ca.crt" + } + ], + "name": "kube-root-ca.crt" + } + }, + { + "downwardAPI": { + "items": [ + { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + }, + "path": "namespace" + } + ] + } + } + ] + } + } + ] + }, + "status": { + "conditions": [ + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:39Z", + "status": "True", + "type": "PodReadyToStartContainers" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:35Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:40Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:40Z", + "status": "True", + "type": "ContainersReady" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2026-10-29T10:53:35Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [ + { + "allocatedResources": { + "cpu": "250m", + "memory": "128Mi" + }, + "containerID": "containerd://dd8482e1e67dc153f5787894d4974b39d5e7fead678a7e6695974297d0b75591", + "image": "sha256:9be8ec92531a22d2cef260b08669df6e8169d846aa47aaa709d50f1e602285cb", + "imageID": "asisti.registry.twcstorage.ru/mtusi2026lab3@sha256:6f1cf88f0a53728819d0489804b4155942c1cc78596307e43f2adc2ad527f0e3", + "lastState": {}, + "name": "api", + "ready": true, + "resources": { + "limits": { + "cpu": "1", + "memory": "256Mi" + }, + "requests": { + "cpu": "250m", + "memory": "128Mi" + } + }, + "restartCount": 0, + "started": true, + "state": { + "running": { + "startedAt": "2026-10-29T10:53:39Z" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-mnrp5", + "readOnly": true, + "recursiveReadOnly": "Disabled" + } + ] + } + ], + "hostIP": "192.168.1.37", + "hostIPs": [ + { + "ip": "192.168.1.37" + } + ], + "phase": "Running", + "podIP": "10.1.112.79", + "podIPs": [ + { + "ip": "10.1.112.79" + } + ], + "qosClass": "Burstable", + "startTime": "2026-10-29T10:53:35Z" + } + } + ], + "kind": "List", + "metadata": { + "resourceVersion": "" + } +} diff --git a/evidence/review-20261029/kubernetes-version.json b/evidence/review-20261029/kubernetes-version.json new file mode 100644 index 00000000..b86321cb --- /dev/null +++ b/evidence/review-20261029/kubernetes-version.json @@ -0,0 +1,29 @@ +{ + "clientVersion": { + "major": "1", + "minor": "37", + "gitVersion": "v1.37.1", + "gitCommit": "f78e722310e50bcaca9276be22276d9e91d91308", + "gitTreeState": "clean", + "buildDate": "2026-09-23T17:06:22Z", + "goVersion": "go1.26.8", + "compiler": "gc", + "platform": "darwin/arm64" + }, + "kustomizeVersion": "v5.8.1", + "serverVersion": { + "major": "1", + "minor": "33", + "emulationMajor": "1", + "emulationMinor": "33", + "minCompatibilityMajor": "1", + "minCompatibilityMinor": "32", + "gitVersion": "v1.33.13", + "gitCommit": "c029d48d28322ad0369aabdcf8b656fd3195cd30", + "gitTreeState": "clean", + "buildDate": "2026-06-22T07:16:30Z", + "goVersion": "go1.25.11", + "compiler": "gc", + "platform": "linux/amd64" + } +} diff --git a/evidence/review-20261029/lint.txt b/evidence/review-20261029/lint.txt new file mode 100644 index 00000000..6a3ebaa7 --- /dev/null +++ b/evidence/review-20261029/lint.txt @@ -0,0 +1 @@ +0 issues. diff --git a/evidence/review-20261029/load-failover-1-20261029105415.txt b/evidence/review-20261029/load-failover-1-20261029105415.txt new file mode 100644 index 00000000..5cde67ab --- /dev/null +++ b/evidence/review-20261029/load-failover-1-20261029105415.txt @@ -0,0 +1,29 @@ +time="2026-10-29T10:54:19Z" level=info msg="READY_TO_STOP api-54f7cc6f98-7c56z" source=console +time="2026-10-29T10:54:29Z" level=warning msg="Request Failed" error="Post \"https://hl.agapov.space/api/v1/chats/180f9552-ab33-4ee2-917c-47b3a9c17ed8/messages\": request timeout" +time="2026-10-29T10:54:31Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/api/v1/chats/180f9552-ab33-4ee2-917c-47b3a9c17ed8/messages?limit=100\": request timeout" +time="2026-10-29T10:54:33Z" level=warning msg="Request Failed" error="Post \"https://hl.agapov.space/api/v1/chats/180f9552-ab33-4ee2-917c-47b3a9c17ed8/messages\": request timeout" +time="2026-10-29T10:54:35Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/api/v1/chats/180f9552-ab33-4ee2-917c-47b3a9c17ed8/messages?limit=100\": request timeout" +time="2026-10-29T10:54:37Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/api/v1/chats/180f9552-ab33-4ee2-917c-47b3a9c17ed8/messages?limit=100\": request timeout" +time="2026-10-29T10:54:44Z" level=info msg="{\"target\":\"api-54f7cc6f98-7c56z\",\"started_epoch_ms\":1793271259858,\"confirmed\":44,\"reads\":42,\"errors\":5,\"events\":[{\"seconds\":0.602,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":1.191,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":1.671,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":1.969,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":2.61,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":3.313,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":4.104,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":4.584,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":4.835,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":5.156,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":5.41,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":5.64,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":5.866,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":6.084,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":6.294,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":6.477,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":6.709,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":6.906,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":7.081,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":15.6,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":17.893,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":18.63,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":19.066,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":19.505,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":20.093,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":20.642,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":21.21,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":21.538,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":21.937,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":22.234,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":22.503,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":22.801,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":23.015,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":23.197,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":23.365,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":23.542,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":23.723,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":23.914,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":24.095,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":24.293,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":24.517,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":24.71,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":24.897,\"instance\":\"api-54f7cc6f98-4xgnf\"}],\"pass\":true}" source=console + + + █ TOTAL RESULTS + + HTTP + http_req_duration..............: avg=193.89ms min=24.17ms med=78.6ms max=2s p(90)=317.93ms p(95)=506.05ms + { expected_response:true }...: avg=111.7ms min=24.17ms med=76.47ms max=591.34ms p(90)=246.96ms p(95)=351.41ms + http_req_failed................: 4.34% 5 out of 115 + http_reqs......................: 115 4.163984/s + + EXECUTION + iteration_duration.............: avg=25.11s min=25.11s med=25.11s max=25.11s p(90)=25.11s p(95)=25.11s + iterations.....................: 1 0.036209/s + vus............................: 1 min=0 max=1 + vus_max........................: 1 min=1 max=1 + + NETWORK + data_received..................: 246 kB 8.9 kB/s + data_sent......................: 11 kB 387 B/s + + + diff --git a/evidence/review-20261029/load-failover-2-20261029105524.txt b/evidence/review-20261029/load-failover-2-20261029105524.txt new file mode 100644 index 00000000..053d1ae5 --- /dev/null +++ b/evidence/review-20261029/load-failover-2-20261029105524.txt @@ -0,0 +1,31 @@ +time="2026-10-29T10:55:29Z" level=info msg="READY_TO_STOP api-54f7cc6f98-txlh4" source=console +time="2026-10-29T10:55:38Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/api/v1/chats/c92c898b-5596-47dd-90a8-8b54b127762a/messages?limit=100\": request timeout" +time="2026-10-29T10:55:40Z" level=warning msg="Request Failed" error="Post \"https://hl.agapov.space/api/v1/chats/c92c898b-5596-47dd-90a8-8b54b127762a/messages\": request timeout" +time="2026-10-29T10:55:42Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/api/v1/chats/c92c898b-5596-47dd-90a8-8b54b127762a/messages?limit=100\": request timeout" +time="2026-10-29T10:55:44Z" level=warning msg="Request Failed" error="Post \"https://hl.agapov.space/api/v1/chats/c92c898b-5596-47dd-90a8-8b54b127762a/messages\": request timeout" +time="2026-10-29T10:55:46Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/api/v1/chats/c92c898b-5596-47dd-90a8-8b54b127762a/messages?limit=100\": request timeout" +time="2026-10-29T10:55:48Z" level=warning msg="Request Failed" error="Post \"https://hl.agapov.space/api/v1/chats/c92c898b-5596-47dd-90a8-8b54b127762a/messages\": request timeout" +time="2026-10-29T10:55:50Z" level=warning msg="Request Failed" error="Get \"https://hl.agapov.space/api/v1/chats/c92c898b-5596-47dd-90a8-8b54b127762a/messages?limit=100\": request timeout" +time="2026-10-29T10:55:54Z" level=info msg="{\"target\":\"api-54f7cc6f98-txlh4\",\"started_epoch_ms\":1793271329571,\"confirmed\":21,\"reads\":19,\"errors\":7,\"events\":[{\"seconds\":0.319,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":0.62,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":0.97,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":1.344,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":1.72,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":2.045,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":2.375,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":2.935,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":3.505,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":4.182,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":4.823,\"instance\":\"api-54f7cc6f98-txlh4\"},{\"seconds\":5.233,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":5.61,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":6.016,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":6.439,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":21.401,\"instance\":\"api-54f7cc6f98-crhmd\"},{\"seconds\":23.434,\"instance\":\"api-54f7cc6f98-crhmd\"},{\"seconds\":23.911,\"instance\":\"api-54f7cc6f98-crhmd\"},{\"seconds\":24.409,\"instance\":\"api-54f7cc6f98-4xgnf\"},{\"seconds\":24.827,\"instance\":\"api-54f7cc6f98-4xgnf\"}],\"pass\":true}" source=console + + + █ TOTAL RESULTS + + HTTP + http_req_duration..............: avg=357.73ms min=67.9ms med=126.26ms max=2s p(90)=1.7s p(95)=2s + { expected_response:true }...: avg=178.02ms min=67.9ms med=121.99ms max=1.7s p(90)=274.92ms p(95)=380.46ms + http_req_failed................: 9.85% 7 out of 71 + http_reqs......................: 71 2.545285/s + + EXECUTION + iteration_duration.............: avg=25.26s min=25.26s med=25.26s max=25.26s p(90)=25.26s p(95)=25.26s + iterations.....................: 1 0.035849/s + vus............................: 1 min=0 max=1 + vus_max........................: 1 min=1 max=1 + + NETWORK + data_received..................: 74 kB 2.6 kB/s + data_sent......................: 6.5 kB 231 B/s + + + diff --git a/evidence/review-20261029/resources-failover-1-20261029105415.txt b/evidence/review-20261029/resources-failover-1-20261029105415.txt new file mode 100644 index 00000000..c2ddb991 --- /dev/null +++ b/evidence/review-20261029/resources-failover-1-20261029105415.txt @@ -0,0 +1,50 @@ +UTC 2026-10-29T10:54:17Z +NAME CPU(cores) MEMORY(bytes) +api-54f7cc6f98-7c56z 3m 22Mi +api-54f7cc6f98-txlh4 2m 22Mi +postgres-0 5m 26Mi +valkey-0 8m 8Mi +valkey-1 5m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|2 +UTC 2026-10-29T10:54:23Z +NAME CPU(cores) MEMORY(bytes) +api-54f7cc6f98-7c56z 3m 22Mi +api-54f7cc6f98-txlh4 2m 22Mi +postgres-0 5m 26Mi +valkey-0 8m 8Mi +valkey-1 5m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|3 +UTC 2026-10-29T10:54:30Z +NAME CPU(cores) MEMORY(bytes) +api-54f7cc6f98-txlh4 2m 22Mi +postgres-0 5m 26Mi +valkey-0 8m 8Mi +valkey-1 5m 13Mi +valkey-2 6m 3Mi +active|||1 +idle|Client|ClientRead|2 +UTC 2026-10-29T10:54:41Z +NAME CPU(cores) MEMORY(bytes) +api-54f7cc6f98-txlh4 20m 42Mi +load-failover-1-20261029105415-hng87 36m 51Mi +postgres-0 34m 30Mi +valkey-0 18m 8Mi +valkey-1 8m 13Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|3 +UTC 2026-10-29T10:54:48Z +NAME CPU(cores) MEMORY(bytes) +api-54f7cc6f98-4xgnf 4m 43Mi +api-54f7cc6f98-txlh4 20m 42Mi +load-failover-1-20261029105415-hng87 11m 51Mi +postgres-0 34m 30Mi +valkey-0 9m 8Mi +valkey-1 8m 13Mi +valkey-2 10m 3Mi +active|||1 +idle|Client|ClientRead|3 diff --git a/evidence/review-20261029/resources-failover-2-20261029105524.txt b/evidence/review-20261029/resources-failover-2-20261029105524.txt new file mode 100644 index 00000000..a779165c --- /dev/null +++ b/evidence/review-20261029/resources-failover-2-20261029105524.txt @@ -0,0 +1,39 @@ +UTC 2026-10-29T10:55:26Z +NAME CPU(cores) MEMORY(bytes) +api-54f7cc6f98-4xgnf 6m 43Mi +api-54f7cc6f98-txlh4 12m 7Mi +postgres-0 6m 30Mi +valkey-0 13m 8Mi +valkey-1 5m 13Mi +valkey-2 8m 3Mi +active|||1 +idle|Client|ClientRead|3 +UTC 2026-10-29T10:55:33Z +NAME CPU(cores) MEMORY(bytes) +api-54f7cc6f98-4xgnf 3m 43Mi +api-54f7cc6f98-txlh4 3m 7Mi +postgres-0 4m 30Mi +valkey-0 8m 8Mi +valkey-1 6m 13Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|4 +UTC 2026-10-29T10:55:39Z +NAME CPU(cores) MEMORY(bytes) +api-54f7cc6f98-4xgnf 3m 43Mi +postgres-0 4m 30Mi +valkey-0 8m 8Mi +valkey-1 6m 13Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|2 +UTC 2026-10-29T10:55:56Z +NAME CPU(cores) MEMORY(bytes) +api-54f7cc6f98-4xgnf 21m 44Mi +load-failover-2-20261029105524-bq2wx 30m 11Mi +postgres-0 16m 27Mi +valkey-0 10m 8Mi +valkey-1 10m 13Mi +valkey-2 7m 3Mi +active|||1 +idle|Client|ClientRead|3 diff --git a/evidence/review-20261029/smoke-after.txt b/evidence/review-20261029/smoke-after.txt new file mode 100644 index 00000000..4fe323c6 --- /dev/null +++ b/evidence/review-20261029/smoke-after.txt @@ -0,0 +1,2 @@ +python3 tests/smoke.py --base-url "https://hl.agapov.space" +PASS: lab3 public API scenario; infrastructure and grading evidence remain separate. diff --git a/evidence/review-20261029/smoke.txt b/evidence/review-20261029/smoke.txt new file mode 100644 index 00000000..c3d30e0e --- /dev/null +++ b/evidence/review-20261029/smoke.txt @@ -0,0 +1,3 @@ +python3 tests/smoke.py --base-url "https://hl.agapov.space" +FAIL: GET /api/v1/users/me: expected [200], received 503 +make: *** [test] Error 1 diff --git a/evidence/review-20261029/targets.txt b/evidence/review-20261029/targets.txt new file mode 100644 index 00000000..c28f6886 --- /dev/null +++ b/evidence/review-20261029/targets.txt @@ -0,0 +1,2 @@ +api-54f7cc6f98-7c56z +api-54f7cc6f98-txlh4 diff --git a/evidence/review-20261029/vet.txt b/evidence/review-20261029/vet.txt new file mode 100644 index 00000000..e69de29b diff --git a/internal/controller/http/fiber/body_limit_test.go b/internal/controller/http/fiber/body_limit_test.go new file mode 100644 index 00000000..72833d5a --- /dev/null +++ b/internal/controller/http/fiber/body_limit_test.go @@ -0,0 +1,68 @@ +package fiber + +import ( + "context" + "encoding/json" + "net" + "net/http" + "strings" + "testing" + "time" + + "github.com/gofiber/fiber/v2" + + "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/config" + httpmodel "gitea.privcloud.tech/vlad_marlo/mtusi2026lab3/internal/model/http" +) + +// TestBodyLimitInstanceHeader verifies parser-generated 413 responses over a real TCP listener. +func TestBodyLimitInstanceHeader(t *testing.T) { + // Arrange. + ctrl := testController(t, func(cfg *config.Config) { + cfg.HTTP.InstanceID = "body-limit-test-instance" + }) + ctrl.cfg.Host = "127.0.0.1" + ctrl.cfg.Port = 0 + address := make(chan string, 1) + ctrl.server.Hooks().OnListen(func(data fiber.ListenData) error { + address <- net.JoinHostPort(data.Host, data.Port) + return nil + }) + if err := ctrl.Start(t.Context()); err != nil { + t.Fatal(err) + } + t.Cleanup(func() { + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) + defer cancel() + if err := ctrl.Stop(ctx); err != nil { + t.Error(err) + } + }) + client := &http.Client{Timeout: 3 * time.Second} + + // Act. + response, err := client.Post("http://"+<-address+"/api/v1/users", "application/json", strings.NewReader(strings.Repeat("x", ctrl.cfg.MaxBodyBytes+1))) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := response.Body.Close(); err != nil { + t.Error(err) + } + }() + + // Assert. + if response.StatusCode != http.StatusRequestEntityTooLarge { + t.Fatalf("status=%d", response.StatusCode) + } + if instance := response.Header.Get("X-Instance-Id"); instance != ctrl.instanceID { + t.Fatalf("instance=%q, want %q", instance, ctrl.instanceID) + } + var body httpmodel.ErrorResponse + if err := json.NewDecoder(response.Body).Decode(&body); err != nil { + t.Fatal(err) + } + if body.Error.Code != "payload_too_large" || body.Error.RequestID == "" || body.Error.RequestID != response.Header.Get(headerRequestID) { + t.Fatalf("invalid error envelope: %+v", body) + } +} diff --git a/internal/controller/http/fiber/errors.go b/internal/controller/http/fiber/errors.go index e183f8b3..4a9a5795 100644 --- a/internal/controller/http/fiber/errors.go +++ b/internal/controller/http/fiber/errors.go @@ -15,6 +15,8 @@ import ( // handleErr normalizes a failure and writes the public error envelope. func (ctrl *Controller) handleErr(ctx *fiber.Ctx, err error) error { + // Parser failures such as BodyLimit rejection bypass request middleware. + ctx.Set("X-Instance-Id", ctrl.instanceID) requestID := ctx.GetRespHeader(headerRequestID) if requestID == "" { requestID = uuid.NewString() diff --git a/scripts/experiment.sh b/scripts/experiment.sh index f75e1f75..159ef282 100755 --- a/scripts/experiment.sh +++ b/scripts/experiment.sh @@ -1,27 +1,56 @@ #!/bin/sh -# Compare controlled replica/resource budgets, then restore the normal HPA configuration. +# Measure replica budgets, load saturation and a pool-size A/B using the same workload. set -eu cd "$(dirname "$0")/.." : "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" "${RELEASE:=lab2}" : "${DURATION:=30}" "${VUS:=32}" -run_id=$(date -u +%Y%m%d%H%M%S) -export KUBE_CONTEXT NAMESPACE DURATION VUS -mkdir -p evidence +: "${EVIDENCE_DIR:=evidence/research-$(date -u +%Y%m%d%H%M%S)}" +helm_apply_mode= +if helm upgrade --help | rg -q -- '--server-side'; then helm_apply_mode=--server-side=false; fi +export KUBE_CONTEXT NAMESPACE DURATION VUS EVIDENCE_DIR +mkdir -p "$EVIDENCE_DIR" +helm get values "$RELEASE" --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" -o yaml > "$EVIDENCE_DIR/restore-values.yaml" restore() { - helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" -f charts/messenger/values.yaml --wait --wait-for-jobs --timeout 240s + helm upgrade $helm_apply_mode "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" -f "$EVIDENCE_DIR/restore-values.yaml" --wait --wait-for-jobs --timeout 240s > "$EVIDENCE_DIR/restore.txt" 2>&1 } trap restore EXIT -printf 'profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool\n' > evidence/scaling-profiles.csv -for profile in fixed1 fixed2 fixed4 growing1 growing2 growing4; do +trap 'exit 130' INT +trap 'exit 143' TERM +helm upgrade $helm_apply_mode "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set autoscaling.enabled=false --wait --wait-for-jobs --timeout 240s > "$EVIDENCE_DIR/disable-hpa.txt" +# Allow an already-running HPA reconciliation to finish before changing replicas. +sleep 16 +date -u '+%Y-%m-%dT%H:%M:%SZ' > "$EVIDENCE_DIR/date.txt" +git rev-parse HEAD > "$EVIDENCE_DIR/base-revision.txt" +shasum -a 256 student-tests/load/scaling.js charts/messenger/values.yaml internal/controller/http/fiber/errors.go > "$EVIDENCE_DIR/source.sha256" +kubectl --context "$KUBE_CONTEXT" get nodes -o wide > "$EVIDENCE_DIR/nodes.txt" +printf 'profile,run,replicas,cpu_millicores_per_replica,memory_mib_per_replica,pool,vus,duration\n' > "$EVIDENCE_DIR/profiles.csv" +for profile in ${PROFILES:-fixed1 fixed2 fixed4 growing1 growing2 growing4 saturation8 saturation64 single32a single8b single32b}; do + pool=8; vus=$VUS; probe_timeout=2; probe_failures=2 case "$profile" in fixed1) replicas=1; cpu=1000; memory=512 ;; fixed2) replicas=2; cpu=500; memory=256 ;; - fixed4) replicas=4; cpu=250; memory=128 ;; + fixed4|growing4|pool8b) replicas=4; cpu=250; memory=128 ;; growing1) replicas=1; cpu=250; memory=128 ;; growing2) replicas=2; cpu=250; memory=128 ;; - growing4) replicas=4; cpu=250; memory=128 ;; + saturation8) replicas=1; cpu=1000; memory=512; vus=8 ;; + saturation64) replicas=1; cpu=1000; memory=512; vus=64 ;; + resource-low-a|resource-low-b) replicas=2; cpu=250; memory=128 ;; + resource-high-a|resource-high-b) replicas=2; cpu=500; memory=256 ;; + probe2a|probe2b) replicas=1; cpu=1000; memory=512 ;; + probe5a|probe5b) replicas=1; cpu=1000; memory=512; probe_timeout=5; probe_failures=1 ;; + single8a|single8b) replicas=1; cpu=1000; memory=512 ;; + single32a|single32b) replicas=1; cpu=1000; memory=512; pool=32 ;; + pool32a|pool32b) replicas=4; cpu=250; memory=128; pool=32 ;; + *) echo "Unknown profile $profile" >&2; exit 2 ;; esac - helm upgrade "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set autoscaling.enabled=false --set "api.replicas=$replicas" --set "api.resources.requests.cpu=${cpu}m,api.resources.limits.cpu=${cpu}m,api.resources.requests.memory=${memory}Mi,api.resources.limits.memory=${memory}Mi" --set-string api.env.GOMEMLIMIT=80MiB --wait --wait-for-jobs --timeout 240s > "evidence/rollout-$profile.txt" - printf '%s,%s,%s,%s,%s,8\n' "$profile" "$profile-$run_id" "$replicas" "$cpu" "$memory" >> evidence/scaling-profiles.csv - RUN="$profile-$run_id" scripts/run-load.sh - done + set -- + if [ -n "${BENCHMARK_NODE:-}" ]; then + set -- --set-json "api.nodeSelector={\"kubernetes.io/hostname\":\"$BENCHMARK_NODE\"}" + fi + run="$profile-$(date -u +%Y%m%d%H%M%S)" + helm upgrade $helm_apply_mode "$RELEASE" charts/messenger --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" --reuse-values --set autoscaling.enabled=false --set "api.replicas=$replicas" --set "api.resources.requests.cpu=${cpu}m,api.resources.limits.cpu=${cpu}m,api.resources.requests.memory=${memory}Mi,api.resources.limits.memory=${memory}Mi" --set-string api.env.GOMEMLIMIT=80MiB --set-string "api.env.DEPENDENCY_POOL_SIZE=$pool" --set "api.readiness.timeoutSeconds=$probe_timeout,api.readiness.failureThreshold=$probe_failures" "$@" --wait --wait-for-jobs --timeout 240s > "$EVIDENCE_DIR/rollout-$profile.txt" + # Let old admission leases expire after rolling replacement. + sleep 31 + printf '%s,%s,%s,%s,%s,%s,%s,%s\n' "$profile" "$run" "$replicas" "$cpu" "$memory" "$pool" "$vus" "$DURATION" >> "$EVIDENCE_DIR/profiles.csv" + RUN="$run" VUS="$vus" scripts/run-load.sh +done diff --git a/scripts/plot-research.py b/scripts/plot-research.py new file mode 100644 index 00000000..dffe83da --- /dev/null +++ b/scripts/plot-research.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python3 +"""Summarize measured k6 counters and plot reproducible research figures.""" +import csv +import json +from pathlib import Path +import sys +import matplotlib +matplotlib.use("Agg") +import matplotlib.pyplot as plt + +roots = [Path(arg) for arg in sys.argv[1:]] +def resource_peaks(root, run): + """resource_peaks aggregates five-second samples, including setup and warmup.""" + path = root / ("resources-" + run + ".txt") + lines = path.read_text().splitlines() + pod_snapshot = root / ("pods-" + run + ".txt") + if pod_snapshot.exists(): + api_pods = {line.split()[0] for line in pod_snapshot.read_text().splitlines() if line.startswith("api-") and "Running" in line} + else: + api_pods = set() + block = set() + for line in lines + ["UTC END"]: + if line.startswith("UTC "): + if block: + api_pods = block + block = set() + elif line.startswith("api-"): + block.add(line.split()[0]) + peaks = dict(api_cpu_m=0, postgres_cpu_m=0, valkey_cpu_m=0, load_cpu_m=0, api_memory_mib=0, postgres_memory_mib=0, pg_active=0, pg_idle_transaction=0, pg_lock_waiters=0) + sample = dict.fromkeys(peaks, 0) + for line in lines + ["UTC END"]: + if line.startswith("UTC "): + for key in peaks: + peaks[key] = max(peaks[key], sample[key]) + sample = dict.fromkeys(peaks, 0) + continue + fields = line.split() + if len(fields) == 3 and fields[0].startswith(("api-", "postgres-", "valkey-", "load-")): + role = fields[0].split("-")[0] + if role == "api" and fields[0] not in api_pods: + continue + if role == "load" and not fields[0].startswith("load-" + run + "-"): + continue + cpu = float(fields[1][:-1]) if fields[1].endswith("m") else float(fields[1]) * 1000 + memory = float(fields[2][:-2]) * (1024 if fields[2].endswith("Gi") else 1) + sample[role + "_cpu_m"] += cpu + if role in ("api", "postgres"): + sample[role + "_memory_mib"] += memory + if line.startswith("active|"): + sample["pg_active"] += int(line.split("|")[-1]) + if line.startswith("idle in transaction|"): + sample["pg_idle_transaction"] += int(line.split("|")[-1]) + if "|Lock|" in line: + sample["pg_lock_waiters"] += int(line.split("|")[-1]) + return peaks + +rows = [] + +excluded = [] +for root in roots: + for profile in csv.DictReader((root / "profiles.csv").open()): + deployment = root / ("deployment-" + profile["run"] + ".json") + if deployment.exists() and json.loads(deployment.read_text())["spec"]["replicas"] != int(profile["replicas"]): + excluded.append(str(deployment) + " (replica mismatch)") + continue + source = root / ("load-" + profile["run"] + ".json") + if not source.exists(): + excluded.append(str(source)) + continue + result = json.loads(source.read_text()) + metrics = result["summary"]["metrics"] + if "message_latency_ms" not in metrics: + excluded.append(str(source)) + continue + def value(name, key="count"): + """value reads a measured metric, using zero for an absent error counter.""" + return metrics.get(name, {}).get("values", {}).get(key, 0) + latency = metrics["message_latency_ms"]["values"] + seconds = int(profile["duration"]) + operations = value("measured_operations") + rows.append(dict(profile, source=str(root), confirmed=value("confirmed_messages"), + rps=value("confirmed_messages") / seconds, + errors=value("application_errors"), + error_percent=100 * value("application_errors") / max(operations, 1), + p50_ms=latency["p(50)"], p95_ms=latency["p(95)"], + p99_ms=latency["p(99)"], + rejected_429=value("application_errors{status:429}"), + unavailable_503=value("application_errors{status:503}"), + network_errors=value("application_errors{status:0}"), **resource_peaks(root, profile["run"]))) +output = roots[0] +with (output / "summary.csv").open("w") as stream: + writer = csv.DictWriter(stream, fieldnames=list(rows[0])) + writer.writeheader() + writer.writerows(rows) +(output / "excluded.json").write_text(json.dumps(excluded, indent=2)+"\n") +fig, axes = plt.subplots(3, 1, figsize=(13, 11), constrained_layout=True) +names = [row["profile"] for row in rows] +for axis, field, label in zip(axes, ["rps", "p95_ms", "error_percent"], + ["Confirmed messages / second", "Write attempt p95, ms", "Failed operations, %"]): + axis.bar(names, [row[field] for row in rows], color="#267c75") + axis.set_ylabel(label) + axis.grid(axis="y", alpha=0.25) + axis.tick_params(axis="x", rotation=35) +fig.suptitle("Lab 3: measured replica budgets and pool-size experiment") +fig.savefig(output / "results.png", dpi=160) +fig.savefig(output / "results.svg") +plt.close(fig) +by_name = {row["profile"]: row for row in rows} +if all(f"{series}{n}" in by_name for series in ["fixed", "growing"] for n in [1, 2, 4]): + fig, axes = plt.subplots(1, 2, figsize=(11, 4), constrained_layout=True) + for series, label in [("fixed", "Fixed total CPU/RAM"), ("growing", "Growing total CPU/RAM")]: + for axis, field, ylabel in zip(axes, ["rps", "error_percent"], ["Confirmed messages / second", "Failed operations, %"]): + axis.plot([1, 2, 4], [by_name[f"{series}{n}"][field] for n in [1, 2, 4]], marker="o", label=label) + axis.set(xlabel="API replicas", ylabel=ylabel, xticks=[1, 2, 4]) + axis.grid(alpha=0.25) + axis.legend() + fig.savefig(output / "matrix.png", dpi=160) + fig.savefig(output / "matrix.svg") +print(json.dumps(rows, indent=2)) diff --git a/scripts/run-load.sh b/scripts/run-load.sh index 4ed3caaf..e494750f 100755 --- a/scripts/run-load.sh +++ b/scripts/run-load.sh @@ -5,17 +5,32 @@ cd "$(dirname "$0")/.." : "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" : "${RUN:=manual-$(date -u +%Y%m%d%H%M%S)}" "${DURATION:=30}" "${VUS:=32}" "${LOAD_SCRIPT:=scaling.js}" case "$RUN" in *[!a-z0-9-]*|'') echo 'RUN must be a DNS label' >&2; exit 2 ;; esac -mkdir -p evidence +EVIDENCE_DIR=${EVIDENCE_DIR:-evidence} +mkdir -p "$EVIDENCE_DIR" +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get deployment api -o json > "$EVIDENCE_DIR/deployment-$RUN.json" +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pods -l app=api -o wide > "$EVIDENCE_DIR/pods-$RUN.txt" +helm get values lab2 --kube-context "$KUBE_CONTEXT" -n "$NAMESPACE" -o json > "$EVIDENCE_DIR/values-$RUN.json" +if jq -e '.autoscaling.enabled == false' "$EVIDENCE_DIR/values-$RUN.json" >/dev/null; then + expected=$(jq -r .api.replicas "$EVIDENCE_DIR/values-$RUN.json") + actual=$(jq -r .spec.replicas "$EVIDENCE_DIR/deployment-$RUN.json") + test "$expected" = "$actual" || { echo "Replica mismatch: expected $expected, actual $actual" >&2; exit 1; } +fi manifest=$(mktemp) +complete=false +created=false sampler= cleanup() { if [ -n "$sampler" ]; then kill "$sampler" 2>/dev/null || true; wait "$sampler" 2>/dev/null || true; fi + if ! $complete && $created; then + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" delete "job/load-$RUN" --ignore-not-found --wait=true --timeout=60s >/dev/null || true + fi rm -f "$manifest" } trap cleanup EXIT kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" create configmap load-scripts --from-file=student-tests/load/ --dry-run=client -o yaml | kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" apply -f - -helm template lab2 charts/messenger -n "$NAMESPACE" -s templates/load.yaml --set load.enabled=true --set-string "load.run=$RUN" --set-string "load.script=$LOAD_SCRIPT" --set "load.duration=$DURATION" --set "load.vus=$VUS" > "$manifest" +helm template lab2 charts/messenger -n "$NAMESPACE" -s templates/load.yaml --set load.enabled=true --set-string "load.run=$RUN" --set-string "load.script=$LOAD_SCRIPT" --set "load.duration=$DURATION" --set "load.vus=$VUS" --set-string "load.target=${TARGET_INSTANCE_ID:-}" > "$manifest" kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" apply -f "$manifest" +created=true ( while :; do date -u '+UTC %Y-%m-%dT%H:%M:%SZ' @@ -23,18 +38,21 @@ kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" apply -f "$manifest" kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" exec postgres-0 -- psql -U messenger -d messenger -Atc "SELECT state,wait_event_type,wait_event,count(*) FROM pg_stat_activity WHERE datname='messenger' GROUP BY state,wait_event_type,wait_event" || true sleep 5 done -) > "evidence/resources-$RUN.txt" 2>&1 & +) > "$EVIDENCE_DIR/resources-$RUN.txt" 2>&1 & sampler=$! complete=false for attempt in $(seq 1 140); do - state=$(kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get "job/load-$RUN" -o json) + if ! state=$(kubectl --context "$KUBE_CONTEXT" --request-timeout=10s -n "$NAMESPACE" get "job/load-$RUN" -o json); then + sleep 2 + continue + fi if printf '%s' "$state" | jq -e '.status.succeeded > 0' >/dev/null; then complete=true; break; fi if printf '%s' "$state" | jq -e '.status.failed > 0' >/dev/null; then break; fi sleep 2 done -kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" logs "job/load-$RUN" > "evidence/load-$RUN.txt" -$complete || { echo "Load failed; inspect evidence/load-$RUN.txt" >&2; exit 1; } +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" logs "job/load-$RUN" > "$EVIDENCE_DIR/load-$RUN.txt" +$complete || { echo "Load failed; inspect $EVIDENCE_DIR/load-$RUN.txt" >&2; exit 1; } if [ "$LOAD_SCRIPT" = scaling.js ]; then - jq -R 'fromjson? | select(has("profile"))' "evidence/load-$RUN.txt" > "evidence/load-$RUN.json" - test -s "evidence/load-$RUN.json" + jq -R 'fromjson? | select(has("profile"))' "$EVIDENCE_DIR/load-$RUN.txt" > "$EVIDENCE_DIR/load-$RUN.json" + test -s "$EVIDENCE_DIR/load-$RUN.json" fi diff --git a/scripts/sample-admission.sh b/scripts/sample-admission.sh new file mode 100755 index 00000000..458837f3 --- /dev/null +++ b/scripts/sample-admission.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu +trap 'exit 0' TERM INT +for sample in $(seq 1 180); do + date -u '+UTC %Y-%m-%dT%H:%M:%SZ' + kubectl --context dev --request-timeout=10s -n highload-applications exec valkey-0 -- valkey-cli EVAL "local t=redis.call('TIME'); local n=t[1]*1000+math.floor(t[2]/1000); return {redis.call('ZCOUNT',KEYS[1],n,'+inf'),redis.call('GET',KEYS[2]) or '0'}" 2 admission:global:slots admission:global:rate || true + sleep 5 +done diff --git a/scripts/summarize-failover.rb b/scripts/summarize-failover.rb new file mode 100644 index 00000000..4e97b024 --- /dev/null +++ b/scripts/summarize-failover.rb @@ -0,0 +1,21 @@ +#!/usr/bin/env ruby +# Verify recovery relative to the actual kubectl action, using only non-secret workload events. +require 'json' +directory, run = ARGV +result = File.readlines("#{directory}/load-#{run}.txt").map do |line| + match = line.match(/\bmsg=("(?:\\.|[^"])*")/) + next unless match + message = JSON.parse(match[1]) + next unless message.start_with?('{') + JSON.parse(message) +end.compact.find { |item| item['pass'] } +abort 'Missing successful failover report' unless result +stopped = Float(File.read("#{directory}/#{run}-stop-epoch.txt")) +relative_stop = stopped - result.fetch('started_epoch_ms') / 1000.0 +event = result.fetch('events').find { |item| item['seconds'] >= relative_stop && item['instance'] != result['target'] } +abort 'No recovered write' unless event +recovery = event['seconds'] - relative_stop +abort "Recovery exceeded 10 seconds: #{recovery}" unless recovery <= 10 +summary = result.reject { |key, _| key == 'events' }.merge('recovery_seconds' => recovery.round(3), 'confirmed_rps' => (result['confirmed'] - 1) / 25.0) +File.write("#{directory}/#{run}-summary.json", JSON.pretty_generate(summary)+"\n") +puts JSON.generate(summary) diff --git a/scripts/test-both-replicas.sh b/scripts/test-both-replicas.sh new file mode 100755 index 00000000..ccd9efac --- /dev/null +++ b/scripts/test-both-replicas.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# Stop each original pod explicitly and preserve request and Kubernetes evidence. +set -eu +cd "$(dirname "$0")/.." +: "${KUBE_CONTEXT:=dev}" "${NAMESPACE:=highload-applications}" +: "${EVIDENCE_DIR:=evidence/review-20261029}" +mkdir -p "$EVIDENCE_DIR" +if [ "${RESUME_FROM:-1}" = 1 ]; then +kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pods -l app=api -o json | jq ' .items |= map(select(.metadata.deletionTimestamp == null)) ' > "$EVIDENCE_DIR/initial-api.json" +test "$(jq '.items|length' "$EVIDENCE_DIR/initial-api.json")" -eq 2 +jq -r '.items[].metadata.name' "$EVIDENCE_DIR/initial-api.json" > "$EVIDENCE_DIR/targets.txt" +fi +index=0 +while read -r target; do + index=$((index+1)) + [ "$index" -ge "${RESUME_FROM:-1}" ] || continue + run="failover-$index-$(date -u +%Y%m%d%H%M%S)" + TARGET_INSTANCE_ID="$target" RUN="$run" LOAD_SCRIPT=failover.js EVIDENCE_DIR="$EVIDENCE_DIR" scripts/run-load.sh > "$EVIDENCE_DIR/$run-run.txt" 2>&1 & + runner=$! + ready=false + for attempt in $(seq 1 90); do + if kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" logs "job/load-$run" 2>/dev/null | rg -q READY_TO_STOP; then ready=true; break; fi + kill -0 "$runner" 2>/dev/null || break + sleep 1 + done + if ! $ready; then wait "$runner" || true; echo 'Failover setup did not become ready' >&2; exit 1; fi + ruby -e 'puts Time.now.to_f' > "$EVIDENCE_DIR/$run-stop-epoch.txt" + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pod "$target" -o json > "$EVIDENCE_DIR/$run-target.json" + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" delete pod "$target" --wait=false > "$EVIDENCE_DIR/$run-delete.txt" + wait "$runner" + ruby scripts/summarize-failover.rb "$EVIDENCE_DIR" "$run" + kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" rollout status deployment/api --timeout=120s > "$EVIDENCE_DIR/$run-restored.txt" +done < "$EVIDENCE_DIR/targets.txt" diff --git a/student-tests/README.md b/student-tests/README.md index cb58150b..7b120c86 100644 --- a/student-tests/README.md +++ b/student-tests/README.md @@ -5,3 +5,7 @@ Go-тесты рядом с кодом проверяют контракт, ав `load/scaling.js` — одинаковый профиль k6 для сравнения реплик: 16 пользователей/чатов, 32 VU, запись + чтение, каждый десятый повтор возвращает прежний результат. Публикуются реальные success/error/latency metrics; bootstrap не содержит пользовательских данных. `load/idempotency.js` проверяет общий ключ через разные API, ровно одно сообщение и конфликт body. `load/hpa.js` нагружает Argon2id для проверки реальной реакции HPA по CPU. Все пользователи синтетические, токены не выводятся. `make research` сравнивает 1/2/4 реплики при фиксированном суммарном бюджете 1 CPU/512 MiB, затем при фиксированном бюджете одной реплики 250m/128 MiB. Во время измерений HPA выключен. Raw k6 summary и выборки CPU/RAM/PG wait events сохраняются в evidence. После эксперимента обычные Helm values восстанавливаются. + +`scripts/test-both-replicas.sh` фиксирует две исходные реплики, наблюдает обе через Traefik и последовательно удаляет их по имени. Между отказами Deployment восстанавливается. k6 проверяет чтение, подтверждённые записи и отсутствие дублей после неопределённого ответа; Ruby-агрегатор проверяет восстановление за 10 секунд относительно фактического kubectl action. Нужны Ruby 2.6+ и rg. При прерванной обработке отчёта `RESUME_FROM=2` продолжает по сохранённому targets.txt, не выбирая новую пару. + +`scripts/plot-research.py ` строит summary.csv, results.png и results.svg из реальных k6 JSON. Для графиков нужен Python 3 с matplotlib; управление стендом остаётся в shell/Helm. Не сравнивать прогоны с разными workload-настройками без явной оговорки. diff --git a/student-tests/load/failover.js b/student-tests/load/failover.js new file mode 100644 index 00000000..518ae1d3 --- /dev/null +++ b/student-tests/load/failover.js @@ -0,0 +1,61 @@ +import http from 'k6/http'; +import encoding from 'k6/encoding'; +import { sleep } from 'k6'; +export const options = { vus: 1, iterations: 1, setupTimeout: '120s' }; +const base = __ENV.BASE_URL; +const target = __ENV.TARGET_INSTANCE_ID; +export function setup() { + const username = 'fail_' + Date.now(); + const password = 'synthetic-failover-password'; + const user = http.post(base + '/api/v1/users', JSON.stringify({username, password, display_name:'Failover'}), {headers:{'Content-Type':'application/json'}}); + if (user.status !== 201) throw new Error('registration ' + user.status); + const session = http.post(base + '/api/v1/auth/sessions', null, {headers:{Authorization:'Basic ' + encoding.b64encode(username + ':' + password)}}); + if (session.status !== 201) throw new Error('login ' + session.status); + const headers = {Authorization:'Bearer ' + session.json().token, 'Content-Type':'application/json'}; + const chat = http.post(base + '/api/v1/chats', JSON.stringify({title:'Failover',member_ids:[user.json().id]}), {headers}); + if (chat.status !== 201) throw new Error('chat ' + chat.status); + const seen = new Set(); + for (let i=0; i<20; i++) { + const response = http.get(base + '/api/v1/users/me', {headers, timeout:'2s'}); + if (response.status !== 200) throw new Error('initial read ' + response.status); + seen.add(response.headers['X-Instance-Id']); + } + if (seen.size < 2 || !seen.has(target)) throw new Error('target not observed through LB'); + const path = base + '/api/v1/chats/' + chat.json().id + '/messages'; + const original = http.post(path, JSON.stringify({text:'before failure'}), {headers:{...headers,'Idempotency-Key':'before'}}); + if (original.status !== 201) throw new Error('initial message ' + original.status); + return {headers,path,original:original.json()}; +} +export default function(data) { + console.log('READY_TO_STOP ' + target); + const started = Date.now(); + const confirmed = new Set([data.original.id]); + let errors = 0, reads = 0, sequence = 0; + const events = []; + const lastInstances = []; + while (Date.now() - started < 25000) { + const response = http.post(data.path, JSON.stringify({text:'during-' + sequence}), {headers:{...data.headers,'Idempotency-Key':'during-' + sequence},timeout:'2s'}); + if (response.status === 201) { + confirmed.add(response.json().id); sequence++; + events.push({seconds:(Date.now()-started)/1000,instance:response.headers['X-Instance-Id']}); + lastInstances.push(response.headers['X-Instance-Id']); + } else errors++; + const read = http.get(data.path + '?limit=100', {headers:data.headers,timeout:'2s'}); + if (read.status === 200) reads++; else errors++; + sleep(0.1); + } + const items = []; + let path = data.path + '?limit=100'; + while (path) { + const response = http.get(path, {headers:data.headers,timeout:'5s'}); + if (response.status !== 200) throw new Error('final history ' + response.status); + items.push(...response.json().items); + const cursor = response.json().next_cursor; + path = cursor ? data.path + '?limit=100&cursor=' + encodeURIComponent(cursor) : null; + } + const ids = new Set(items.map(item=>item.id)); + if ([...confirmed].some(id=>!ids.has(id))) throw new Error('confirmed message lost'); + if (new Set(items.map(item=>item.text)).size !== items.length) throw new Error('uncertain retry duplicated'); + if (lastInstances.length < 5 || lastInstances.slice(-5).includes(target)) throw new Error('target still serves or insufficient writes'); + console.log(JSON.stringify({target,started_epoch_ms:started,confirmed:confirmed.size,reads,errors,events,pass:true})); +} diff --git a/student-tests/load/scaling.js b/student-tests/load/scaling.js index d0f4bcbf..09ae8678 100644 --- a/student-tests/load/scaling.js +++ b/student-tests/load/scaling.js @@ -1,7 +1,7 @@ import http from 'k6/http'; import encoding from 'k6/encoding'; import execution from 'k6/execution'; -import { check } from 'k6'; +import { check, sleep } from 'k6'; import { Counter, Trend } from 'k6/metrics'; const base = __ENV.BASE_URL || 'https://hl.agapov.space'; @@ -10,13 +10,16 @@ const users = Number(__ENV.USERS || 16); const writes = new Counter('confirmed_messages'); const attempts = new Counter('attempted_messages'); const failures = new Counter('application_errors'); +const operations = new Counter('measured_operations'); +const failedWrites = new Counter('failed_writes'); const latency = new Trend('message_latency_ms', true); export const options = { scenarios: { - warmup: { executor: 'constant-vus', vus: 4, duration: '5s' }, - measured: { executor: 'constant-vus', vus: Number(__ENV.VUS || 32), duration: `${seconds}s`, startTime: '5s' }, + warmup: { executor: 'constant-vus', vus: 4, duration: '5s', gracefulStop: '0s' }, + measured: { executor: 'constant-vus', vus: Number(__ENV.VUS || 32), duration: `${seconds}s`, startTime: '10s', gracefulStop: '0s' }, }, - setupTimeout: '120s', + setupTimeout: '180s', + thresholds: { 'application_errors{status:429}': ['count>=0'], 'application_errors{status:503}': ['count>=0'], 'application_errors{status:0}': ['count>=0'] }, summaryTrendStats: ['avg', 'p(50)', 'p(95)', 'p(99)', 'max'], }; @@ -24,17 +27,27 @@ export function setup() { const actors = []; const prefix = `bench_${Date.now()}`; for (let i = 0; i < users; i++) { - const username = `${prefix}_${i}`; + let prepared = false; + for (let attempt = 0; attempt < 5; attempt++) { + for (let ready = 0; ready < 30; ready++) { + if (http.get(base + '/health/ready', {timeout:'3s', tags:{phase:'setup'}}).status === 200) break; + sleep(1); + } + const username = `${prefix}_${i}_${attempt}`; const password = 'synthetic-benchmark-password'; let response = http.post(`${base}/api/v1/users`, JSON.stringify({ username, display_name: 'Synthetic', password }), { headers: { 'Content-Type': 'application/json' }, tags: { phase: 'setup' } }); - if (response.status !== 201) throw new Error(`registration: ${response.status}`); + if (response.status !== 201) { console.warn(`setup registration: ${response.status}; abandoning synthetic actor`); sleep(1); continue; } const user = response.json(); response = http.post(`${base}/api/v1/auth/sessions`, null, { headers: { Authorization: `Basic ${encoding.b64encode(`${username}:${password}`)}` }, tags: { phase: 'setup' } }); - if (response.status !== 201) throw new Error(`login: ${response.status}`); + if (response.status !== 201) { console.warn(`setup login: ${response.status}; abandoning synthetic actor`); sleep(1); continue; } const token = response.json().token; response = http.post(`${base}/api/v1/chats`, JSON.stringify({ title: 'Synthetic benchmark', member_ids: [user.id] }), { headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' }, tags: { phase: 'setup' } }); - if (response.status !== 201) throw new Error(`chat: ${response.status}`); + if (response.status !== 201) { console.warn(`setup chat: ${response.status}; abandoning synthetic actor`); sleep(1); continue; } actors.push({ token, chat: response.json().id }); + prepared = true; + break; + } + if (!prepared) throw new Error("synthetic actor setup exhausted retries"); } return actors; } @@ -46,17 +59,19 @@ export default function (actors) { const path = `${base}/api/v1/chats/${actor.chat}/messages`; const payload = JSON.stringify({ text: `synthetic message ${__VU}:${__ITER}` }); const response = http.post(path, payload, { headers, tags: { phase: 'load' } }); - if (measured) { latency.add(response.timings.duration); attempts.add(1); } + if (measured) { latency.add(response.timings.duration); attempts.add(1); operations.add(1); } if (check(response, { 'message confirmed': r => r.status === 201 })) { if (measured) writes.add(1); } - else if (measured) failures.add(1, { status: String(response.status) }); + else if (measured) { failures.add(1, { status: String(response.status) }); failedWrites.add(1); } if (response.status === 201 && __ITER % 10 === 0) { + if (measured) operations.add(1); const repeated = http.post(path, payload, { headers, tags: { phase: 'load' } }); if (!check(repeated, { 'retry returns original': r => r.status === 201 && r.json().id === response.json().id })) { if (measured) failures.add(1, { status: String(repeated.status) }); } } + if (measured) operations.add(1); const read = http.get(`${path}?limit=10`, { headers, tags: { phase: 'load' } }); if (!check(read, { 'history readable': r => r.status === 200 })) { if (measured) failures.add(1, { status: String(read.status) }); } } export function handleSummary(data) { - return { stdout: JSON.stringify({ profile: { vus: Number(__ENV.VUS || 32), seconds, warmup_seconds: 5, users }, summary: data }) + '\n' }; + return { stdout: JSON.stringify({ profile: { vus: Number(__ENV.VUS || 32), seconds, warmup_seconds: 5, drain_seconds: 5, users }, summary: data }) + '\n' }; } -- 2.54.0