From 89a42cb7bbe601a99ba12d44ec68897adf9c4e68 Mon Sep 17 00:00:00 2001 From: andrejkamenskij Date: Fri, 6 Nov 2026 18:54:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + Dockerfile | 24 + Makefile | 105 +- alembic.ini | 3 + compose.env.example | 31 + compose.yaml | 117 + evidence/lab3-500-headers.txt | 49 + evidence/lab3-audit-before.json | 5 + evidence/lab3-audit-changing-ips.json | 32 + evidence/lab3-audit-contract.json | 22 + evidence/lab3-audit-first-run.txt | 30 + evidence/lab3-audit-frozen-stores.json | 43 + evidence/lab3-audit-limits-evidence.json | 52 + evidence/lab3-audit-readiness.json | 275 +++ evidence/lab3-audit-run.txt | 30 + evidence/lab3-audit-summary-all.json | 7 + evidence/lab3-cache-edge-before.json | 9 + evidence/lab3-clean-start.json | 8 + evidence/lab3-clean-start.txt | 8 + evidence/lab3-control/method.json | 81 + evidence/lab3-control/results.json | 280 +++ evidence/lab3-control/run-01.json | 138 ++ evidence/lab3-control/run-02.json | 140 ++ evidence/lab3-control/summary.csv | 3 + evidence/lab3-db-idempotency.txt | 1 + evidence/lab3-edge-audit.json | 18 + evidence/lab3-edge-audit.txt | 18 + evidence/lab3-extra-audit-before.json | 6 + evidence/lab3-extra.txt | 1 + evidence/lab3-failures.json | 182 ++ evidence/lab3-final-callbacks.txt | 5 + evidence/lab3-final-checks.txt | 12 + evidence/lab3-final-database.txt | 13 + evidence/lab3-final-dependencies.txt | 25 + evidence/lab3-final-error_headers.txt | 49 + evidence/lab3-final-idempotency_db.txt | 1 + evidence/lab3-final-lab3.txt | 10 + evidence/lab3-final-passwords.txt | 2 + evidence/lab3-final-readiness.txt | 1 + evidence/lab3-final-regressions.txt | 5 + evidence/lab3-final-settings.txt | 3 + evidence/lab3-final-smoke.txt | 1 + evidence/lab3-idempotency.json | 10 + evidence/lab3-infrastructure.json | 151 ++ evidence/lab3-lab3.txt | 10 + evidence/lab3-original-research-run.txt | 812 ++++++ evidence/lab3-persistence.txt | 2 + evidence/lab3-production.txt | 6 + evidence/lab3-public-artifacts.json | 7 + evidence/lab3-public-failover.txt | 3 + evidence/lab3-quality.txt | 8 + evidence/lab3-readiness-budget.txt | 1 + evidence/lab3-regressions.txt | 5 + evidence/lab3-research-plots.txt | 1 + evidence/lab3-research-run.txt | 145 ++ evidence/lab3-research/README.md | 1 + evidence/lab3-research/bottleneck.png | Bin 0 -> 67191 bytes evidence/lab3-research/bottleneck.svg | 1707 +++++++++++++ evidence/lab3-research/method.json | 22 + evidence/lab3-research/results.json | 2402 ++++++++++++++++++ evidence/lab3-research/run-01.json | 140 ++ evidence/lab3-research/run-02.json | 121 + evidence/lab3-research/run-03.json | 128 + evidence/lab3-research/run-04.json | 121 + evidence/lab3-research/run-05.json | 128 + evidence/lab3-research/run-06.json | 142 ++ evidence/lab3-research/run-07.json | 140 ++ evidence/lab3-research/run-08.json | 128 + evidence/lab3-research/run-09.json | 128 + evidence/lab3-research/run-10.json | 117 + evidence/lab3-research/run-11.json | 121 + evidence/lab3-research/run-12.json | 140 ++ evidence/lab3-research/run-13.json | 142 ++ evidence/lab3-research/run-14.json | 142 ++ evidence/lab3-research/run-15.json | 140 ++ evidence/lab3-research/run-16.json | 140 ++ evidence/lab3-research/run-17.json | 142 ++ evidence/lab3-research/run-18.json | 140 ++ evidence/lab3-research/scaling.png | Bin 0 -> 115169 bytes evidence/lab3-research/scaling.svg | 2578 ++++++++++++++++++++ evidence/lab3-research/summary.csv | 19 + evidence/lab3-restart-proof.json | 18 + evidence/lab3-review-summary.json | 9 + evidence/lab3-review.txt | 15 + evidence/lab3-rolling-load.json | 192 ++ evidence/lab3-rolling.txt | 37 + evidence/lab3-smoke.txt | 1 + evidence/lab3-transfer-edge-checks.txt | 18 + evidence/lab3-transfer-failover.txt | 3 + evidence/lab3-transfer-final-smoke.txt | 1 + evidence/lab3-transfer-migrations.txt | 1 + evidence/lab3-transfer-persistence.txt | 2 + evidence/lab3-transfer-quality.txt | 8 + evidence/lab3-transfer-runtime.json | 22 + evidence/lab3-transfer-runtime.txt | 11 + evidence/lab3-transfer-tests.txt | 13 + evidence/lab3-unicode-migration.json | 23 + evidence/lab3-unicode-names-migration.json | 23 + evidence/lab3-verify.txt | 21 + examples/requests.http | 8 +- infra/haproxy.cfg | 43 + lab.json | 2 +- migrations/env.py | 34 + migrations/script.py.mako | 17 + migrations/versions/001_initial.py | 60 + migrations/versions/002_redis_sessions.py | 22 + migrations/versions/003_admin.py | 16 + migrations/versions/004_idempotency.py | 25 + migrations/versions/005_message_unicode.py | 55 + migrations/versions/006_unicode_names.py | 40 + pyproject.toml | 7 + requirements-dev.txt | 6 +- requirements.txt | 19 + scripts/audit-dependencies.py | 61 + scripts/audit-lab3.py | 550 +++++ scripts/benchmark.py | 167 ++ scripts/check-transfer.py | 73 + scripts/edge-audit-lab3.py | 344 +++ scripts/final-checks-lab3.py | 76 + scripts/haproxy.py | 61 + scripts/plot-lab3.py | 100 + scripts/replicas.py | 60 + scripts/research-lab3.py | 294 +++ scripts/restart.sh | 6 + scripts/review-lab3.py | 42 + scripts/rolling-update.py | 43 + scripts/runtime_config.py | 30 + scripts/stop-one.py | 34 + scripts/stop-one.sh | 4 + scripts/test-clean-lab3.py | 65 + scripts/test-expiry.sh | 8 + scripts/test-persistence.py | 69 + scripts/verify-lab3.py | 135 + src/__init__.py | 0 src/__main__.py | 13 + src/api/__init__.py | 0 src/api/dependencies.py | 106 + src/api/router.py | 14 + src/api/v1/__init__.py | 0 src/api/v1/routers/__init__.py | 0 src/api/v1/routers/auth/__init__.py | 0 src/api/v1/routers/auth/callback.py | 31 + src/api/v1/routers/auth/router.py | 50 + src/api/v1/routers/auth/schemas.py | 13 + src/api/v1/routers/chats/__init__.py | 0 src/api/v1/routers/chats/router.py | 86 + src/api/v1/routers/chats/schemas.py | 42 + src/api/v1/routers/messages/__init__.py | 0 src/api/v1/routers/messages/router.py | 94 + src/api/v1/routers/messages/schemas.py | 36 + src/api/v1/routers/users/__init__.py | 0 src/api/v1/routers/users/router.py | 44 + src/api/v1/routers/users/schemas.py | 29 + src/api/v1/schemas.py | 21 + src/core/__init__.py | 0 src/core/cache.py | 68 + src/core/callback.py | 24 + src/core/db/__init__.py | 0 src/core/db/models.py | 90 + src/core/db/repo/__init__.py | 0 src/core/db/repo/auth.py | 16 + src/core/db/repo/chat.py | 59 + src/core/db/repo/message.py | 106 + src/core/db/repo/user.py | 120 + src/core/db/session.py | 48 + src/core/db/types.py | 15 + src/core/errors.py | 29 + src/core/pagination.py | 43 + src/core/readiness.py | 59 + src/core/request_limits.py | 122 + src/core/security.py | 42 + src/core/session_store.py | 55 + src/core/settings.py | 95 + src/main.py | 114 + src/service/__init__.py | 0 src/service/auth.py | 74 + src/service/chat.py | 61 + src/service/dto.py | 49 + src/service/exceptions.py | 30 + src/service/message.py | 62 + src/service/user.py | 63 + tests/auth_logging.py | 36 + tests/callbacks.py | 107 + tests/database.py | 87 + tests/dependencies.py | 160 ++ tests/error_headers.py | 53 + tests/expiry.py | 17 + tests/extra.py | 111 + tests/idempotency_db.py | 79 + tests/lab3.py | 116 + tests/passwords.py | 68 + tests/production.py | 187 ++ tests/production_limits.py | 137 ++ tests/readiness.py | 53 + tests/regressions.py | 163 ++ tests/settings.py | 53 + 196 files changed, 18570 insertions(+), 11 deletions(-) create mode 100644 Dockerfile create mode 100644 alembic.ini create mode 100644 compose.env.example create mode 100644 compose.yaml create mode 100644 evidence/lab3-500-headers.txt create mode 100644 evidence/lab3-audit-before.json create mode 100644 evidence/lab3-audit-changing-ips.json create mode 100644 evidence/lab3-audit-contract.json create mode 100644 evidence/lab3-audit-first-run.txt create mode 100644 evidence/lab3-audit-frozen-stores.json create mode 100644 evidence/lab3-audit-limits-evidence.json create mode 100644 evidence/lab3-audit-readiness.json create mode 100644 evidence/lab3-audit-run.txt create mode 100644 evidence/lab3-audit-summary-all.json create mode 100644 evidence/lab3-cache-edge-before.json create mode 100644 evidence/lab3-clean-start.json create mode 100644 evidence/lab3-clean-start.txt create mode 100644 evidence/lab3-control/method.json create mode 100644 evidence/lab3-control/results.json create mode 100644 evidence/lab3-control/run-01.json create mode 100644 evidence/lab3-control/run-02.json create mode 100644 evidence/lab3-control/summary.csv create mode 100644 evidence/lab3-db-idempotency.txt create mode 100644 evidence/lab3-edge-audit.json create mode 100644 evidence/lab3-edge-audit.txt create mode 100644 evidence/lab3-extra-audit-before.json create mode 100644 evidence/lab3-extra.txt create mode 100644 evidence/lab3-failures.json create mode 100644 evidence/lab3-final-callbacks.txt create mode 100644 evidence/lab3-final-checks.txt create mode 100644 evidence/lab3-final-database.txt create mode 100644 evidence/lab3-final-dependencies.txt create mode 100644 evidence/lab3-final-error_headers.txt create mode 100644 evidence/lab3-final-idempotency_db.txt create mode 100644 evidence/lab3-final-lab3.txt create mode 100644 evidence/lab3-final-passwords.txt create mode 100644 evidence/lab3-final-readiness.txt create mode 100644 evidence/lab3-final-regressions.txt create mode 100644 evidence/lab3-final-settings.txt create mode 100644 evidence/lab3-final-smoke.txt create mode 100644 evidence/lab3-idempotency.json create mode 100644 evidence/lab3-infrastructure.json create mode 100644 evidence/lab3-lab3.txt create mode 100644 evidence/lab3-original-research-run.txt create mode 100644 evidence/lab3-persistence.txt create mode 100644 evidence/lab3-production.txt create mode 100644 evidence/lab3-public-artifacts.json create mode 100644 evidence/lab3-public-failover.txt create mode 100644 evidence/lab3-quality.txt create mode 100644 evidence/lab3-readiness-budget.txt create mode 100644 evidence/lab3-regressions.txt create mode 100644 evidence/lab3-research-plots.txt create mode 100644 evidence/lab3-research-run.txt create mode 100644 evidence/lab3-research/README.md create mode 100644 evidence/lab3-research/bottleneck.png create mode 100644 evidence/lab3-research/bottleneck.svg create mode 100644 evidence/lab3-research/method.json create mode 100644 evidence/lab3-research/results.json create mode 100644 evidence/lab3-research/run-01.json create mode 100644 evidence/lab3-research/run-02.json create mode 100644 evidence/lab3-research/run-03.json create mode 100644 evidence/lab3-research/run-04.json create mode 100644 evidence/lab3-research/run-05.json create mode 100644 evidence/lab3-research/run-06.json create mode 100644 evidence/lab3-research/run-07.json create mode 100644 evidence/lab3-research/run-08.json create mode 100644 evidence/lab3-research/run-09.json create mode 100644 evidence/lab3-research/run-10.json create mode 100644 evidence/lab3-research/run-11.json create mode 100644 evidence/lab3-research/run-12.json create mode 100644 evidence/lab3-research/run-13.json create mode 100644 evidence/lab3-research/run-14.json create mode 100644 evidence/lab3-research/run-15.json create mode 100644 evidence/lab3-research/run-16.json create mode 100644 evidence/lab3-research/run-17.json create mode 100644 evidence/lab3-research/run-18.json create mode 100644 evidence/lab3-research/scaling.png create mode 100644 evidence/lab3-research/scaling.svg create mode 100644 evidence/lab3-research/summary.csv create mode 100644 evidence/lab3-restart-proof.json create mode 100644 evidence/lab3-review-summary.json create mode 100644 evidence/lab3-review.txt create mode 100644 evidence/lab3-rolling-load.json create mode 100644 evidence/lab3-rolling.txt create mode 100644 evidence/lab3-smoke.txt create mode 100644 evidence/lab3-transfer-edge-checks.txt create mode 100644 evidence/lab3-transfer-failover.txt create mode 100644 evidence/lab3-transfer-final-smoke.txt create mode 100644 evidence/lab3-transfer-migrations.txt create mode 100644 evidence/lab3-transfer-persistence.txt create mode 100644 evidence/lab3-transfer-quality.txt create mode 100644 evidence/lab3-transfer-runtime.json create mode 100644 evidence/lab3-transfer-runtime.txt create mode 100644 evidence/lab3-transfer-tests.txt create mode 100644 evidence/lab3-unicode-migration.json create mode 100644 evidence/lab3-unicode-names-migration.json create mode 100644 evidence/lab3-verify.txt create mode 100644 infra/haproxy.cfg create mode 100644 migrations/env.py create mode 100644 migrations/script.py.mako create mode 100644 migrations/versions/001_initial.py create mode 100644 migrations/versions/002_redis_sessions.py create mode 100644 migrations/versions/003_admin.py create mode 100644 migrations/versions/004_idempotency.py create mode 100644 migrations/versions/005_message_unicode.py create mode 100644 migrations/versions/006_unicode_names.py create mode 100644 pyproject.toml create mode 100644 requirements.txt create mode 100644 scripts/audit-dependencies.py create mode 100644 scripts/audit-lab3.py create mode 100644 scripts/benchmark.py create mode 100644 scripts/check-transfer.py create mode 100644 scripts/edge-audit-lab3.py create mode 100644 scripts/final-checks-lab3.py create mode 100644 scripts/haproxy.py create mode 100644 scripts/plot-lab3.py create mode 100644 scripts/replicas.py create mode 100644 scripts/research-lab3.py create mode 100755 scripts/restart.sh create mode 100644 scripts/review-lab3.py create mode 100644 scripts/rolling-update.py create mode 100644 scripts/runtime_config.py create mode 100644 scripts/stop-one.py create mode 100755 scripts/stop-one.sh create mode 100644 scripts/test-clean-lab3.py create mode 100755 scripts/test-expiry.sh create mode 100644 scripts/test-persistence.py create mode 100644 scripts/verify-lab3.py create mode 100644 src/__init__.py create mode 100644 src/__main__.py create mode 100644 src/api/__init__.py create mode 100644 src/api/dependencies.py create mode 100644 src/api/router.py create mode 100644 src/api/v1/__init__.py create mode 100644 src/api/v1/routers/__init__.py create mode 100644 src/api/v1/routers/auth/__init__.py create mode 100644 src/api/v1/routers/auth/callback.py create mode 100644 src/api/v1/routers/auth/router.py create mode 100644 src/api/v1/routers/auth/schemas.py create mode 100644 src/api/v1/routers/chats/__init__.py create mode 100644 src/api/v1/routers/chats/router.py create mode 100644 src/api/v1/routers/chats/schemas.py create mode 100644 src/api/v1/routers/messages/__init__.py create mode 100644 src/api/v1/routers/messages/router.py create mode 100644 src/api/v1/routers/messages/schemas.py create mode 100644 src/api/v1/routers/users/__init__.py create mode 100644 src/api/v1/routers/users/router.py create mode 100644 src/api/v1/routers/users/schemas.py create mode 100644 src/api/v1/schemas.py create mode 100644 src/core/__init__.py create mode 100644 src/core/cache.py create mode 100644 src/core/callback.py create mode 100644 src/core/db/__init__.py create mode 100644 src/core/db/models.py create mode 100644 src/core/db/repo/__init__.py create mode 100644 src/core/db/repo/auth.py create mode 100644 src/core/db/repo/chat.py create mode 100644 src/core/db/repo/message.py create mode 100644 src/core/db/repo/user.py create mode 100644 src/core/db/session.py create mode 100644 src/core/db/types.py create mode 100644 src/core/errors.py create mode 100644 src/core/pagination.py create mode 100644 src/core/readiness.py create mode 100644 src/core/request_limits.py create mode 100644 src/core/security.py create mode 100644 src/core/session_store.py create mode 100644 src/core/settings.py create mode 100644 src/main.py create mode 100644 src/service/__init__.py create mode 100644 src/service/auth.py create mode 100644 src/service/chat.py create mode 100644 src/service/dto.py create mode 100644 src/service/exceptions.py create mode 100644 src/service/message.py create mode 100644 src/service/user.py create mode 100644 tests/auth_logging.py create mode 100644 tests/callbacks.py create mode 100644 tests/database.py create mode 100644 tests/dependencies.py create mode 100644 tests/error_headers.py create mode 100644 tests/expiry.py create mode 100644 tests/extra.py create mode 100644 tests/idempotency_db.py create mode 100644 tests/lab3.py create mode 100644 tests/passwords.py create mode 100644 tests/production.py create mode 100644 tests/production_limits.py create mode 100644 tests/readiness.py create mode 100644 tests/regressions.py create mode 100644 tests/settings.py diff --git a/.gitignore b/.gitignore index b5a71896..a085fb7a 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ coverage/ .vscode/ # Keep small, sanitized evidence summaries in evidence/ under version control. # Inspect git diff --cached: ignore rules are not a secret scanner. + +.ruff_cache/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..3146321d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM python:3.13.0-slim-bookworm + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt \ + && python -m pip uninstall --yes pip \ + && addgroup --system app \ + && adduser --system --ingroup app app + +COPY --chown=app:app src ./src +COPY --chown=app:app migrations ./migrations +COPY --chown=app:app alembic.ini ./alembic.ini + +USER app +EXPOSE 8080 + +HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \ + CMD python -c "import urllib.request; from src.core.settings import settings; urllib.request.urlopen(f'http://127.0.0.1:{settings.app_port}/health/ready', timeout=settings.healthcheck_timeout_seconds)" + +CMD ["python", "-m", "src"] diff --git a/Makefile b/Makefile index 5d86d171..ba293d25 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,17 @@ PYTHON ?= python3 -BASE_URL ?= http://localhost:8080 +ifndef BASE_URL +BASE_URL := $(shell $(PYTHON) scripts/runtime_config.py) +endif +export BASE_URL CA_FILE ?= +API_CONTAINER = $(shell docker compose ps -q api | head -n 1) 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 "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; test-lab3: concurrency; verify-lab3: full acceptance; research-lab3: scaling study; load: synthetic writes" check: $(PYTHON) scripts/check_contract.py @@ -25,6 +29,99 @@ 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) +.PHONY: test-persistence-proof +test-persistence-proof: + $(PYTHON) scripts/test-persistence.py --action-script "scripts/restart.sh" --base-url "$(BASE_URL)" $(TLS_ARGS) + +.PHONY: up down migrate test-extra +up: + docker compose up -d --build --wait + +down: + docker compose down + +migrate: + docker compose run --rm migration + +test-extra: + $(PYTHON) tests/extra.py --base-url "$(BASE_URL)" $(TLS_ARGS) + +.PHONY: test-regressions +test-regressions: + $(PYTHON) tests/regressions.py --base-url "$(BASE_URL)" $(TLS_ARGS) + +.PHONY: test-production test-production-limits audit-dependencies +test-production: + $(PYTHON) tests/production.py --base-url "$(BASE_URL)" $(TLS_ARGS) + +test-production-limits: + docker exec -i "$(API_CONTAINER)" python < tests/production_limits.py + +audit-dependencies: + $(PYTHON) scripts/audit-dependencies.py $(TLS_ARGS) + +.PHONY: test-db test-expiry test-dependencies +test-db: + docker exec -i "$(API_CONTAINER)" python < tests/database.py + +test-expiry: + PYTHON="$(PYTHON)" scripts/test-expiry.sh + +test-dependencies: + $(PYTHON) tests/dependencies.py --base-url "$(BASE_URL)" $(TLS_ARGS) + +.PHONY: test-passwords +test-passwords: + docker exec -i "$(API_CONTAINER)" python < tests/passwords.py + +.PHONY: lint format +lint: + $(PYTHON) -m ruff check src + $(PYTHON) -m ruff format --check src + +format: + $(PYTHON) -m ruff check --fix src + $(PYTHON) -m ruff format src + +.PHONY: test-auth-logs +test-auth-logs: + $(PYTHON) tests/auth_logging.py --base-url "$(BASE_URL)" $(TLS_ARGS) + +.PHONY: test-settings +test-settings: + docker exec -i "$(API_CONTAINER)" python < tests/settings.py + +.PHONY: test-callbacks +test-callbacks: + docker exec -i "$(API_CONTAINER)" python < tests/callbacks.py + +.PHONY: test-failover test-lab3 rolling-update test-failover: - @test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2) + @test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT=scripts/stop-one.sh"; exit 2) $(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS) + +test-lab3: + $(PYTHON) tests/lab3.py --base-url "$(BASE_URL)" + +rolling-update: + $(PYTHON) scripts/rolling-update.py + +.PHONY: verify-lab3 research-lab3 +verify-lab3: + $(PYTHON) scripts/verify-lab3.py + +research-lab3: + $(PYTHON) scripts/research-lab3.py --full + $(PYTHON) scripts/plot-lab3.py + +.PHONY: audit-lab3 +audit-lab3: + $(PYTHON) scripts/audit-lab3.py + +.PHONY: audit-edges-lab3 +audit-edges-lab3: + $(PYTHON) scripts/edge-audit-lab3.py + +.PHONY: review-lab3 +review-lab3: + $(PYTHON) scripts/review-lab3.py diff --git a/alembic.ini b/alembic.ini new file mode 100644 index 00000000..d3b7004f --- /dev/null +++ b/alembic.ini @@ -0,0 +1,3 @@ +[alembic] +script_location = %(here)s/migrations +prepend_sys_path = . diff --git a/compose.env.example b/compose.env.example new file mode 100644 index 00000000..ed69c080 --- /dev/null +++ b/compose.env.example @@ -0,0 +1,31 @@ +APP_HOST=0.0.0.0 +APP_PORT=8080 +APP_ENV=lab +POSTGRES_DB=messenger +POSTGRES_USER=messenger +# Задай свой локальный пароль перед запуском. Не добавляй .env в Git. +POSTGRES_PASSWORD= +SESSION_TTL_SECONDS=3600 +# REDIS_URL задаётся в compose.yaml; Redis хранит сессии с TTL и кэш профилей на 60 секунд. +LOG_LEVEL=INFO +# DATABASE_URL и REDIS_URL передаёт Compose. При ручном запуске задай их в окружении. +# Остальные параметры и значения по умолчанию: src/core/settings.py (AppSettings). + +# Стартовый администратор; повторный запуск не меняет существующий пароль. +ADMIN_USERNAME=admin +ADMIN_PASSWORD=admin-password-123 +ADMIN_DISPLAY_NAME=Администратор + +# APP_ENV=production запрещает учебный ADMIN_PASSWORD. Пароль существующего +# администратора должен совпадать с настройкой; автоматического сброса нет. +# HTTP_MAX_BODY_BYTES=65536 +# HTTP_BODY_TIMEOUT_SECONDS=5 +# HTTP_CONCURRENCY_LIMIT=64 +# PASSWORD_HASH_CONCURRENCY=2 + +# Lab3: число реплик и лимиты каждой API-реплики. Наружу доступен только LB. +API_REPLICAS=2 +API_CPUS=0.5 +API_MEMORY=256m +DATABASE_POOL_SIZE=10 +POSTGRES_CPUS=1.0 diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000..8fd5e2e9 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,117 @@ +x-logging: &logging + driver: json-file + options: + max-size: "10m" + max-file: "3" + +x-app: &app + build: . + image: mtusi-messenger:lab3 + env_file: ${ENV_FILE:-.env} + logging: *logging + +services: + postgres: + logging: *logging + image: postgres:16.6-bookworm + cpus: ${POSTGRES_CPUS:-1.0} + mem_limit: 512m + environment: + POSTGRES_DB: ${POSTGRES_DB:-messenger} + POSTGRES_USER: ${POSTGRES_USER:-messenger} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Задай POSTGRES_PASSWORD в .env} + volumes: + - postgres_data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] + interval: 2s + timeout: 3s + retries: 30 + + redis: + logging: *logging + image: redis:7.4.2-bookworm + cpus: 0.25 + mem_limit: 128m + command: ["redis-server", "--appendonly", "yes", "--appendfsync", "always", "--maxmemory", "64mb", "--maxmemory-policy", "noeviction"] + volumes: + - redis_data:/data + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 2s + timeout: 3s + retries: 30 + + migration: + <<: *app + command: ["alembic", "upgrade", "head"] + cpus: 0.5 + mem_limit: 256m + environment: + REDIS_URL: &redis_url redis://redis:6379/0 + DATABASE_URL: &database_url postgresql://${POSTGRES_USER:-messenger}:${POSTGRES_PASSWORD:?Задай POSTGRES_PASSWORD в .env}@postgres:5432/${POSTGRES_DB:-messenger} + depends_on: + postgres: + condition: service_healthy + healthcheck: + disable: true + + api: + <<: *app + cpus: ${API_CPUS:-0.5} + mem_limit: ${API_MEMORY:-256m} + stop_grace_period: 15s + deploy: + replicas: ${API_REPLICAS:-2} + read_only: true + tmpfs: + - /tmp:rw,noexec,nosuid,size=16m + cap_drop: [ALL] + security_opt: ["no-new-privileges:true"] + environment: + APP_HOST: 0.0.0.0 + APP_PORT: 8080 + DATABASE_URL: *database_url + REDIS_URL: *redis_url + SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600} + LOG_LEVEL: ${LOG_LEVEL:-INFO} + APP_WORKERS: 1 + DATABASE_POOL_SIZE: ${DATABASE_POOL_SIZE:-10} + DATABASE_POOL_TIMEOUT_SECONDS: 2 + DATABASE_CONNECT_TIMEOUT_SECONDS: 1 + DATABASE_COMMAND_TIMEOUT_SECONDS: 3 + DATABASE_STATEMENT_TIMEOUT_MS: 2500 + SHUTDOWN_TIMEOUT_SECONDS: 10 + expose: ["8080"] + depends_on: + migration: + condition: service_completed_successfully + redis: + condition: service_healthy + healthcheck: + interval: 2s + timeout: 3s + retries: 30 + start_period: 10s + + lb: + image: haproxy:3.0.12-alpine + logging: *logging + cpus: 0.5 + mem_limit: 128m + read_only: true + tmpfs: ["/tmp:rw,noexec,nosuid,size=4m"] + security_opt: ["no-new-privileges:true"] + ports: + - "127.0.0.1:${APP_PORT:-8080}:8080" + volumes: + - ./infra/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro + depends_on: + api: + condition: service_healthy + stop_signal: SIGUSR1 + stop_grace_period: 15s + +volumes: + redis_data: + postgres_data: diff --git a/evidence/lab3-500-headers.txt b/evidence/lab3-500-headers.txt new file mode 100644 index 00000000..f4ee4f35 --- /dev/null +++ b/evidence/lab3-500-headers.txt @@ -0,0 +1,49 @@ +PASS: 500 has X-Request-Id/X-Instance-Id and hides internal exception details +2026-11-06 15:29:19,207 ERROR src.main: Необработанная ошибка запроса +Traceback (most recent call last): + File "/app/src/main.py", line 37, in add_request_id + response = await call_next(request) + ^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.13/site-packages/starlette/middleware/base.py", line 173, in call_next + raise app_exc from app_exc.__cause__ or app_exc.__context__ + File "/usr/local/lib/python3.13/site-packages/starlette/middleware/base.py", line 149, in coro + await self.app(scope, receive_or_disconnect, send_no_error) + File "/app/src/core/request_limits.py", line 34, in __call__ + await self.app(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/starlette/middleware/exceptions.py", line 63, in __call__ + await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app + raise exc + File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "/usr/local/lib/python3.13/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__ + await self.app(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/starlette/routing.py", line 676, in __call__ + await self.middleware_stack(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 2734, in app + await route.handle(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 1281, in handle + await super().handle(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/starlette/routing.py", line 282, in handle + await self.app(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 158, in app + await wrap_app_handling_exceptions(app, request)(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app + raise exc + File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 144, in app + response = await f(request) + ^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 706, in app + raw_response = await run_endpoint_function( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<3 lines>... + ) + ^ + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 352, in run_endpoint_function + return await dependant.call(**values) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "", line 13, in unexpected +RuntimeError: audit-internal-detail +2026-11-06 15:29:19,287 INFO src.main: ид_запроса=78e3b0b2-f02d-4294-9dc7-24ec66167566 метод=GET путь='/_audit_unexpected_error' статус=500 длительность_мс=83.705 diff --git a/evidence/lab3-audit-before.json b/evidence/lab3-audit-before.json new file mode 100644 index 00000000..4d2d8dca --- /dev/null +++ b/evidence/lab3-audit-before.json @@ -0,0 +1,5 @@ +{ + "nul_message_status": 400, + "missing_idempotency_table_ready_status": 200, + "missing_idempotency_table_business_status": 200 +} diff --git a/evidence/lab3-audit-changing-ips.json b/evidence/lab3-audit-changing-ips.json new file mode 100644 index 00000000..1bd3b6c5 --- /dev/null +++ b/evidence/lab3-audit-changing-ips.json @@ -0,0 +1,32 @@ +{ + "result": "PASS", + "events": [ + { + "old_container": "70d88d4f5925", + "old_ip": "172.25.0.5", + "old_instance": "4cff52af-d57e-4dad-82b4-1b9797fb0aac", + "new_container": "4856ec40e6db", + "new_ip": "172.25.0.7", + "new_instance": "a916210d-1bd0-4086-9e21-7c13158a9ee0", + "discovery_after_ready_seconds": 0.138 + }, + { + "old_container": "0b6ad97c4510", + "old_ip": "172.25.0.4", + "old_instance": "a2200766-fb19-4863-889b-4a38019c180e", + "new_container": "6205d0db9981", + "new_ip": "172.25.0.8", + "new_instance": "f9491c25-70ac-4b45-935d-f742415b6366", + "discovery_after_ready_seconds": 0.151 + } + ], + "observed_instances_after": [ + "a916210d-1bd0-4086-9e21-7c13158a9ee0", + "f9491c25-70ac-4b45-935d-f742415b6366" + ], + "lb_restarted": false, + "old_ips_kept_occupied_during_test": [ + "172.25.0.5", + "172.25.0.4" + ] +} diff --git a/evidence/lab3-audit-contract.json b/evidence/lab3-audit-contract.json new file mode 100644 index 00000000..dea6d32d --- /dev/null +++ b/evidence/lab3-audit-contract.json @@ -0,0 +1,22 @@ +{ + "result": "PASS", + "simultaneous_requests": 16, + "observed_instances": [ + "4cff52af-d57e-4dad-82b4-1b9797fb0aac", + "a2200766-fb19-4863-889b-4a38019c180e" + ], + "database_rows_for_first_key": 1, + "headers_413": "present", + "nul_roundtrip": "201, replay and history; 4000 code points supported", + "checks": [ + "invalid cursor types/limit", + "UTF-8 Basic", + "login body rejected", + "unknown member 400", + "key scope/format", + "foreign cursor", + "fresh history limit=7 and other limits", + "outsider hidden", + "raw invalid JSON rejected" + ] +} diff --git a/evidence/lab3-audit-first-run.txt b/evidence/lab3-audit-first-run.txt new file mode 100644 index 00000000..46cea78b --- /dev/null +++ b/evidence/lab3-audit-first-run.txt @@ -0,0 +1,30 @@ +Checking contract +contract PASS +Checking readiness +readiness PASS +Checking frozen-stores + Container mtusi2026lab1-postgres-1 Paused + Container mtusi2026lab1-postgres-1 Unpaused +Traceback (most recent call last): + File "/Users/andrejkamenskij/PycharmProjects/mtusi2026lab1/scripts/audit-lab3.py", line 494, in + main() + ~~~~^^ + File "/Users/andrejkamenskij/PycharmProjects/mtusi2026lab1/scripts/audit-lab3.py", line 482, in main + result = check() + File "/Users/andrejkamenskij/PycharmProjects/mtusi2026lab1/scripts/audit-lab3.py", line 284, in frozen_stores + transition = wire("GET", "/health/ready") + File "/Users/andrejkamenskij/PycharmProjects/mtusi2026lab1/scripts/audit-lab3.py", line 65, in wire + response = conn.getresponse() + File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 1428, in getresponse + response.begin() + ~~~~~~~~~~~~~~^^ + File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 331, in begin + version, status, reason = self._read_status() + ~~~~~~~~~~~~~~~~~^^ + File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 292, in _read_status + line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") + ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ + File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/socket.py", line 719, in readinto + return self._sock.recv_into(b) + ~~~~~~~~~~~~~~~~~~~~^^^ +TimeoutError: timed out diff --git a/evidence/lab3-audit-frozen-stores.json b/evidence/lab3-audit-frozen-stores.json new file mode 100644 index 00000000..8f1b3daa --- /dev/null +++ b/evidence/lab3-audit-frozen-stores.json @@ -0,0 +1,43 @@ +{ + "result": "PASS", + "experiments": [ + { + "service": "postgres", + "initial_ready_request": { + "status": 503, + "seconds": 2.006, + "instance": "a2200766-fb19-4863-889b-4a38019c180e" + }, + "business": { + "status": 503, + "seconds": 0.004, + "instance": null + }, + "registration": { + "status": 503, + "seconds": 0.003, + "instance": null + }, + "elapsed_seconds": 6.132 + }, + { + "service": "redis", + "initial_ready_request": { + "status": 503, + "seconds": 0.311, + "instance": "a2200766-fb19-4863-889b-4a38019c180e" + }, + "business": { + "status": 503, + "seconds": 0.005, + "instance": null + }, + "registration": { + "status": 503, + "seconds": 0.005, + "instance": null + }, + "elapsed_seconds": 4.433 + } + ] +} diff --git a/evidence/lab3-audit-limits-evidence.json b/evidence/lab3-audit-limits-evidence.json new file mode 100644 index 00000000..ffd3e83d --- /dev/null +++ b/evidence/lab3-audit-limits-evidence.json @@ -0,0 +1,52 @@ +{ + "result": "PASS", + "limits": { + "api": [ + { + "container": "4856ec40e6db", + "cpu": 0.5, + "memory_bytes": 268435456 + }, + { + "container": "6205d0db9981", + "cpu": 0.5, + "memory_bytes": 268435456 + } + ], + "postgres": [ + { + "container": "ec54dbe8e8dd", + "cpu": 1.0, + "memory_bytes": 536870912 + } + ], + "redis": [ + { + "container": "f71bc2ef45c8", + "cpu": 0.25, + "memory_bytes": 134217728 + } + ], + "lb": [ + { + "container": "279562a6ff00", + "cpu": 0.5, + "memory_bytes": 134217728 + } + ], + "migration": [ + { + "container": "5a2ccb851cbb", + "cpu": 0.5, + "memory_bytes": 268435456 + } + ] + }, + "fixed_api_budget": { + "cpu": 2, + "memory_mib": 1024 + }, + "research_runs": 18, + "rolling_command": "python3 scripts/rolling-update.py", + "shell_hooks_executable": true +} diff --git a/evidence/lab3-audit-readiness.json b/evidence/lab3-audit-readiness.json new file mode 100644 index 00000000..025346b9 --- /dev/null +++ b/evidence/lab3-audit-readiness.json @@ -0,0 +1,275 @@ +{ + "result": "PASS", + "experiments": [ + { + "missing_table": "users", + "direct_readiness": { + "70d88d4f5925": 503, + "0b6ad97c4510": 503 + }, + "business_requests": [ + { + "status": 503, + "seconds": 0.004, + "instance": "a2200766-fb19-4863-889b-4a38019c180e" + }, + { + "status": 503, + "seconds": 0.004, + "instance": "4cff52af-d57e-4dad-82b4-1b9797fb0aac" + }, + { + "status": 503, + "seconds": 0.003, + "instance": "a2200766-fb19-4863-889b-4a38019c180e" + }, + { + "status": 503, + "seconds": 0.003, + "instance": "4cff52af-d57e-4dad-82b4-1b9797fb0aac" + }, + { + "status": 503, + "seconds": 0.003, + "instance": "a2200766-fb19-4863-889b-4a38019c180e" + }, + { + "status": 503, + "seconds": 0.004, + "instance": "4cff52af-d57e-4dad-82b4-1b9797fb0aac" + }, + { + "status": 503, + "seconds": 0.003, + "instance": "a2200766-fb19-4863-889b-4a38019c180e" + }, + { + "status": 503, + "seconds": 0.003, + "instance": "4cff52af-d57e-4dad-82b4-1b9797fb0aac" + } + ], + "registration": { + "status": 503, + "seconds": 0.156, + "instance": "a2200766-fb19-4863-889b-4a38019c180e" + } + }, + { + "missing_table": "chats", + "direct_readiness": { + "70d88d4f5925": 503, + "0b6ad97c4510": 503 + }, + "business_requests": [ + { + "status": 503, + "seconds": 0.002, + "instance": null + }, + { + "status": 503, + "seconds": 0.002, + "instance": null + }, + { + "status": 503, + "seconds": 0.002, + "instance": null + }, + { + "status": 503, + "seconds": 0.002, + "instance": null + }, + { + "status": 503, + "seconds": 0.002, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + } + ], + "registration": { + "status": 503, + "seconds": 0.001, + "instance": null + } + }, + { + "missing_table": "chat_members", + "direct_readiness": { + "70d88d4f5925": 503, + "0b6ad97c4510": 503 + }, + "business_requests": [ + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + } + ], + "registration": { + "status": 503, + "seconds": 0.001, + "instance": null + } + }, + { + "missing_table": "messages", + "direct_readiness": { + "70d88d4f5925": 503, + "0b6ad97c4510": 503 + }, + "business_requests": [ + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.002, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + } + ], + "registration": { + "status": 503, + "seconds": 0.002, + "instance": null + } + }, + { + "missing_table": "message_requests", + "direct_readiness": { + "70d88d4f5925": 503, + "0b6ad97c4510": 503 + }, + "business_requests": [ + { + "status": 503, + "seconds": 0.002, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.002, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.001, + "instance": null + }, + { + "status": 503, + "seconds": 0.002, + "instance": null + } + ], + "registration": { + "status": 503, + "seconds": 0.001, + "instance": null + } + } + ] +} diff --git a/evidence/lab3-audit-run.txt b/evidence/lab3-audit-run.txt new file mode 100644 index 00000000..e06b0edb --- /dev/null +++ b/evidence/lab3-audit-run.txt @@ -0,0 +1,30 @@ +Checking contract +contract PASS +Checking readiness +readiness PASS +Checking frozen-stores + Container mtusi2026lab1-postgres-1 Paused + Container mtusi2026lab1-postgres-1 Unpaused + Container mtusi2026lab1-redis-1 Paused + Container mtusi2026lab1-redis-1 Unpaused +frozen-stores PASS +Checking changing-ips + Container mtusi2026lab1-api-14 Running + Container mtusi2026lab1-api-15 Creating + Container mtusi2026lab1-api-15 Created + Container mtusi2026lab1-api-15 Starting + Container mtusi2026lab1-api-15 Started + Container mtusi2026lab1-api-15 Running + Container mtusi2026lab1-api-16 Creating + Container mtusi2026lab1-api-16 Created + Container mtusi2026lab1-api-16 Starting + Container mtusi2026lab1-api-16 Started + Container mtusi2026lab1-api-15 Running + Container mtusi2026lab1-api-16 Running + Container mtusi2026lab1-api-16 Waiting + Container mtusi2026lab1-api-15 Waiting + Container mtusi2026lab1-api-16 Healthy + Container mtusi2026lab1-api-15 Healthy +changing-ips PASS +Checking limits-evidence +limits-evidence PASS diff --git a/evidence/lab3-audit-summary-all.json b/evidence/lab3-audit-summary-all.json new file mode 100644 index 00000000..78a62910 --- /dev/null +++ b/evidence/lab3-audit-summary-all.json @@ -0,0 +1,7 @@ +{ + "contract": "PASS", + "readiness": "PASS", + "frozen-stores": "PASS", + "changing-ips": "PASS", + "limits-evidence": "PASS" +} diff --git a/evidence/lab3-cache-edge-before.json b/evidence/lab3-cache-edge-before.json new file mode 100644 index 00000000..14edf7a0 --- /dev/null +++ b/evidence/lab3-cache-edge-before.json @@ -0,0 +1,9 @@ +{ + "surrogate": { + "status": 500 + }, + "extreme_timezone": { + "status": 200, + "created_at": "0001-01-01T00:00:00+23:59" + } +} diff --git a/evidence/lab3-clean-start.json b/evidence/lab3-clean-start.json new file mode 100644 index 00000000..3fbde009 --- /dev/null +++ b/evidence/lab3-clean-start.json @@ -0,0 +1,8 @@ +{ + "result": "PASS", + "project": "lab3-audit-clean-f4312125", + "schema_revision": "006", + "public_smoke": "PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.", + "empty_volumes": true, + "temporary_project_removed": true +} diff --git a/evidence/lab3-clean-start.txt b/evidence/lab3-clean-start.txt new file mode 100644 index 00000000..3fbde009 --- /dev/null +++ b/evidence/lab3-clean-start.txt @@ -0,0 +1,8 @@ +{ + "result": "PASS", + "project": "lab3-audit-clean-f4312125", + "schema_revision": "006", + "public_smoke": "PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.", + "empty_volumes": true, + "temporary_project_removed": true +} diff --git a/evidence/lab3-control/method.json b/evidence/lab3-control/method.json new file mode 100644 index 00000000..5210785d --- /dev/null +++ b/evidence/lab3-control/method.json @@ -0,0 +1,81 @@ +{ + "host": "macOS-15.6.1-arm64-arm-64bit-Mach-O", + "architecture": "arm64", + "docker": { + "ServerVersion": "28.5.1", + "NCPU": 10, + "MemTotal": 8218034176, + "KernelVersion": "6.10.14-linuxkit", + "OperatingSystem": "Docker Desktop", + "Architecture": "aarch64" + }, + "application": { + "schema_revision": "006", + "message_storage": "UTF-8 bytea", + "source_sha256": { + "src/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/__main__.py": "b1b472fa858b203911db455eb5c25965b961510985ec4d2c94f627d378aaa9f8", + "src/api/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/api/dependencies.py": "73c3f94d7c14d6c34031214933340124ebc4e22730b2b1bf8a2eb89a0d42e986", + "src/api/router.py": "6e78524634e76036418867e6f8a4fa83874213122d39728441a64ef174da2152", + "src/api/v1/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/api/v1/routers/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/api/v1/routers/auth/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/api/v1/routers/auth/callback.py": "69a2cde6ac37f445e64d9afdea55437240846d158460e6fc5601ff0ce2045d2c", + "src/api/v1/routers/auth/router.py": "075648602d66bdc3497c4714d9789b2ea5661501478b05ba845b65c55a725fd8", + "src/api/v1/routers/auth/schemas.py": "ba3345570c35b8a9e55751202f9c8a27f7d338cfcd85b300c196a43ac03aa311", + "src/api/v1/routers/chats/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/api/v1/routers/chats/router.py": "85cac2d5ade6917c99e4e6a82053f681e1d253eca4fe3eee726e9f7621635bce", + "src/api/v1/routers/chats/schemas.py": "00e0fc283069cca6c7929ef8d704aa1e577e6bfb555a496eb1b8170231c3b240", + "src/api/v1/routers/messages/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/api/v1/routers/messages/router.py": "4e53d6fe338518c165194b9de319ce9d725eb1808567d68c1a6abb002d6edd19", + "src/api/v1/routers/messages/schemas.py": "c0f4d7f3052d725ee4ca1bc093359be90a8a857e436df706ec179171114cc644", + "src/api/v1/routers/users/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/api/v1/routers/users/router.py": "fedd9cb7da2fb21caccd8ae2080d013719b4f13382dc795de880fb8ca87f857f", + "src/api/v1/routers/users/schemas.py": "c30356333a3f6bd1b80b8cf6f4208d550201adfaaa0667e1db074c4aecc70dd7", + "src/api/v1/schemas.py": "403d5821588d8abcc33a285cd2689be5eba0e7ab0373d1e17856ff0464934766", + "src/core/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/core/cache.py": "1973038f948f2eff50b18ba9c0ea3aa1eedd712932a41045ba6dd18dee358966", + "src/core/callback.py": "9046a504d8324a32e428ff8f4d159d452160828d470e3205400473394d380fee", + "src/core/db/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/core/db/models.py": "4597db6b0170e14873046bdeadd544bc75909dc0e242e4896f1ce3bce533850a", + "src/core/db/repo/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/core/db/repo/auth.py": "63fb17b55cf05a4b05c5f0b08d3e4f6dc6c83981c7f9d89a0d798b0d270283f2", + "src/core/db/repo/chat.py": "fa1042b689e1e2242360d1432ca84ca49f35a6a2de03810135907333466e76fd", + "src/core/db/repo/message.py": "8589f68ab991126ad48c32f4629db96dac0f5b1ba8203ab750ca317ef696b1ac", + "src/core/db/repo/user.py": "f1d36be8530772e6a969687e78bc7bb9bfe7daf8be67d1e079acb1e6c9d7017b", + "src/core/db/session.py": "9d4c07446ccc0990843c7f978c487a9976f9d926bf1e69a57f88021f742c7c5f", + "src/core/db/types.py": "1e8890cfa43c31ce77ce0c95f0a8a535d0730835db16f33b086226bb189ad7aa", + "src/core/errors.py": "5f93764110b969832766be8a6302515edf2eecc44de4d43c4d350c9c20d31432", + "src/core/pagination.py": "3e1c7e5232dc27688f20c622f312ea10d5ce45e9d3960a4c1b61af3e885079c6", + "src/core/readiness.py": "4bffdfbfa4eda45ac4c065251c99bd62cb18280120b32d4b74360519c87b0d98", + "src/core/request_limits.py": "68bc5406f7d867280c96ebce1c798fd5a34fe7853298dcf1e2a286a9e6c547ac", + "src/core/security.py": "64d6769b36090ab2824f19668f99d23669f838e82d6a785636c339b7c1876663", + "src/core/session_store.py": "874b3ffa5b52b5b6a4587dc785784f41b6958d1b3be5a6a62470623f2182a6c1", + "src/core/settings.py": "cc5892ad7c7900c0642630cfc286f865b944631f2a213240376e0ee115d0b848", + "src/main.py": "89bdd35baef98621e9c287db7911ff72bec8768604617b525f7afd948fd877ff", + "src/service/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/service/auth.py": "c979b1bdf157d7468ec584093e56a16abbb6b3fb25da0a1cce6eecac792db5ce", + "src/service/chat.py": "baa2b0eb570fa0965a0e4b929313ecb1c96464997b592872f4ed193e22c48489", + "src/service/dto.py": "ce785b26adc2f807aecb742d392867e0fdd11603d5a8058ce6d9dc0bf0a7d6a2", + "src/service/exceptions.py": "32a232596795b28c1ca5ebbd19ed938cc6086263ceaf476716e9ae310da9f685", + "src/service/message.py": "e00315c45b11b8cf1d05ad1960afe59d0ebf8992efbb6d8d431a12dfc07ebadb", + "src/service/user.py": "44e561c97aff49d358e5f9ed02cfe6ae85abdd384423fe9dcc7b9b05f13f4bbb" + }, + "configuration_sha256": { + "compose.yaml": "704f9d6ab2bd183e38353b8de74e918f414c673fe45b54de3fd307fe949adce8", + "infra/haproxy.cfg": "6640795207cee655e5c22d685d73b2a57ae1a987156783ad5226d57d7ed6d59c", + "scripts/benchmark.py": "d93a933bea29400700c1ad9825929a7031406134eeffe704b7b615844549b5f5" + } + }, + "method": { + "warmup_seconds": 3, + "repeats": 1, + "duration_seconds": 8, + "concurrency": 32, + "profile": "80% POST unique keys, 20% GET first page limit20, 20 seed messages; fresh chat per run", + "generator": "Python http.client, one persistent connection per thread, closed-loop, no retries", + "limits": "PostgreSQL 0.25 CPU/512MiB baseline, LB 0.5CPU/128MiB, Redis 0.25CPU/128MiB", + "randomization_seed": 20261106 + } +} diff --git a/evidence/lab3-control/results.json b/evidence/lab3-control/results.json new file mode 100644 index 00000000..a8449ed7 --- /dev/null +++ b/evidence/lab3-control/results.json @@ -0,0 +1,280 @@ +[ + { + "job": { + "series": "growing", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 8, + "elapsed_seconds": 8.103, + "concurrency": 32, + "successes": { + "write": 1302, + "read": 308 + }, + "errors": {}, + "rps": 198.697, + "all_attempt_latency_ms": { + "p50": 155.692, + "p95": 302.563, + "p99": 403.351 + }, + "successful_latency_ms": { + "p50": 155.692, + "p95": 302.563, + "p99": 403.351 + }, + "instances": [ + "339b0a87-f7b9-4f08-9660-689a35b5361f", + "5321e930-7ae6-4b67-841f-2a98b114585d", + "bf0dbeaf-b05a-4b05-aa10-5854c055d688", + "dd38948b-a08a-49c2-9b4e-c03c727d7d7f" + ], + "seconds": { + "0": { + "success": 201, + "error": 0 + }, + "1": { + "success": 192, + "error": 0 + }, + "2": { + "success": 178, + "error": 0 + }, + "3": { + "success": 203, + "error": 0 + }, + "4": { + "success": 194, + "error": 0 + }, + "5": { + "success": 246, + "error": 0 + }, + "6": { + "success": 176, + "error": 0 + }, + "7": { + "success": 220, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "d58b8e8ce26e": { + "service": "api", + "memory_current_mib": 65.02, + "memory_peak_lifetime_mib": 125.65, + "cpu_cores_used": 0.554, + "throttled_seconds": 0.456, + "throttled_period_ratio": 0.163 + }, + "29dc6359d3e7": { + "service": "api", + "memory_current_mib": 64.79, + "memory_peak_lifetime_mib": 126.68, + "cpu_cores_used": 0.569, + "throttled_seconds": 0.565, + "throttled_period_ratio": 0.186 + }, + "d9839970a49e": { + "service": "api", + "memory_current_mib": 65.02, + "memory_peak_lifetime_mib": 126.87, + "cpu_cores_used": 0.535, + "throttled_seconds": 0.63, + "throttled_period_ratio": 0.185 + }, + "28df70fb850b": { + "service": "api", + "memory_current_mib": 65.38, + "memory_peak_lifetime_mib": 125.32, + "cpu_cores_used": 0.46, + "throttled_seconds": 0.417, + "throttled_period_ratio": 0.128 + }, + "49bc2fa29e8a": { + "service": "postgres", + "memory_current_mib": 124.34, + "memory_peak_lifetime_mib": 128.11, + "cpu_cores_used": 0.265, + "throttled_seconds": 38.655, + "throttled_period_ratio": 0.903 + }, + "f71bc2ef45c8": { + "service": "redis", + "memory_current_mib": 10.61, + "memory_peak_lifetime_mib": 15.91, + "cpu_cores_used": 0.024, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "memory_current_mib": 17.48, + "memory_peak_lifetime_mib": 19.04, + "cpu_cores_used": 0.055, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 1573, + "rollbacks": 1655, + "blocks_read": 375, + "blocks_hit": 114030, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "improved-db", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 1, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 8, + "elapsed_seconds": 8.115, + "concurrency": 32, + "successes": { + "write": 3854, + "read": 941 + }, + "errors": { + "503": 10 + }, + "rps": 590.851, + "all_attempt_latency_ms": { + "p50": 17.076, + "p95": 169.569, + "p99": 263.091 + }, + "successful_latency_ms": { + "p50": 17.025, + "p95": 169.721, + "p99": 264.503 + }, + "instances": [ + "339b0a87-f7b9-4f08-9660-689a35b5361f", + "5321e930-7ae6-4b67-841f-2a98b114585d", + "bf0dbeaf-b05a-4b05-aa10-5854c055d688", + "dd38948b-a08a-49c2-9b4e-c03c727d7d7f" + ], + "seconds": { + "0": { + "success": 668, + "error": 1 + }, + "1": { + "success": 637, + "error": 0 + }, + "2": { + "success": 433, + "error": 0 + }, + "3": { + "success": 506, + "error": 0 + }, + "4": { + "success": 738, + "error": 3 + }, + "5": { + "success": 647, + "error": 3 + }, + "6": { + "success": 519, + "error": 3 + }, + "7": { + "success": 647, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "d58b8e8ce26e": { + "service": "api", + "memory_current_mib": 68.0, + "memory_peak_lifetime_mib": 130.5, + "cpu_cores_used": 0.881, + "throttled_seconds": 2.226, + "throttled_period_ratio": 0.349 + }, + "29dc6359d3e7": { + "service": "api", + "memory_current_mib": 69.26, + "memory_peak_lifetime_mib": 126.68, + "cpu_cores_used": 0.899, + "throttled_seconds": 2.23, + "throttled_period_ratio": 0.489 + }, + "d9839970a49e": { + "service": "api", + "memory_current_mib": 71.18, + "memory_peak_lifetime_mib": 142.96, + "cpu_cores_used": 0.87, + "throttled_seconds": 2.278, + "throttled_period_ratio": 0.333 + }, + "28df70fb850b": { + "service": "api", + "memory_current_mib": 71.35, + "memory_peak_lifetime_mib": 125.32, + "cpu_cores_used": 0.948, + "throttled_seconds": 2.153, + "throttled_period_ratio": 0.385 + }, + "2bf17307d821": { + "service": "postgres", + "memory_current_mib": 129.41, + "memory_peak_lifetime_mib": 133.3, + "cpu_cores_used": 0.578, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "f71bc2ef45c8": { + "service": "redis", + "memory_current_mib": 10.71, + "memory_peak_lifetime_mib": 16.09, + "cpu_cores_used": 0.058, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "memory_current_mib": 17.3, + "memory_peak_lifetime_mib": 19.23, + "cpu_cores_used": 0.118, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 4573, + "rollbacks": 4657, + "blocks_read": 30, + "blocks_hit": 378497, + "temp_bytes": 0 + } + } +] diff --git a/evidence/lab3-control/run-01.json b/evidence/lab3-control/run-01.json new file mode 100644 index 00000000..816d64de --- /dev/null +++ b/evidence/lab3-control/run-01.json @@ -0,0 +1,138 @@ +{ + "job": { + "series": "growing", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 8, + "elapsed_seconds": 8.103, + "concurrency": 32, + "successes": { + "write": 1302, + "read": 308 + }, + "errors": {}, + "rps": 198.697, + "all_attempt_latency_ms": { + "p50": 155.692, + "p95": 302.563, + "p99": 403.351 + }, + "successful_latency_ms": { + "p50": 155.692, + "p95": 302.563, + "p99": 403.351 + }, + "instances": [ + "339b0a87-f7b9-4f08-9660-689a35b5361f", + "5321e930-7ae6-4b67-841f-2a98b114585d", + "bf0dbeaf-b05a-4b05-aa10-5854c055d688", + "dd38948b-a08a-49c2-9b4e-c03c727d7d7f" + ], + "seconds": { + "0": { + "success": 201, + "error": 0 + }, + "1": { + "success": 192, + "error": 0 + }, + "2": { + "success": 178, + "error": 0 + }, + "3": { + "success": 203, + "error": 0 + }, + "4": { + "success": 194, + "error": 0 + }, + "5": { + "success": 246, + "error": 0 + }, + "6": { + "success": 176, + "error": 0 + }, + "7": { + "success": 220, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "d58b8e8ce26e": { + "service": "api", + "memory_current_mib": 65.02, + "memory_peak_lifetime_mib": 125.65, + "cpu_cores_used": 0.554, + "throttled_seconds": 0.456, + "throttled_period_ratio": 0.163 + }, + "29dc6359d3e7": { + "service": "api", + "memory_current_mib": 64.79, + "memory_peak_lifetime_mib": 126.68, + "cpu_cores_used": 0.569, + "throttled_seconds": 0.565, + "throttled_period_ratio": 0.186 + }, + "d9839970a49e": { + "service": "api", + "memory_current_mib": 65.02, + "memory_peak_lifetime_mib": 126.87, + "cpu_cores_used": 0.535, + "throttled_seconds": 0.63, + "throttled_period_ratio": 0.185 + }, + "28df70fb850b": { + "service": "api", + "memory_current_mib": 65.38, + "memory_peak_lifetime_mib": 125.32, + "cpu_cores_used": 0.46, + "throttled_seconds": 0.417, + "throttled_period_ratio": 0.128 + }, + "49bc2fa29e8a": { + "service": "postgres", + "memory_current_mib": 124.34, + "memory_peak_lifetime_mib": 128.11, + "cpu_cores_used": 0.265, + "throttled_seconds": 38.655, + "throttled_period_ratio": 0.903 + }, + "f71bc2ef45c8": { + "service": "redis", + "memory_current_mib": 10.61, + "memory_peak_lifetime_mib": 15.91, + "cpu_cores_used": 0.024, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "memory_current_mib": 17.48, + "memory_peak_lifetime_mib": 19.04, + "cpu_cores_used": 0.055, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 1573, + "rollbacks": 1655, + "blocks_read": 375, + "blocks_hit": 114030, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-control/run-02.json b/evidence/lab3-control/run-02.json new file mode 100644 index 00000000..52c9479e --- /dev/null +++ b/evidence/lab3-control/run-02.json @@ -0,0 +1,140 @@ +{ + "job": { + "series": "improved-db", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 1, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 8, + "elapsed_seconds": 8.115, + "concurrency": 32, + "successes": { + "write": 3854, + "read": 941 + }, + "errors": { + "503": 10 + }, + "rps": 590.851, + "all_attempt_latency_ms": { + "p50": 17.076, + "p95": 169.569, + "p99": 263.091 + }, + "successful_latency_ms": { + "p50": 17.025, + "p95": 169.721, + "p99": 264.503 + }, + "instances": [ + "339b0a87-f7b9-4f08-9660-689a35b5361f", + "5321e930-7ae6-4b67-841f-2a98b114585d", + "bf0dbeaf-b05a-4b05-aa10-5854c055d688", + "dd38948b-a08a-49c2-9b4e-c03c727d7d7f" + ], + "seconds": { + "0": { + "success": 668, + "error": 1 + }, + "1": { + "success": 637, + "error": 0 + }, + "2": { + "success": 433, + "error": 0 + }, + "3": { + "success": 506, + "error": 0 + }, + "4": { + "success": 738, + "error": 3 + }, + "5": { + "success": 647, + "error": 3 + }, + "6": { + "success": 519, + "error": 3 + }, + "7": { + "success": 647, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "d58b8e8ce26e": { + "service": "api", + "memory_current_mib": 68.0, + "memory_peak_lifetime_mib": 130.5, + "cpu_cores_used": 0.881, + "throttled_seconds": 2.226, + "throttled_period_ratio": 0.349 + }, + "29dc6359d3e7": { + "service": "api", + "memory_current_mib": 69.26, + "memory_peak_lifetime_mib": 126.68, + "cpu_cores_used": 0.899, + "throttled_seconds": 2.23, + "throttled_period_ratio": 0.489 + }, + "d9839970a49e": { + "service": "api", + "memory_current_mib": 71.18, + "memory_peak_lifetime_mib": 142.96, + "cpu_cores_used": 0.87, + "throttled_seconds": 2.278, + "throttled_period_ratio": 0.333 + }, + "28df70fb850b": { + "service": "api", + "memory_current_mib": 71.35, + "memory_peak_lifetime_mib": 125.32, + "cpu_cores_used": 0.948, + "throttled_seconds": 2.153, + "throttled_period_ratio": 0.385 + }, + "2bf17307d821": { + "service": "postgres", + "memory_current_mib": 129.41, + "memory_peak_lifetime_mib": 133.3, + "cpu_cores_used": 0.578, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "f71bc2ef45c8": { + "service": "redis", + "memory_current_mib": 10.71, + "memory_peak_lifetime_mib": 16.09, + "cpu_cores_used": 0.058, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "memory_current_mib": 17.3, + "memory_peak_lifetime_mib": 19.23, + "cpu_cores_used": 0.118, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 4573, + "rollbacks": 4657, + "blocks_read": 30, + "blocks_hit": 378497, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-control/summary.csv b/evidence/lab3-control/summary.csv new file mode 100644 index 00000000..727bc457 --- /dev/null +++ b/evidence/lab3-control/summary.csv @@ -0,0 +1,3 @@ +series,replicas,cpus,memory,db,concurrency,repeat,rps,p95_ms,errors,postgres_cores +growing,4,1,256m,0.25,32,0,198.697,302.563,0,0.265 +improved-db,4,1,256m,1,32,0,590.851,169.569,10,0.578 diff --git a/evidence/lab3-db-idempotency.txt b/evidence/lab3-db-idempotency.txt new file mode 100644 index 00000000..b913f834 --- /dev/null +++ b/evidence/lab3-db-idempotency.txt @@ -0,0 +1 @@ +PASS: rollback removes both message/key; committed result replays; expired key can be reused diff --git a/evidence/lab3-edge-audit.json b/evidence/lab3-edge-audit.json new file mode 100644 index 00000000..31b7c89e --- /dev/null +++ b/evidence/lab3-edge-audit.json @@ -0,0 +1,18 @@ +{ + "result": "PASS", + "checks": [ + "duplicate Idempotency-Key and Content-Type rejected", + "strict integer and repeated query parameters", + "NUL/emoji user and chat Unicode roundtrip", + "100 code point names and 4000 code point messages", + "no text trim or silent Unicode normalization", + "16 conflicting simultaneous requests: 8 replayed winners, 8 conflicts, one DB row", + "DB failure after message INSERT rolls back message and key; same key succeeds after recovery", + "invalid cached Unicode/timezone falls back to DB with TTL", + "one TCP connection reaches both API" + ], + "keepalive_instances": [ + "1117b014-edbb-473e-ba6f-107991a36b0c", + "cf4df4a1-2ff5-4d04-a979-42a2425d3b80" + ] +} diff --git a/evidence/lab3-edge-audit.txt b/evidence/lab3-edge-audit.txt new file mode 100644 index 00000000..ba7e29cb --- /dev/null +++ b/evidence/lab3-edge-audit.txt @@ -0,0 +1,18 @@ +{ + "result": "PASS", + "checks": [ + "duplicate Idempotency-Key and Content-Type rejected", + "strict integer and repeated query parameters", + "NUL/emoji user and chat Unicode roundtrip", + "100 code point names and 4000 code point messages", + "no text trim or silent Unicode normalization", + "16 conflicting simultaneous requests: 8 replayed winners, 8 conflicts, one DB row", + "DB failure after message INSERT rolls back message and key; same key succeeds after recovery", + "invalid cached Unicode/timezone falls back to DB with TTL", + "one TCP connection reaches both API" + ], + "keepalive_instances": [ + "a916210d-1bd0-4086-9e21-7c13158a9ee0", + "f9491c25-70ac-4b45-935d-f742415b6366" + ] +} diff --git a/evidence/lab3-extra-audit-before.json b/evidence/lab3-extra-audit-before.json new file mode 100644 index 00000000..8bdf0884 --- /dev/null +++ b/evidence/lab3-extra-audit-before.json @@ -0,0 +1,6 @@ +{ + "duplicate_idempotency_header_status": 201, + "decimal_limit_status": 200, + "nul_display_name_status": 400, + "nul_chat_title_status": 400 +} diff --git a/evidence/lab3-extra.txt b/evidence/lab3-extra.txt new file mode 100644 index 00000000..119d0eb9 --- /dev/null +++ b/evidence/lab3-extra.txt @@ -0,0 +1 @@ +{"результат": "ПРОЙДЕНО", "гонка_регистрации": "1 создан, 5 конфликтов", "unicode_пароль_и_logout_с_кэшем": "ПРОЙДЕНО", "параллельных_клиентов": 10, "создано_сообщений": 100, "уникальных_сообщений": 100} diff --git a/evidence/lab3-failures.json b/evidence/lab3-failures.json new file mode 100644 index 00000000..0c1fc5ce --- /dev/null +++ b/evidence/lab3-failures.json @@ -0,0 +1,182 @@ +[ + { + "duration_seconds": 12, + "elapsed_seconds": 12.038, + "concurrency": 8, + "successes": { + "write": 1158, + "read": 286 + }, + "errors": { + "connection": 16, + "503": 7 + }, + "rps": 119.958, + "all_attempt_latency_ms": { + "p50": 49.938, + "p95": 192.584, + "p99": 204.952 + }, + "successful_latency_ms": { + "p50": 49.17, + "p95": 191.682, + "p99": 201.502 + }, + "instances": [ + "87e7909e-5d06-4d0e-9314-5bdc86b2f617", + "f9491c25-70ac-4b45-935d-f742415b6366" + ], + "seconds": { + "0": { + "success": 285, + "error": 0 + }, + "1": { + "success": 167, + "error": 0 + }, + "2": { + "success": 149, + "error": 0 + }, + "3": { + "success": 22, + "error": 23 + }, + "4": { + "success": 135, + "error": 0 + }, + "5": { + "success": 64, + "error": 0 + }, + "6": { + "success": 48, + "error": 0 + }, + "7": { + "success": 96, + "error": 0 + }, + "8": { + "success": 216, + "error": 0 + }, + "9": { + "success": 149, + "error": 0 + }, + "10": { + "success": 41, + "error": 0 + }, + "11": { + "success": 72, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries", + "first_success_after_action_seconds": { + "read": 0.002, + "write": 0.004 + }, + "stopped_container": "4856ec40e6db", + "stopped_instance": "87e7909e-5d06-4d0e-9314-5bdc86b2f617", + "exit_code": 137, + "all_acknowledged_messages_replayed": 1158, + "failure_started_at_load_second": 3, + "service_after_second_5": "reads/writes continue", + "note": "hard SIGKILL, no automatic retries in load, replay confirmations after failure" + }, + { + "duration_seconds": 12, + "elapsed_seconds": 12.054, + "concurrency": 8, + "successes": { + "write": 1312, + "read": 326 + }, + "errors": { + "connection": 16, + "503": 7 + }, + "rps": 135.894, + "all_attempt_latency_ms": { + "p50": 21.79, + "p95": 180.369, + "p99": 211.697 + }, + "successful_latency_ms": { + "p50": 21.606, + "p95": 179.273, + "p99": 203.16 + }, + "instances": [ + "26994c32-3a09-4940-b937-2ccdb77cb027", + "f9491c25-70ac-4b45-935d-f742415b6366" + ], + "seconds": { + "0": { + "success": 315, + "error": 0 + }, + "1": { + "success": 130, + "error": 0 + }, + "2": { + "success": 114, + "error": 8 + }, + "3": { + "success": 15, + "error": 15 + }, + "4": { + "success": 158, + "error": 0 + }, + "5": { + "success": 54, + "error": 0 + }, + "6": { + "success": 100, + "error": 0 + }, + "7": { + "success": 232, + "error": 0 + }, + "8": { + "success": 200, + "error": 0 + }, + "9": { + "success": 64, + "error": 0 + }, + "10": { + "success": 48, + "error": 0 + }, + "11": { + "success": 208, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries", + "first_success_after_action_seconds": { + "read": 0.076, + "write": 0.078 + }, + "stopped_container": "6205d0db9981", + "stopped_instance": "f9491c25-70ac-4b45-935d-f742415b6366", + "exit_code": 137, + "all_acknowledged_messages_replayed": 1312, + "failure_started_at_load_second": 3, + "service_after_second_5": "reads/writes continue", + "note": "hard SIGKILL, no automatic retries in load, replay confirmations after failure" + } +] diff --git a/evidence/lab3-final-callbacks.txt b/evidence/lab3-final-callbacks.txt new file mode 100644 index 00000000..b737ca5a --- /dev/null +++ b/evidence/lab3-final-callbacks.txt @@ -0,0 +1,5 @@ +PASS: стартовый администратор создан; повторные callbacks не дублируют и не меняют пароль +PASS: production не принимает старый пароль администратора при изменённой конфигурации +PASS: администратор входит через Basic, читает профиль через Bearer и выходит +PASS: callback не повышает права обычного пользователя с совпавшим username +PASS: ограничения username/password сохранены; is_admin нельзя передать при регистрации diff --git a/evidence/lab3-final-checks.txt b/evidence/lab3-final-checks.txt new file mode 100644 index 00000000..cf9348a8 --- /dev/null +++ b/evidence/lab3-final-checks.txt @@ -0,0 +1,12 @@ +smoke PASS +lab3 PASS +regressions PASS +dependencies PASS +database PASS +passwords PASS +settings PASS +callbacks PASS +idempotency_db PASS +readiness PASS +error_headers PASS +PASS: 2 API, internal ports, CPU/RAM limits on all containers diff --git a/evidence/lab3-final-database.txt b/evidence/lab3-final-database.txt new file mode 100644 index 00000000..4da36580 --- /dev/null +++ b/evidence/lab3-final-database.txt @@ -0,0 +1,13 @@ +PASS: два повторных запуска миграций не изменили данные; версия 006 одна +PASS: ошибка участника откатила INSERT чата и участников +Сообщений в исследуемом чате: 10000 +Limit (cost=0.42..202.30 rows=51 width=97) (actual time=0.004..0.009 rows=51 loops=1) + Buffers: shared hit=6 + -> Index Scan using messages_history_idx on messages (cost=0.42..301.27 rows=76 width=97) (actual time=0.003..0.007 rows=51 loops=1) + Index Cond: ((chat_id = '1342df5c-78a8-458a-877c-242bf6acf770'::uuid) AND (ROW(created_at, id) > ROW('2026-11-06 15:36:12.189401+00'::timestamp with time zone, 'b657a982-2303-4a6c-ade9-61a9c5ec3926'::uuid))) + Buffers: shared hit=6 +Planning: + Buffers: shared hit=8 +Planning Time: 0.033 ms +Execution Time: 0.018 ms +PASS: индекс истории используется для глубокой страницы из 10000 сообщений diff --git a/evidence/lab3-final-dependencies.txt b/evidence/lab3-final-dependencies.txt new file mode 100644 index 00000000..ce7f460f --- /dev/null +++ b/evidence/lab3-final-dependencies.txt @@ -0,0 +1,25 @@ +PASS: сессия хранится в Redis с TTL; чтение не продлевает срок +PASS: профиль кэшируется с TTL<=60; повторный GET даёт cache hit; потеря ключа восполняется +PASS: отсутствующая сессия не восстанавливается из профиля/БД; Redis — источник истины +PASS: Redis выключен; live=200, ready=503; проверка сессий недоступна, доступ не выдаётся +PASS: сессия сохранилась после перезапуска Redis +PASS: logout при отказе Redis возвращает 503; успешный отзыв переживает AOF-рестарт и не даёт доступ +PASS: PostgreSQL выключен; live=200, ready=503, чаты=503; действующая сессия и прогретый профиль доступны в Redis +PASS: после восстановления БД прежняя сессия снова работает через HAProxy + Container mtusi2026lab1-redis-1 Stopping + Container mtusi2026lab1-redis-1 Stopped + Container mtusi2026lab1-redis-1 Starting + Container mtusi2026lab1-redis-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-redis-1 Restarting + Container mtusi2026lab1-redis-1 Started + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-postgres-1 Stopping + Container mtusi2026lab1-postgres-1 Stopped + Container mtusi2026lab1-postgres-1 Starting + Container mtusi2026lab1-postgres-1 Started + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy diff --git a/evidence/lab3-final-error_headers.txt b/evidence/lab3-final-error_headers.txt new file mode 100644 index 00000000..507557ff --- /dev/null +++ b/evidence/lab3-final-error_headers.txt @@ -0,0 +1,49 @@ +PASS: 500 has X-Request-Id/X-Instance-Id and hides internal exception details +2026-11-06 15:36:22,186 ERROR src.main: Необработанная ошибка запроса +Traceback (most recent call last): + File "/app/src/main.py", line 37, in add_request_id + response = await call_next(request) + ^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.13/site-packages/starlette/middleware/base.py", line 173, in call_next + raise app_exc from app_exc.__cause__ or app_exc.__context__ + File "/usr/local/lib/python3.13/site-packages/starlette/middleware/base.py", line 149, in coro + await self.app(scope, receive_or_disconnect, send_no_error) + File "/app/src/core/request_limits.py", line 34, in __call__ + await self.app(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/starlette/middleware/exceptions.py", line 63, in __call__ + await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app + raise exc + File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "/usr/local/lib/python3.13/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__ + await self.app(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/starlette/routing.py", line 676, in __call__ + await self.middleware_stack(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 2734, in app + await route.handle(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 1281, in handle + await super().handle(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/starlette/routing.py", line 282, in handle + await self.app(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 158, in app + await wrap_app_handling_exceptions(app, request)(scope, receive, send) + File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app + raise exc + File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app + await app(scope, receive, sender) + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 144, in app + response = await f(request) + ^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 706, in app + raw_response = await run_endpoint_function( + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ...<3 lines>... + ) + ^ + File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 352, in run_endpoint_function + return await dependant.call(**values) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "", line 13, in unexpected +RuntimeError: audit-internal-detail +2026-11-06 15:36:22,190 INFO src.main: ид_запроса=010678ea-dc01-435e-8d0f-e15d6c4b683b метод=GET путь='/_audit_unexpected_error' статус=500 длительность_мс=84.165 diff --git a/evidence/lab3-final-idempotency_db.txt b/evidence/lab3-final-idempotency_db.txt new file mode 100644 index 00000000..b913f834 --- /dev/null +++ b/evidence/lab3-final-idempotency_db.txt @@ -0,0 +1 @@ +PASS: rollback removes both message/key; committed result replays; expired key can be reused diff --git a/evidence/lab3-final-lab3.txt b/evidence/lab3-final-lab3.txt new file mode 100644 index 00000000..fa88adb3 --- /dev/null +++ b/evidence/lab3-final-lab3.txt @@ -0,0 +1,10 @@ +{ + "parallel_repeats": 16, + "instances": [ + "925b9202-4fd4-4a5b-b7fb-8c8e873b9b27", + "bdd60190-5e10-49b9-81b2-09ea9c656ad4" + ], + "messages_created": 1, + "checks": "normalization, conflict, key scope, invalid keys, access, logout, headers", + "result": "PASS" +} diff --git a/evidence/lab3-final-passwords.txt b/evidence/lab3-final-passwords.txt new file mode 100644 index 00000000..48275b5a --- /dev/null +++ b/evidence/lab3-final-passwords.txt @@ -0,0 +1,2 @@ +PASS: только Argon2id, случайная соль, Unicode 128 символов, неверный пароль +PASS: повторный вход с Argon2id; сессии находятся в Redis; хеш пароля не изменяется diff --git a/evidence/lab3-final-readiness.txt b/evidence/lab3-final-readiness.txt new file mode 100644 index 00000000..6de23eb0 --- /dev/null +++ b/evidence/lab3-final-readiness.txt @@ -0,0 +1 @@ +PASS: bounded readiness response, one pending probe, recovery after cancellation diff --git a/evidence/lab3-final-regressions.txt b/evidence/lab3-final-regressions.txt new file mode 100644 index 00000000..7d08edc9 --- /dev/null +++ b/evidence/lab3-final-regressions.txt @@ -0,0 +1,5 @@ +PASS: обязательные пробельные строки, malformed JSON, типы/лишние поля, MIME 415, Basic без тела +PASS: 101 существующий участник отклонён; курсор сохраняет микросекунды и UUID-порядок, привязан к чату +PASS: исходный текст и его длина сохраняются без strip +PASS: null/повреждённый/чужой профиль заменяется из PostgreSQL с TTL; сессия работает +PASS: Swagger объявляет Basic для входа и Bearer для защищённых методов diff --git a/evidence/lab3-final-settings.txt b/evidence/lab3-final-settings.txt new file mode 100644 index 00000000..77efda40 --- /dev/null +++ b/evidence/lab3-final-settings.txt @@ -0,0 +1,3 @@ +PASS: AppSettings читает .env, окружение имеет приоритет, URL скрыт в repr +PASS: Pydantic отклоняет неверные TTL, pool, timeout и недостаточную длину токена +PASS: production отвергает учебный пароль; ошибки конфигурации скрывают входные значения diff --git a/evidence/lab3-final-smoke.txt b/evidence/lab3-final-smoke.txt new file mode 100644 index 00000000..fc20f9dd --- /dev/null +++ b/evidence/lab3-final-smoke.txt @@ -0,0 +1 @@ +PASS: lab3 public API scenario; infrastructure and grading evidence remain separate. diff --git a/evidence/lab3-idempotency.json b/evidence/lab3-idempotency.json new file mode 100644 index 00000000..c3fac93f --- /dev/null +++ b/evidence/lab3-idempotency.json @@ -0,0 +1,10 @@ +{ + "parallel_repeats": 16, + "instances": [ + "86f94883-e31a-46ab-ac30-e6438c13876c", + "cea74827-4fdc-4fa8-be9f-3ab1f3fc4276" + ], + "messages_created": 1, + "checks": "normalization, conflict, key scope, invalid keys, access, logout, headers", + "result": "PASS" +} diff --git a/evidence/lab3-infrastructure.json b/evidence/lab3-infrastructure.json new file mode 100644 index 00000000..73a5439f --- /dev/null +++ b/evidence/lab3-infrastructure.json @@ -0,0 +1,151 @@ +{ + "api": [ + { + "id": "e377f47f1834", + "name": "/mtusi2026lab1-api-17", + "image_id": "sha256:147950503b4456e0cb3290b9af20fea4e730c6168a69ae3ddb6a77600d2e6676", + "status": "running", + "exit_code": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "ports": { + "8080/tcp": null + }, + "read_only_root": true + }, + { + "id": "ccd508b0d9c6", + "name": "/mtusi2026lab1-api-18", + "image_id": "sha256:147950503b4456e0cb3290b9af20fea4e730c6168a69ae3ddb6a77600d2e6676", + "status": "running", + "exit_code": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "ports": { + "8080/tcp": null + }, + "read_only_root": true + } + ], + "lb": [ + { + "id": "279562a6ff00", + "name": "/mtusi2026lab1-lb-1", + "image_id": "sha256:e3229153dd6429fc71f8a9a1f1ccbf8dab6962422d7043c81e84dd6a075e90ee", + "status": "running", + "exit_code": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + }, + "read_only_root": true + } + ], + "postgres": [ + { + "id": "ec54dbe8e8dd", + "name": "/mtusi2026lab1-postgres-1", + "image_id": "sha256:557fea37a744d5f4c8faab304b0a90858b53ab119735a88c131fd19dab802f36", + "status": "running", + "exit_code": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "ports": { + "5432/tcp": null + }, + "read_only_root": false + } + ], + "redis": [ + { + "id": "f71bc2ef45c8", + "name": "/mtusi2026lab1-redis-1", + "image_id": "sha256:fbdbaea47b9ae4ecc2082ecdb4e1cea81e32176ffb1dcf643d422ad07427e5d9", + "status": "running", + "exit_code": 0, + "cpu_limit": 0.25, + "memory_limit_bytes": 134217728, + "ports": { + "6379/tcp": null + }, + "read_only_root": false + } + ], + "migration": [ + { + "id": "5a2ccb851cbb", + "name": "/mtusi2026lab1-migration-1", + "image_id": "sha256:147950503b4456e0cb3290b9af20fea4e730c6168a69ae3ddb6a77600d2e6676", + "status": "exited", + "exit_code": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "ports": {}, + "read_only_root": false + } + ], + "post_test_usage": [ + { + "BlockIO": "0B / 0B", + "CPUPerc": "18.35%", + "Container": "e377f47f183418456b39f816013726755dd3e3be1259e2d84b168e3bfbc87745", + "ID": "e377f47f1834", + "MemPerc": "32.11%", + "MemUsage": "82.2MiB / 256MiB", + "Name": "mtusi2026lab1-api-17", + "NetIO": "597kB / 1.95MB", + "PIDs": "10" + }, + { + "BlockIO": "0B / 0B", + "CPUPerc": "1.05%", + "Container": "ccd508b0d9c695a3527803368fb69ed25eca9451b33b9cd0fb29da25c4ce088d", + "ID": "ccd508b0d9c6", + "MemPerc": "24.83%", + "MemUsage": "63.55MiB / 256MiB", + "Name": "mtusi2026lab1-api-18", + "NetIO": "313kB / 386kB", + "PIDs": "6" + }, + { + "BlockIO": "0B / 0B", + "CPUPerc": "0.33%", + "Container": "279562a6ff003739c3e1df53cb93a32ad6a6f93b9ace2559ad832d67b49bf301", + "ID": "279562a6ff00", + "MemPerc": "12.89%", + "MemUsage": "16.5MiB / 128MiB", + "Name": "mtusi2026lab1-lb-1", + "NetIO": "136MB / 135MB", + "PIDs": "11" + }, + { + "BlockIO": "0B / 254kB", + "CPUPerc": "0.33%", + "Container": "ec54dbe8e8dd8aa9d107c7cd7d667f5bdfbfa3ea78b1549df0e7792c5dac8ee5", + "ID": "ec54dbe8e8dd", + "MemPerc": "18.13%", + "MemUsage": "92.84MiB / 512MiB", + "Name": "mtusi2026lab1-postgres-1", + "NetIO": "1.62MB / 370kB", + "PIDs": "22" + }, + { + "BlockIO": "0B / 0B", + "CPUPerc": "0.56%", + "Container": "f71bc2ef45c8833c96dadd85d138493ec8e2bf88f79ac09337d696ea6f8a76f7", + "ID": "f71bc2ef45c8", + "MemPerc": "7.57%", + "MemUsage": "9.684MiB / 128MiB", + "Name": "mtusi2026lab1-redis-1", + "NetIO": "20.5kB / 11kB", + "PIDs": "6" + } + ], + "note": "CPU/memory usage snapshot after tests, not a peak load measurement; cgroup CPU deltas under load are in research results." +} diff --git a/evidence/lab3-lab3.txt b/evidence/lab3-lab3.txt new file mode 100644 index 00000000..fc1a1095 --- /dev/null +++ b/evidence/lab3-lab3.txt @@ -0,0 +1,10 @@ +{ + "parallel_repeats": 16, + "instances": [ + "a916210d-1bd0-4086-9e21-7c13158a9ee0", + "f9491c25-70ac-4b45-935d-f742415b6366" + ], + "messages_created": 1, + "checks": "normalization, conflict, key scope, invalid keys, access, logout, headers", + "result": "PASS" +} diff --git a/evidence/lab3-original-research-run.txt b/evidence/lab3-original-research-run.txt new file mode 100644 index 00000000..1159e632 --- /dev/null +++ b/evidence/lab3-original-research-run.txt @@ -0,0 +1,812 @@ +[1/18] {'series': 'growing', 'replicas': 4, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 32, 'repeat': 0} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Recreate + Container mtusi2026lab1-postgres-1 Recreated + Container mtusi2026lab1-migration-1 Recreate + Container mtusi2026lab1-migration-1 Recreated + Container mtusi2026lab1-api-6 Creating + Container mtusi2026lab1-api-4 Recreate + Container mtusi2026lab1-api-3 Recreate + Container mtusi2026lab1-api-5 Creating + Container mtusi2026lab1-api-5 Created + Container mtusi2026lab1-api-6 Created + Container mtusi2026lab1-api-3 Recreated + Container mtusi2026lab1-api-4 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Starting + Container mtusi2026lab1-postgres-1 Started + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-3 Starting + Container mtusi2026lab1-api-3 Started + Container mtusi2026lab1-api-6 Starting + Container mtusi2026lab1-api-6 Started + Container mtusi2026lab1-api-4 Starting + Container mtusi2026lab1-api-4 Started + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-3 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-4 Waiting + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-3 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-4 Healthy + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-3 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-4 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-3 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-4 Healthy +RPS 213.789 errors {} p95 286.24 +[2/18] {'series': 'fixed', 'replicas': 1, 'cpus': 2.0, 'memory': '1024m', 'db': 0.25, 'concurrency': 32, 'repeat': 1} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-3 Stopping + Container mtusi2026lab1-api-6 Stopping + Container mtusi2026lab1-api-4 Stopping + Container mtusi2026lab1-api-3 Stopped + Container mtusi2026lab1-api-3 Removing + Container mtusi2026lab1-api-3 Removed + Container mtusi2026lab1-api-6 Stopped + Container mtusi2026lab1-api-6 Removing + Container mtusi2026lab1-api-4 Stopped + Container mtusi2026lab1-api-4 Removing + Container mtusi2026lab1-api-6 Removed + Container mtusi2026lab1-api-4 Removed + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy +RPS 416.231 errors {'503': 16} p95 117.54 +[3/18] {'series': 'growing', 'replicas': 2, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 32, 'repeat': 1} + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-api-6 Creating + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-6 Created + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-6 Starting + Container mtusi2026lab1-api-6 Started + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-5 Healthy +RPS 428.551 errors {'503': 10} p95 173.422 +[4/18] {'series': 'growing', 'replicas': 1, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 32, 'repeat': 1} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-5 Running + Container mtusi2026lab1-api-6 Stopping + Container mtusi2026lab1-api-6 Stopped + Container mtusi2026lab1-api-6 Removing + Container mtusi2026lab1-api-6 Removed + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-lb-1 Healthy +RPS 306.81 errors {'503': 26} p95 260.156 +[5/18] {'series': 'fixed', 'replicas': 2, 'cpus': 1.0, 'memory': '512m', 'db': 0.25, 'concurrency': 32, 'repeat': 1} + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-api-6 Creating + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-6 Created + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-6 Starting + Container mtusi2026lab1-api-6 Started + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-6 Healthy +RPS 531.374 errors {'503': 56} p95 136.405 +[6/18] {'series': 'fixed', 'replicas': 4, 'cpus': 0.5, 'memory': '256m', 'db': 0.25, 'concurrency': 32, 'repeat': 0} + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-api-8 Creating + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-7 Creating + Container mtusi2026lab1-api-6 Recreate + Container mtusi2026lab1-api-7 Created + Container mtusi2026lab1-api-8 Created + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-api-6 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-6 Starting + Container mtusi2026lab1-api-6 Started + Container mtusi2026lab1-api-8 Starting + Container mtusi2026lab1-api-8 Started + Container mtusi2026lab1-api-7 Starting + Container mtusi2026lab1-api-7 Started + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-5 Healthy +RPS 312.319 errors {'503': 3} p95 345.099 +[7/18] {'series': 'growing', 'replicas': 4, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 32, 'repeat': 1} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-6 Recreate + Container mtusi2026lab1-api-7 Recreate + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-8 Recreate + Container mtusi2026lab1-api-8 Recreated + Container mtusi2026lab1-api-7 Recreated + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-api-6 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-8 Starting + Container mtusi2026lab1-api-8 Started + Container mtusi2026lab1-api-6 Starting + Container mtusi2026lab1-api-6 Started + Container mtusi2026lab1-api-7 Starting + Container mtusi2026lab1-api-7 Started + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-5 Healthy +RPS 199.765 errors {} p95 390.46 +[8/18] {'series': 'growing', 'replicas': 2, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 32, 'repeat': 0} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-5 Running + Container mtusi2026lab1-api-6 Running + Container mtusi2026lab1-api-8 Stopping + Container mtusi2026lab1-api-7 Stopping + Container mtusi2026lab1-api-8 Stopped + Container mtusi2026lab1-api-8 Removing + Container mtusi2026lab1-api-7 Stopped + Container mtusi2026lab1-api-7 Removing + Container mtusi2026lab1-api-8 Removed + Container mtusi2026lab1-api-7 Removed + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-5 Healthy +RPS 411.537 errors {'503': 16} p95 201.141 +[9/18] {'series': 'fixed', 'replicas': 2, 'cpus': 1.0, 'memory': '512m', 'db': 0.25, 'concurrency': 32, 'repeat': 0} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-6 Recreate + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-6 Recreated + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-6 Starting + Container mtusi2026lab1-api-6 Started + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-6 Healthy +RPS 294.201 errors {'503': 12} p95 235.511 +[10/18] {'series': 'growing', 'replicas': 1, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 32, 'repeat': 0} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-6 Stopping + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-6 Stopped + Container mtusi2026lab1-api-6 Removing + Container mtusi2026lab1-api-6 Removed + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-postgres-1 Healthy +RPS 246.411 errors {'503': 39} p95 213.561 +[11/18] {'series': 'fixed', 'replicas': 1, 'cpus': 2.0, 'memory': '1024m', 'db': 0.25, 'concurrency': 32, 'repeat': 0} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-lb-1 Healthy +RPS 246.748 errors {'503': 44} p95 270.373 +[12/18] {'series': 'fixed', 'replicas': 4, 'cpus': 0.5, 'memory': '256m', 'db': 0.25, 'concurrency': 32, 'repeat': 1} + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-api-6 Creating + Container mtusi2026lab1-api-8 Creating + Container mtusi2026lab1-api-7 Creating + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-8 Created + Container mtusi2026lab1-api-6 Created + Container mtusi2026lab1-api-7 Created + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-6 Starting + Container mtusi2026lab1-api-6 Started + Container mtusi2026lab1-api-7 Starting + Container mtusi2026lab1-api-7 Started + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-8 Starting + Container mtusi2026lab1-api-8 Started + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-8 Healthy +RPS 251.44 errors {} p95 300.114 +[13/18] {'series': 'saturation', 'replicas': 4, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 8, 'repeat': 0} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-6 Recreate + Container mtusi2026lab1-api-7 Recreate + Container mtusi2026lab1-api-8 Recreate + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-api-6 Recreated + Container mtusi2026lab1-api-7 Recreated + Container mtusi2026lab1-api-8 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-8 Starting + Container mtusi2026lab1-api-8 Started + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-7 Starting + Container mtusi2026lab1-api-7 Started + Container mtusi2026lab1-api-6 Starting + Container mtusi2026lab1-api-6 Started + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy +RPS 137.006 errors {'503': 2} p95 108.973 +[14/18] {'series': 'saturation', 'replicas': 4, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 64, 'repeat': 0} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-5 Running + Container mtusi2026lab1-api-6 Running + Container mtusi2026lab1-api-7 Running + Container mtusi2026lab1-api-8 Running + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy +RPS 188.797 errors {'503': 8} p95 707.871 +[15/18] {'series': 'improved-db', 'replicas': 4, 'cpus': 1, 'memory': '256m', 'db': 1, 'concurrency': 32, 'repeat': 0} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Recreate + Container mtusi2026lab1-postgres-1 Recreated + Container mtusi2026lab1-api-5 Running + Container mtusi2026lab1-api-6 Running + Container mtusi2026lab1-api-7 Running + Container mtusi2026lab1-api-8 Running + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Starting + Container mtusi2026lab1-postgres-1 Started + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy +RPS 341.228 errors {} p95 312.029 +[16/18] {'series': 'saturation', 'replicas': 4, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 8, 'repeat': 1} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Recreate + Container mtusi2026lab1-postgres-1 Recreated + Container mtusi2026lab1-api-5 Running + Container mtusi2026lab1-api-6 Running + Container mtusi2026lab1-api-7 Running + Container mtusi2026lab1-api-8 Running + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Starting + Container mtusi2026lab1-postgres-1 Started + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy +RPS 182.516 errors {} p95 117.513 +[17/18] {'series': 'saturation', 'replicas': 4, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 64, 'repeat': 1} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-5 Running + Container mtusi2026lab1-api-6 Running + Container mtusi2026lab1-api-7 Running + Container mtusi2026lab1-api-8 Running + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy +RPS 181.203 errors {'503': 5} p95 910.173 +[18/18] {'series': 'improved-db', 'replicas': 4, 'cpus': 1, 'memory': '256m', 'db': 1, 'concurrency': 32, 'repeat': 1} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Recreate + Container mtusi2026lab1-postgres-1 Recreated + Container mtusi2026lab1-api-5 Running + Container mtusi2026lab1-api-6 Running + Container mtusi2026lab1-api-7 Running + Container mtusi2026lab1-api-8 Running + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Starting + Container mtusi2026lab1-postgres-1 Started + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-7 Waiting + Container mtusi2026lab1-api-6 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-7 Healthy + Container mtusi2026lab1-api-6 Healthy +RPS 390.895 errors {} p95 300.253 +PASS: research series complete; inspect results before drawing conclusions + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-7 Stopping + Container mtusi2026lab1-api-6 Stopping + Container mtusi2026lab1-api-8 Recreate + Container mtusi2026lab1-api-5 Recreate + Container mtusi2026lab1-api-6 Stopped + Container mtusi2026lab1-api-6 Removing + Container mtusi2026lab1-api-7 Stopped + Container mtusi2026lab1-api-7 Removing + Container mtusi2026lab1-api-6 Removed + Container mtusi2026lab1-api-7 Removed + Container mtusi2026lab1-api-8 Recreated + Container mtusi2026lab1-api-5 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-8 Starting + Container mtusi2026lab1-api-8 Started + Container mtusi2026lab1-api-5 Starting + Container mtusi2026lab1-api-5 Started + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy + Container mtusi2026lab1-api-8 Waiting + Container mtusi2026lab1-api-5 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-api-8 Healthy + Container mtusi2026lab1-api-5 Healthy +Default two-replica configuration restored diff --git a/evidence/lab3-persistence.txt b/evidence/lab3-persistence.txt new file mode 100644 index 00000000..749fd29b --- /dev/null +++ b/evidence/lab3-persistence.txt @@ -0,0 +1,2 @@ +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/lab3-production.txt b/evidence/lab3-production.txt new file mode 100644 index 00000000..5db4d294 --- /dev/null +++ b/evidence/lab3-production.txt @@ -0,0 +1,6 @@ +PASS: реальный chunked=413, два Authorization=401, no-store; 4000 emoji в escaped JSON допустимы +PASS: реальное незавершённое тело получает 408; health работает во время ожидания +PASS: SQL-пагинация 13 чатов по 3; курсор принадлежит пользователю, чужие чаты скрыты +PASS: пароль с Unicode, пробелами, двоеточием и NUL не усекается +PASS: независимые токены, конкурентные logout/GET, уникальные request_id +PASS: типы/диапазон курсора, Unicode, размер/формат JSON и повреждённый Redis diff --git a/evidence/lab3-public-artifacts.json b/evidence/lab3-public-artifacts.json new file mode 100644 index 00000000..7a64e9ce --- /dev/null +++ b/evidence/lab3-public-artifacts.json @@ -0,0 +1,7 @@ +{ + "contracts/openapi.json": "9c3787e5d08a60c59ae67eeb429e9d75fbf134992a4e1f0954e926db49e111be", + "tests/client.py": "8d50976fc7c7bbb81e88a152f613c61ab25eaf53dba33c6a9dfab19f868d546d", + "tests/smoke.py": "52ac38eb343ff7d43e7543588e1da58ca06c9fce74b2b0d0bf0e4982bc23c1db", + "tests/resilience.py": "1f96663a174b3978d24eff66f2741f5f8c9b788d3242261d37a972720c52788b", + "tests/load.py": "6d3511ea719c7a7e841083e73d435c86dcbfd9f4e5c2a07d62eb9614b01d9933" +} diff --git a/evidence/lab3-public-failover.txt b/evidence/lab3-public-failover.txt new file mode 100644 index 00000000..3ece33b8 --- /dev/null +++ b/evidence/lab3-public-failover.txt @@ -0,0 +1,3 @@ +Executing explicit failover hook; hook output suppressed to avoid leaking secrets. +{"observed_instances_before": 2, "successful_writes": 119, "failed_attempts": 2, "first_recovery_seconds": 6.634} +PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. diff --git a/evidence/lab3-quality.txt b/evidence/lab3-quality.txt new file mode 100644 index 00000000..5df37e93 --- /dev/null +++ b/evidence/lab3-quality.txt @@ -0,0 +1,8 @@ +.venv/bin/python scripts/check_contract.py +PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. +.venv/bin/python scripts/validate_openapi.py +PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested. +.venv/bin/python -m ruff check src +All checks passed! +.venv/bin/python -m ruff format --check src +48 files already formatted diff --git a/evidence/lab3-readiness-budget.txt b/evidence/lab3-readiness-budget.txt new file mode 100644 index 00000000..6de23eb0 --- /dev/null +++ b/evidence/lab3-readiness-budget.txt @@ -0,0 +1 @@ +PASS: bounded readiness response, one pending probe, recovery after cancellation diff --git a/evidence/lab3-regressions.txt b/evidence/lab3-regressions.txt new file mode 100644 index 00000000..7d08edc9 --- /dev/null +++ b/evidence/lab3-regressions.txt @@ -0,0 +1,5 @@ +PASS: обязательные пробельные строки, malformed JSON, типы/лишние поля, MIME 415, Basic без тела +PASS: 101 существующий участник отклонён; курсор сохраняет микросекунды и UUID-порядок, привязан к чату +PASS: исходный текст и его длина сохраняются без strip +PASS: null/повреждённый/чужой профиль заменяется из PostgreSQL с TTL; сессия работает +PASS: Swagger объявляет Basic для входа и Bearer для защищённых методов diff --git a/evidence/lab3-research-plots.txt b/evidence/lab3-research-plots.txt new file mode 100644 index 00000000..50444c17 --- /dev/null +++ b/evidence/lab3-research-plots.txt @@ -0,0 +1 @@ +Saved scaling.png/svg and bottleneck.png/svg diff --git a/evidence/lab3-research-run.txt b/evidence/lab3-research-run.txt new file mode 100644 index 00000000..b6cc037c --- /dev/null +++ b/evidence/lab3-research-run.txt @@ -0,0 +1,145 @@ +[1/2] {'series': 'growing', 'replicas': 4, 'cpus': 1, 'memory': '256m', 'db': 0.25, 'concurrency': 32, 'repeat': 0} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Recreate + Container mtusi2026lab1-postgres-1 Recreated + Container mtusi2026lab1-api-17 Recreate + Container mtusi2026lab1-api-18 Recreate + Container mtusi2026lab1-api-20 Creating + Container mtusi2026lab1-api-19 Creating + Container mtusi2026lab1-api-19 Created + Container mtusi2026lab1-api-20 Created + Container mtusi2026lab1-api-18 Recreated + Container mtusi2026lab1-api-17 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Starting + Container mtusi2026lab1-postgres-1 Started + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-20 Starting + Container mtusi2026lab1-api-20 Started + Container mtusi2026lab1-api-18 Starting + Container mtusi2026lab1-api-18 Started + Container mtusi2026lab1-api-19 Starting + Container mtusi2026lab1-api-19 Started + Container mtusi2026lab1-api-17 Starting + Container mtusi2026lab1-api-17 Started + Container mtusi2026lab1-api-20 Waiting + Container mtusi2026lab1-api-18 Waiting + Container mtusi2026lab1-api-19 Waiting + Container mtusi2026lab1-api-17 Waiting + Container mtusi2026lab1-api-20 Healthy + Container mtusi2026lab1-api-18 Healthy + Container mtusi2026lab1-api-19 Healthy + Container mtusi2026lab1-api-17 Healthy + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-20 Waiting + Container mtusi2026lab1-api-18 Waiting + Container mtusi2026lab1-api-19 Waiting + Container mtusi2026lab1-api-17 Waiting + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-api-20 Healthy + Container mtusi2026lab1-api-18 Healthy + Container mtusi2026lab1-api-19 Healthy + Container mtusi2026lab1-api-17 Healthy +RPS 198.697 errors {} p95 302.563 +[2/2] {'series': 'improved-db', 'replicas': 4, 'cpus': 1, 'memory': '256m', 'db': 1, 'concurrency': 32, 'repeat': 0} + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Recreate + Container mtusi2026lab1-postgres-1 Recreated + Container mtusi2026lab1-api-17 Running + Container mtusi2026lab1-api-18 Running + Container mtusi2026lab1-api-19 Running + Container mtusi2026lab1-api-20 Running + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Starting + Container mtusi2026lab1-postgres-1 Started + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-20 Waiting + Container mtusi2026lab1-api-18 Waiting + Container mtusi2026lab1-api-19 Waiting + Container mtusi2026lab1-api-17 Waiting + Container mtusi2026lab1-api-20 Healthy + Container mtusi2026lab1-api-18 Healthy + Container mtusi2026lab1-api-19 Healthy + Container mtusi2026lab1-api-17 Healthy + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-20 Waiting + Container mtusi2026lab1-api-18 Waiting + Container mtusi2026lab1-api-19 Waiting + Container mtusi2026lab1-api-17 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-api-20 Healthy + Container mtusi2026lab1-api-18 Healthy + Container mtusi2026lab1-api-19 Healthy + Container mtusi2026lab1-api-17 Healthy +RPS 590.851 errors {'503': 10} p95 169.569 +PASS: research series complete; inspect results before drawing conclusions + Container mtusi2026lab1-redis-1 Running + Container mtusi2026lab1-postgres-1 Running + Container mtusi2026lab1-api-20 Recreate + Container mtusi2026lab1-api-17 Stopping + Container mtusi2026lab1-api-18 Recreate + Container mtusi2026lab1-api-19 Stopping + Container mtusi2026lab1-api-17 Stopped + Container mtusi2026lab1-api-17 Removing + Container mtusi2026lab1-api-19 Stopped + Container mtusi2026lab1-api-19 Removing + Container mtusi2026lab1-api-17 Removed + Container mtusi2026lab1-api-19 Removed + Container mtusi2026lab1-api-18 Recreated + Container mtusi2026lab1-api-20 Recreated + Container mtusi2026lab1-lb-1 Running + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-migration-1 Starting + Container mtusi2026lab1-migration-1 Started + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-api-20 Starting + Container mtusi2026lab1-api-20 Started + Container mtusi2026lab1-api-18 Starting + Container mtusi2026lab1-api-18 Started + Container mtusi2026lab1-api-20 Waiting + Container mtusi2026lab1-api-18 Waiting + Container mtusi2026lab1-api-20 Healthy + Container mtusi2026lab1-api-18 Healthy + Container mtusi2026lab1-migration-1 Waiting + Container mtusi2026lab1-api-20 Waiting + Container mtusi2026lab1-api-18 Waiting + Container mtusi2026lab1-lb-1 Waiting + Container mtusi2026lab1-postgres-1 Waiting + Container mtusi2026lab1-redis-1 Waiting + Container mtusi2026lab1-migration-1 Exited + Container mtusi2026lab1-redis-1 Healthy + Container mtusi2026lab1-postgres-1 Healthy + Container mtusi2026lab1-lb-1 Healthy + Container mtusi2026lab1-api-20 Healthy + Container mtusi2026lab1-api-18 Healthy +Default two-replica configuration restored diff --git a/evidence/lab3-research/README.md b/evidence/lab3-research/README.md new file mode 100644 index 00000000..baa8e35d --- /dev/null +++ b/evidence/lab3-research/README.md @@ -0,0 +1 @@ +Полная исходная серия до аудита (схема 004): 18 измерений, исходные результаты и графики. После исправлений выполнена отдельная короткая проверка в ../lab3-control/. Повтор полной серии для текущей версии: python3 scripts/research-lab3.py --full. diff --git a/evidence/lab3-research/bottleneck.png b/evidence/lab3-research/bottleneck.png new file mode 100644 index 0000000000000000000000000000000000000000..c87d0976aebeb7e61b00877dfb9f580a44e13842 GIT binary patch literal 67191 zcmb5W1yqz_*ETwYfFhs*f^;d;(p}QsD2+5I-3=lQ0#edQmtfG1NDD(F-3&wb(DUE; z>i50toVCus&a;-n!0^Pr@4ff6uYK(aS5=n5xkGXX0)gPj$x5n2AQ zY_|XN4pw_7OSXXM9dHuJZ3kH$X9$Ea?B*ZJ&k3J!k-jy1%Z1KlWLykSzWFdq$J8^0 zbRWnZo6N|VB=tq(t3Z@9)u?r?cUG^DzGos!eLDf8T?z#u)eR{nyK9XjoYP z_3|UiYhUQiYvPdXY^sC9L;RY^hb;1LZf-~L5qhtSlg}Py9{WpXrlz^DI$*dzhY~dv zM0&9;2s0rzmdeimWYThFW259d!tZbm=N2Yr>G2$;h|j&`(X!8TL4GndDLx26+ZE)XR>3Zv< zUsAre=de#vU0uEOGNA&6>M=Tc>w@i6Wq7>{oTjD4cACd#qC7)+PVY(lP_mJqoJy7m zAwnjKSp0CUzt5pwD)Qk_0)vL82o#4nnuI&&t7(^dozv=YMyB^lP8%8o@=Zhff?cGi z%&4Uq3qz~IP`K|Tl$o79PP@WTsV|wW@byG_IKFszQm0VdCZ)HhJa4@8$4aU7j7nFLqn#4I-kW^9>r@hK6!w;HUe`M;l{IL&~%a z>UmhM+f#|s@5vZYiAw}xcV-)smDBmelUWUN1_xEooXNI|v`Qc1P>Sf6;X!2I20)0p z=HhT4anSY6A%CTC9vDOPTKt6jQ@IsBClEhYNJ>EL#Y99r5PU}A*eY!6zB9w%HF1D@ z7t%WD>E#vC`J$LQ$wWL;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k|e(rFFHjNaxXkjIg=huw!SGn2C>$yO)hAoOHU3$WX3q(clUo(vvjTY82 zlgZmQNbIO!Fu}?|NEjoO40d$$~>{);Q#&{ f^?!M8$zRqxST|LorujMod85hi=BHkrxP13Ns^D=| literal 0 HcmV?d00001 diff --git a/evidence/lab3-research/bottleneck.svg b/evidence/lab3-research/bottleneck.svg new file mode 100644 index 00000000..9714bc14 --- /dev/null +++ b/evidence/lab3-research/bottleneck.svg @@ -0,0 +1,1707 @@ + + + + + + + + 2026-11-06T18:37:44.749568 + image/svg+xml + + + Matplotlib v3.11.2, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/evidence/lab3-research/method.json b/evidence/lab3-research/method.json new file mode 100644 index 00000000..abe26b9d --- /dev/null +++ b/evidence/lab3-research/method.json @@ -0,0 +1,22 @@ +{ + "host": "macOS-15.6.1-arm64-arm-64bit-Mach-O", + "architecture": "arm64", + "docker": { + "ServerVersion": "28.5.1", + "NCPU": 10, + "MemTotal": 8218034176, + "KernelVersion": "6.10.14-linuxkit", + "OperatingSystem": "Docker Desktop", + "Architecture": "aarch64" + }, + "method": { + "warmup_seconds": 3, + "repeats": 2, + "duration_seconds": 12, + "concurrency": 32, + "profile": "80% POST unique keys, 20% GET first page limit20, 20 seed messages; fresh chat per run", + "generator": "Python http.client, one persistent connection per thread, closed-loop, no retries", + "limits": "PostgreSQL 0.25 CPU/512MiB baseline, LB 0.5CPU/128MiB, Redis 0.25CPU/128MiB", + "randomization_seed": 20261106 + } +} diff --git a/evidence/lab3-research/results.json b/evidence/lab3-research/results.json new file mode 100644 index 00000000..edbb1d62 --- /dev/null +++ b/evidence/lab3-research/results.json @@ -0,0 +1,2402 @@ +[ + { + "job": { + "series": "growing", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.063, + "concurrency": 32, + "successes": { + "write": 2080, + "read": 499 + }, + "errors": {}, + "rps": 213.789, + "all_attempt_latency_ms": { + "p50": 122.037, + "p95": 286.24, + "p99": 395.01 + }, + "successful_latency_ms": { + "p50": 122.037, + "p95": 286.24, + "p99": 395.01 + }, + "instances": [ + "04368908-e658-4c7c-a470-d062cee00352", + "3a6620ad-9802-4a1a-b0aa-d1a90cdd99a4", + "636c6e03-31dc-4934-b669-44db87b904f2", + "bac9cdaa-b147-4016-9670-982faefc8dfb" + ], + "seconds": { + "0": { + "success": 260, + "error": 0 + }, + "1": { + "success": 214, + "error": 0 + }, + "2": { + "success": 182, + "error": 0 + }, + "3": { + "success": 251, + "error": 0 + }, + "4": { + "success": 189, + "error": 0 + }, + "5": { + "success": 230, + "error": 0 + }, + "6": { + "success": 220, + "error": 0 + }, + "7": { + "success": 194, + "error": 0 + }, + "8": { + "success": 232, + "error": 0 + }, + "9": { + "success": 214, + "error": 0 + }, + "10": { + "success": 205, + "error": 0 + }, + "11": { + "success": 188, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "eb381287fdb4": { + "service": "api", + "cpu_cores_used": 0.5, + "throttled_seconds": 1.971, + "throttled_period_ratio": 0.236 + }, + "f3c20a708dcc": { + "service": "api", + "cpu_cores_used": 0.487, + "throttled_seconds": 1.388, + "throttled_period_ratio": 0.224 + }, + "302a50397bc8": { + "service": "api", + "cpu_cores_used": 0.5, + "throttled_seconds": 2.061, + "throttled_period_ratio": 0.244 + }, + "98cb11ec5f92": { + "service": "api", + "cpu_cores_used": 0.497, + "throttled_seconds": 1.572, + "throttled_period_ratio": 0.232 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.257, + "throttled_seconds": 52.306, + "throttled_period_ratio": 0.945 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.025, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.058, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 2724, + "rollbacks": 2708, + "blocks_read": 49, + "blocks_hit": 162542, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "fixed", + "replicas": 1, + "cpus": 2.0, + "memory": "1024m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.051, + "concurrency": 32, + "successes": { + "write": 4022, + "read": 994 + }, + "errors": { + "503": 16 + }, + "rps": 416.231, + "all_attempt_latency_ms": { + "p50": 72.754, + "p95": 117.54, + "p99": 150.008 + }, + "successful_latency_ms": { + "p50": 72.792, + "p95": 117.618, + "p99": 150.008 + }, + "instances": [ + "2efaca98-1279-42fe-94e7-73d3fc78b131" + ], + "seconds": { + "0": { + "success": 447, + "error": 16 + }, + "1": { + "success": 435, + "error": 0 + }, + "2": { + "success": 417, + "error": 0 + }, + "3": { + "success": 455, + "error": 0 + }, + "4": { + "success": 391, + "error": 0 + }, + "5": { + "success": 439, + "error": 0 + }, + "6": { + "success": 412, + "error": 0 + }, + "7": { + "success": 380, + "error": 0 + }, + "8": { + "success": 403, + "error": 0 + }, + "9": { + "success": 411, + "error": 0 + }, + "10": { + "success": 410, + "error": 0 + }, + "11": { + "success": 416, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "9239e587f690": { + "service": "api", + "cpu_cores_used": 1.169, + "throttled_seconds": 0.006, + "throttled_period_ratio": 0.047 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.144, + "throttled_seconds": 0.874, + "throttled_period_ratio": 0.063 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.017, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.033, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 4864, + "rollbacks": 4859, + "blocks_read": 50, + "blocks_hit": 294514, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "growing", + "replicas": 2, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.073, + "concurrency": 32, + "successes": { + "write": 4151, + "read": 1023 + }, + "errors": { + "503": 10 + }, + "rps": 428.551, + "all_attempt_latency_ms": { + "p50": 63.357, + "p95": 173.422, + "p99": 277.157 + }, + "successful_latency_ms": { + "p50": 63.445, + "p95": 173.456, + "p99": 277.157 + }, + "instances": [ + "4ef328f6-161e-4e5d-a964-c9eab89fca81", + "cf856ee0-31bc-440b-9d20-a2a0832fa756" + ], + "seconds": { + "0": { + "success": 498, + "error": 9 + }, + "1": { + "success": 576, + "error": 0 + }, + "2": { + "success": 438, + "error": 1 + }, + "3": { + "success": 558, + "error": 0 + }, + "4": { + "success": 452, + "error": 0 + }, + "5": { + "success": 400, + "error": 0 + }, + "6": { + "success": 547, + "error": 0 + }, + "7": { + "success": 372, + "error": 0 + }, + "8": { + "success": 285, + "error": 0 + }, + "9": { + "success": 274, + "error": 0 + }, + "10": { + "success": 285, + "error": 0 + }, + "11": { + "success": 489, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "db2a824f2a00": { + "service": "api", + "cpu_cores_used": 0.819, + "throttled_seconds": 1.849, + "throttled_period_ratio": 0.221 + }, + "bd5b0235f27f": { + "service": "api", + "cpu_cores_used": 0.824, + "throttled_seconds": 1.632, + "throttled_period_ratio": 0.233 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.254, + "throttled_seconds": 26.448, + "throttled_period_ratio": 0.89 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.023, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.057, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 5161, + "rollbacks": 5156, + "blocks_read": 39, + "blocks_hit": 370206, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "growing", + "replicas": 1, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.32, + "concurrency": 32, + "successes": { + "write": 3032, + "read": 748 + }, + "errors": { + "503": 26 + }, + "rps": 306.81, + "all_attempt_latency_ms": { + "p50": 77.9, + "p95": 260.156, + "p99": 396.72 + }, + "successful_latency_ms": { + "p50": 78.1, + "p95": 261.031, + "p99": 398.059 + }, + "instances": [ + "4ef328f6-161e-4e5d-a964-c9eab89fca81" + ], + "seconds": { + "0": { + "success": 441, + "error": 26 + }, + "1": { + "success": 381, + "error": 0 + }, + "2": { + "success": 289, + "error": 0 + }, + "3": { + "success": 392, + "error": 0 + }, + "4": { + "success": 317, + "error": 0 + }, + "5": { + "success": 347, + "error": 0 + }, + "6": { + "success": 423, + "error": 0 + }, + "7": { + "success": 234, + "error": 0 + }, + "8": { + "success": 325, + "error": 0 + }, + "9": { + "success": 382, + "error": 0 + }, + "10": { + "success": 156, + "error": 0 + }, + "11": { + "success": 93, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "db2a824f2a00": { + "service": "api", + "cpu_cores_used": 0.95, + "throttled_seconds": 2.99, + "throttled_period_ratio": 0.752 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.174, + "throttled_seconds": 8.365, + "throttled_period_ratio": 0.219 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.017, + "throttled_seconds": 0.072, + "throttled_period_ratio": 0.008 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.029, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 3812, + "rollbacks": 3804, + "blocks_read": 0, + "blocks_hit": 268979, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "fixed", + "replicas": 2, + "cpus": 1.0, + "memory": "512m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.035, + "concurrency": 32, + "successes": { + "write": 5126, + "read": 1269 + }, + "errors": { + "503": 56 + }, + "rps": 531.374, + "all_attempt_latency_ms": { + "p50": 54.171, + "p95": 136.405, + "p99": 176.476 + }, + "successful_latency_ms": { + "p50": 54.417, + "p95": 136.703, + "p99": 176.505 + }, + "instances": [ + "0c2d85cc-ca99-4735-a9ec-a14aa6c272e3", + "692578e2-df33-464f-a411-21153bdeee25" + ], + "seconds": { + "0": { + "success": 620, + "error": 7 + }, + "1": { + "success": 654, + "error": 0 + }, + "2": { + "success": 452, + "error": 14 + }, + "3": { + "success": 624, + "error": 0 + }, + "4": { + "success": 442, + "error": 1 + }, + "5": { + "success": 577, + "error": 7 + }, + "6": { + "success": 554, + "error": 0 + }, + "7": { + "success": 480, + "error": 8 + }, + "8": { + "success": 611, + "error": 0 + }, + "9": { + "success": 659, + "error": 0 + }, + "10": { + "success": 399, + "error": 19 + }, + "11": { + "success": 323, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "1aecf9504651": { + "service": "api", + "cpu_cores_used": 0.916, + "throttled_seconds": 2.349, + "throttled_period_ratio": 0.312 + }, + "b1131b9dcd97": { + "service": "api", + "cpu_cores_used": 0.934, + "throttled_seconds": 2.21, + "throttled_period_ratio": 0.385 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.238, + "throttled_seconds": 13.394, + "throttled_period_ratio": 0.724 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.024, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.06, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 6618, + "rollbacks": 6613, + "blocks_read": 0, + "blocks_hit": 404706, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "fixed", + "replicas": 4, + "cpus": 0.5, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.125, + "concurrency": 32, + "successes": { + "write": 3040, + "read": 747 + }, + "errors": { + "503": 3 + }, + "rps": 312.319, + "all_attempt_latency_ms": { + "p50": 37.504, + "p95": 345.099, + "p99": 468.638 + }, + "successful_latency_ms": { + "p50": 37.371, + "p95": 345.099, + "p99": 468.638 + }, + "instances": [ + "1844a7a1-c409-43c4-a8de-2cd6b1600bef", + "594f8ae5-0189-440d-a505-8d4dd6f7cd39", + "620b03d8-6d6c-40de-9510-a54ba51a2ea0", + "d4c2ec26-eeed-4078-b64f-26fea2a528c8" + ], + "seconds": { + "0": { + "success": 254, + "error": 0 + }, + "1": { + "success": 373, + "error": 0 + }, + "2": { + "success": 320, + "error": 0 + }, + "3": { + "success": 352, + "error": 3 + }, + "4": { + "success": 224, + "error": 0 + }, + "5": { + "success": 355, + "error": 0 + }, + "6": { + "success": 391, + "error": 0 + }, + "7": { + "success": 315, + "error": 0 + }, + "8": { + "success": 291, + "error": 0 + }, + "9": { + "success": 346, + "error": 0 + }, + "10": { + "success": 313, + "error": 0 + }, + "11": { + "success": 253, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "d0e29b2201aa": { + "service": "api", + "cpu_cores_used": 0.436, + "throttled_seconds": 8.563, + "throttled_period_ratio": 0.567 + }, + "0185e1dff3bd": { + "service": "api", + "cpu_cores_used": 0.425, + "throttled_seconds": 6.669, + "throttled_period_ratio": 0.481 + }, + "d16c24c6c953": { + "service": "api", + "cpu_cores_used": 0.443, + "throttled_seconds": 8.619, + "throttled_period_ratio": 0.595 + }, + "c418691b39d2": { + "service": "api", + "cpu_cores_used": 0.437, + "throttled_seconds": 6.958, + "throttled_period_ratio": 0.527 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.211, + "throttled_seconds": 6.524, + "throttled_period_ratio": 0.302 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.026, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.05, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 3888, + "rollbacks": 3876, + "blocks_read": 0, + "blocks_hit": 231109, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "growing", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.139, + "concurrency": 32, + "successes": { + "write": 1952, + "read": 473 + }, + "errors": {}, + "rps": 199.765, + "all_attempt_latency_ms": { + "p50": 137.703, + "p95": 390.46, + "p99": 490.225 + }, + "successful_latency_ms": { + "p50": 137.703, + "p95": 390.46, + "p99": 490.225 + }, + "instances": [ + "133c457b-06af-4737-a009-bd31e2aa6851", + "2eb738ce-8097-4ad7-baed-b611c7159587", + "85481adc-d38a-41c7-852c-4bdc351f346d", + "d1215dd9-3edf-47ab-9d9b-c9d7f1362cab" + ], + "seconds": { + "0": { + "success": 189, + "error": 0 + }, + "1": { + "success": 176, + "error": 0 + }, + "2": { + "success": 276, + "error": 0 + }, + "3": { + "success": 144, + "error": 0 + }, + "4": { + "success": 236, + "error": 0 + }, + "5": { + "success": 217, + "error": 0 + }, + "6": { + "success": 156, + "error": 0 + }, + "7": { + "success": 277, + "error": 0 + }, + "8": { + "success": 151, + "error": 0 + }, + "9": { + "success": 180, + "error": 0 + }, + "10": { + "success": 226, + "error": 0 + }, + "11": { + "success": 197, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "244d74627927": { + "service": "api", + "cpu_cores_used": 0.491, + "throttled_seconds": 0.823, + "throttled_period_ratio": 0.164 + }, + "fc3b6ad2b080": { + "service": "api", + "cpu_cores_used": 0.454, + "throttled_seconds": 0.716, + "throttled_period_ratio": 0.129 + }, + "ebbccedd1574": { + "service": "api", + "cpu_cores_used": 0.484, + "throttled_seconds": 0.849, + "throttled_period_ratio": 0.144 + }, + "a51b63ac71b2": { + "service": "api", + "cpu_cores_used": 0.497, + "throttled_seconds": 1.068, + "throttled_period_ratio": 0.172 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.254, + "throttled_seconds": 57.791, + "throttled_period_ratio": 0.938 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.023, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.053, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 2470, + "rollbacks": 2454, + "blocks_read": 0, + "blocks_hit": 151979, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "growing", + "replicas": 2, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.111, + "concurrency": 32, + "successes": { + "write": 3999, + "read": 985 + }, + "errors": { + "503": 16 + }, + "rps": 411.537, + "all_attempt_latency_ms": { + "p50": 63.153, + "p95": 201.141, + "p99": 303.704 + }, + "successful_latency_ms": { + "p50": 63.322, + "p95": 201.143, + "p99": 303.82 + }, + "instances": [ + "133c457b-06af-4737-a009-bd31e2aa6851", + "2eb738ce-8097-4ad7-baed-b611c7159587" + ], + "seconds": { + "0": { + "success": 468, + "error": 11 + }, + "1": { + "success": 541, + "error": 1 + }, + "2": { + "success": 472, + "error": 0 + }, + "3": { + "success": 350, + "error": 1 + }, + "4": { + "success": 94, + "error": 0 + }, + "5": { + "success": 399, + "error": 0 + }, + "6": { + "success": 382, + "error": 0 + }, + "7": { + "success": 659, + "error": 0 + }, + "8": { + "success": 434, + "error": 3 + }, + "9": { + "success": 478, + "error": 0 + }, + "10": { + "success": 407, + "error": 0 + }, + "11": { + "success": 300, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "244d74627927": { + "service": "api", + "cpu_cores_used": 0.826, + "throttled_seconds": 3.034, + "throttled_period_ratio": 0.344 + }, + "fc3b6ad2b080": { + "service": "api", + "cpu_cores_used": 0.847, + "throttled_seconds": 3.042, + "throttled_period_ratio": 0.414 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.249, + "throttled_seconds": 18.937, + "throttled_period_ratio": 0.723 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.026, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.057, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 5036, + "rollbacks": 5028, + "blocks_read": 0, + "blocks_hit": 307810, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "fixed", + "replicas": 2, + "cpus": 1.0, + "memory": "512m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.179, + "concurrency": 32, + "successes": { + "write": 2876, + "read": 707 + }, + "errors": { + "503": 12 + }, + "rps": 294.201, + "all_attempt_latency_ms": { + "p50": 96.034, + "p95": 235.511, + "p99": 377.248 + }, + "successful_latency_ms": { + "p50": 96.122, + "p95": 235.511, + "p99": 377.248 + }, + "instances": [ + "34257614-d3ec-4795-8dff-8eabcc3fba1a", + "6fa2733f-7e78-4e68-bc84-7ded28d29f82" + ], + "seconds": { + "0": { + "success": 319, + "error": 12 + }, + "1": { + "success": 387, + "error": 0 + }, + "2": { + "success": 270, + "error": 0 + }, + "3": { + "success": 166, + "error": 0 + }, + "4": { + "success": 187, + "error": 0 + }, + "5": { + "success": 326, + "error": 0 + }, + "6": { + "success": 313, + "error": 0 + }, + "7": { + "success": 384, + "error": 0 + }, + "8": { + "success": 319, + "error": 0 + }, + "9": { + "success": 250, + "error": 0 + }, + "10": { + "success": 408, + "error": 0 + }, + "11": { + "success": 254, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "022fe04f36c0": { + "service": "api", + "cpu_cores_used": 0.817, + "throttled_seconds": 2.225, + "throttled_period_ratio": 0.285 + }, + "f4d51ec5624a": { + "service": "api", + "cpu_cores_used": 0.785, + "throttled_seconds": 2.859, + "throttled_period_ratio": 0.3 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.248, + "throttled_seconds": 28.545, + "throttled_period_ratio": 0.823 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.027, + "throttled_seconds": 0.094, + "throttled_period_ratio": 0.008 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.055, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 3791, + "rollbacks": 3777, + "blocks_read": 0, + "blocks_hit": 279422, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "growing", + "replicas": 1, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.053, + "concurrency": 32, + "successes": { + "write": 2384, + "read": 586 + }, + "errors": { + "503": 39 + }, + "rps": 246.411, + "all_attempt_latency_ms": { + "p50": 80.979, + "p95": 213.561, + "p99": 2588.529 + }, + "successful_latency_ms": { + "p50": 81.249, + "p95": 212.721, + "p99": 790.004 + }, + "instances": [ + "b8b62172-1e9e-455b-985d-cca51f6dad2c" + ], + "seconds": { + "0": { + "success": 314, + "error": 32 + }, + "1": { + "success": 374, + "error": 0 + }, + "2": { + "success": 319, + "error": 0 + }, + "3": { + "success": 318, + "error": 0 + }, + "4": { + "success": 402, + "error": 0 + }, + "5": { + "success": 215, + "error": 0 + }, + "6": { + "success": 351, + "error": 4 + }, + "7": { + "success": 10, + "error": 3 + }, + "9": { + "success": 12, + "error": 0 + }, + "10": { + "success": 254, + "error": 0 + }, + "11": { + "success": 401, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "95945cd8f7f8": { + "service": "api", + "cpu_cores_used": 0.921, + "throttled_seconds": 2.549, + "throttled_period_ratio": 0.696 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.168, + "throttled_seconds": 12.93, + "throttled_period_ratio": 0.281 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.042, + "throttled_seconds": 1.031, + "throttled_period_ratio": 0.09 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.113, + "throttled_seconds": 10.038, + "throttled_period_ratio": 0.185 + } + }, + "postgres_delta": { + "commits": 3001, + "rollbacks": 2995, + "blocks_read": 0, + "blocks_hit": 203302, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "fixed", + "replicas": 1, + "cpus": 2.0, + "memory": "1024m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.045, + "concurrency": 32, + "successes": { + "write": 2389, + "read": 583 + }, + "errors": { + "503": 44 + }, + "rps": 246.748, + "all_attempt_latency_ms": { + "p50": 82.077, + "p95": 270.373, + "p99": 2134.155 + }, + "successful_latency_ms": { + "p50": 82.186, + "p95": 241.754, + "p99": 762.948 + }, + "instances": [ + "ff9aa62e-7a72-4a81-a453-fc38c9ae9fac" + ], + "seconds": { + "0": { + "success": 442, + "error": 26 + }, + "1": { + "success": 397, + "error": 0 + }, + "2": { + "success": 72, + "error": 15 + }, + "3": { + "success": 6, + "error": 0 + }, + "5": { + "success": 67, + "error": 0 + }, + "6": { + "success": 154, + "error": 0 + }, + "7": { + "success": 412, + "error": 0 + }, + "8": { + "success": 327, + "error": 0 + }, + "9": { + "success": 376, + "error": 0 + }, + "10": { + "success": 357, + "error": 0 + }, + "11": { + "success": 350, + "error": 0 + }, + "4": { + "success": 12, + "error": 3 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "4c12f33367ec": { + "service": "api", + "cpu_cores_used": 1.019, + "throttled_seconds": 0.004, + "throttled_period_ratio": 0.023 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.196, + "throttled_seconds": 26.123, + "throttled_period_ratio": 0.442 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.044, + "throttled_seconds": 1.043, + "throttled_period_ratio": 0.091 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.05, + "throttled_seconds": 0.721, + "throttled_period_ratio": 0.034 + } + }, + "postgres_delta": { + "commits": 3084, + "rollbacks": 3067, + "blocks_read": 231, + "blocks_hit": 211003, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "fixed", + "replicas": 4, + "cpus": 0.5, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.138, + "concurrency": 32, + "successes": { + "write": 2454, + "read": 598 + }, + "errors": {}, + "rps": 251.44, + "all_attempt_latency_ms": { + "p50": 105.713, + "p95": 300.114, + "p99": 405.122 + }, + "successful_latency_ms": { + "p50": 105.713, + "p95": 300.114, + "p99": 405.122 + }, + "instances": [ + "45529784-2ef8-4034-bf5c-473e6ee82be6", + "8453a14a-1c41-4d57-a801-11cca5851b38", + "9bfcfcc5-6247-4ab3-acbb-5de71ca7f0a6", + "bb684af6-7e67-44e8-ba27-84abd8f442c3" + ], + "seconds": { + "0": { + "success": 293, + "error": 0 + }, + "1": { + "success": 291, + "error": 0 + }, + "2": { + "success": 203, + "error": 0 + }, + "3": { + "success": 210, + "error": 0 + }, + "4": { + "success": 291, + "error": 0 + }, + "5": { + "success": 304, + "error": 0 + }, + "6": { + "success": 144, + "error": 0 + }, + "7": { + "success": 299, + "error": 0 + }, + "8": { + "success": 282, + "error": 0 + }, + "9": { + "success": 144, + "error": 0 + }, + "10": { + "success": 276, + "error": 0 + }, + "11": { + "success": 315, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "eb7e10d4bd0b": { + "service": "api", + "cpu_cores_used": 0.401, + "throttled_seconds": 7.574, + "throttled_period_ratio": 0.477 + }, + "4606371b71ef": { + "service": "api", + "cpu_cores_used": 0.399, + "throttled_seconds": 7.289, + "throttled_period_ratio": 0.496 + }, + "97ed7c644a96": { + "service": "api", + "cpu_cores_used": 0.382, + "throttled_seconds": 5.903, + "throttled_period_ratio": 0.38 + }, + "45cf842a585a": { + "service": "api", + "cpu_cores_used": 0.386, + "throttled_seconds": 5.785, + "throttled_period_ratio": 0.413 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.243, + "throttled_seconds": 34.154, + "throttled_period_ratio": 0.715 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.025, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.052, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 3134, + "rollbacks": 3121, + "blocks_read": 0, + "blocks_hit": 227380, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "saturation", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 8, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 13.27, + "concurrency": 8, + "successes": { + "write": 1457, + "read": 361 + }, + "errors": { + "503": 2 + }, + "rps": 137.006, + "all_attempt_latency_ms": { + "p50": 21.391, + "p95": 108.973, + "p99": 308.348 + }, + "successful_latency_ms": { + "p50": 21.274, + "p95": 108.961, + "p99": 306.817 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 228, + "error": 0 + }, + "1": { + "success": 219, + "error": 0 + }, + "2": { + "success": 79, + "error": 0 + }, + "3": { + "success": 40, + "error": 0 + }, + "4": { + "success": 76, + "error": 0 + }, + "5": { + "success": 67, + "error": 0 + }, + "6": { + "success": 220, + "error": 0 + }, + "7": { + "success": 292, + "error": 0 + }, + "8": { + "success": 189, + "error": 0 + }, + "9": { + "success": 257, + "error": 0 + }, + "10": { + "success": 150, + "error": 2 + }, + "11": { + "success": 1, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.629, + "throttled_seconds": 1.194, + "throttled_period_ratio": 0.252 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.555, + "throttled_seconds": 1.269, + "throttled_period_ratio": 0.208 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.581, + "throttled_seconds": 1.577, + "throttled_period_ratio": 0.253 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.562, + "throttled_seconds": 1.449, + "throttled_period_ratio": 0.211 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.262, + "throttled_seconds": 41.634, + "throttled_period_ratio": 0.914 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.049, + "throttled_seconds": 0.842, + "throttled_period_ratio": 0.068 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.068, + "throttled_seconds": 0.232, + "throttled_period_ratio": 0.028 + } + }, + "postgres_delta": { + "commits": 1903, + "rollbacks": 1859, + "blocks_read": 1, + "blocks_hit": 135753, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "saturation", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 64, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.267, + "concurrency": 64, + "successes": { + "write": 1874, + "read": 442 + }, + "errors": { + "503": 8 + }, + "rps": 188.797, + "all_attempt_latency_ms": { + "p50": 300.149, + "p95": 707.871, + "p99": 902.089 + }, + "successful_latency_ms": { + "p50": 300.251, + "p95": 707.928, + "p99": 902.089 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 266, + "error": 8 + }, + "1": { + "success": 160, + "error": 0 + }, + "2": { + "success": 219, + "error": 0 + }, + "3": { + "success": 180, + "error": 0 + }, + "4": { + "success": 193, + "error": 0 + }, + "5": { + "success": 205, + "error": 0 + }, + "6": { + "success": 135, + "error": 0 + }, + "7": { + "success": 253, + "error": 0 + }, + "8": { + "success": 180, + "error": 0 + }, + "9": { + "success": 183, + "error": 0 + }, + "10": { + "success": 210, + "error": 0 + }, + "11": { + "success": 132, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.446, + "throttled_seconds": 0.375, + "throttled_period_ratio": 0.099 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.461, + "throttled_seconds": 0.731, + "throttled_period_ratio": 0.138 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.427, + "throttled_seconds": 0.431, + "throttled_period_ratio": 0.115 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.455, + "throttled_seconds": 0.532, + "throttled_period_ratio": 0.144 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.254, + "throttled_seconds": 61.348, + "throttled_period_ratio": 0.932 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.022, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.053, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 2381, + "rollbacks": 2376, + "blocks_read": 0, + "blocks_hit": 168153, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "improved-db", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 1, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.162, + "concurrency": 32, + "successes": { + "write": 3334, + "read": 816 + }, + "errors": {}, + "rps": 341.228, + "all_attempt_latency_ms": { + "p50": 33.386, + "p95": 312.029, + "p99": 445.522 + }, + "successful_latency_ms": { + "p50": 33.386, + "p95": 312.029, + "p99": 445.522 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 452, + "error": 0 + }, + "1": { + "success": 363, + "error": 0 + }, + "2": { + "success": 394, + "error": 0 + }, + "3": { + "success": 390, + "error": 0 + }, + "4": { + "success": 258, + "error": 0 + }, + "5": { + "success": 264, + "error": 0 + }, + "6": { + "success": 459, + "error": 0 + }, + "7": { + "success": 318, + "error": 0 + }, + "8": { + "success": 301, + "error": 0 + }, + "9": { + "success": 252, + "error": 0 + }, + "10": { + "success": 373, + "error": 0 + }, + "11": { + "success": 326, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.901, + "throttled_seconds": 4.456, + "throttled_period_ratio": 0.435 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.85, + "throttled_seconds": 5.255, + "throttled_period_ratio": 0.516 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.905, + "throttled_seconds": 3.738, + "throttled_period_ratio": 0.415 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.852, + "throttled_seconds": 5.264, + "throttled_period_ratio": 0.484 + }, + "73da35c364cb": { + "service": "postgres", + "cpu_cores_used": 0.436, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.05, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.093, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 4283, + "rollbacks": 4270, + "blocks_read": 43, + "blocks_hit": 338210, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "saturation", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 8, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.07, + "concurrency": 8, + "successes": { + "write": 1767, + "read": 436 + }, + "errors": {}, + "rps": 182.516, + "all_attempt_latency_ms": { + "p50": 21.138, + "p95": 117.513, + "p99": 249.372 + }, + "successful_latency_ms": { + "p50": 21.138, + "p95": 117.513, + "p99": 249.372 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 273, + "error": 0 + }, + "1": { + "success": 96, + "error": 0 + }, + "2": { + "success": 96, + "error": 0 + }, + "3": { + "success": 67, + "error": 0 + }, + "4": { + "success": 105, + "error": 0 + }, + "5": { + "success": 222, + "error": 0 + }, + "6": { + "success": 187, + "error": 0 + }, + "7": { + "success": 308, + "error": 0 + }, + "8": { + "success": 184, + "error": 0 + }, + "9": { + "success": 178, + "error": 0 + }, + "10": { + "success": 224, + "error": 0 + }, + "11": { + "success": 263, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.659, + "throttled_seconds": 2.4, + "throttled_period_ratio": 0.293 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.626, + "throttled_seconds": 2.126, + "throttled_period_ratio": 0.271 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.6, + "throttled_seconds": 2.305, + "throttled_period_ratio": 0.315 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.655, + "throttled_seconds": 2.201, + "throttled_period_ratio": 0.346 + }, + "0e05653fd4e4": { + "service": "postgres", + "cpu_cores_used": 0.257, + "throttled_seconds": 22.819, + "throttled_period_ratio": 0.931 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.034, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.053, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 2233, + "rollbacks": 2225, + "blocks_read": 90, + "blocks_hit": 159401, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "saturation", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 64, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.4, + "concurrency": 64, + "successes": { + "write": 1820, + "read": 427 + }, + "errors": { + "503": 5 + }, + "rps": 181.203, + "all_attempt_latency_ms": { + "p50": 289.129, + "p95": 910.173, + "p99": 1195.996 + }, + "successful_latency_ms": { + "p50": 289.364, + "p95": 910.173, + "p99": 1195.996 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 290, + "error": 5 + }, + "1": { + "success": 204, + "error": 0 + }, + "2": { + "success": 231, + "error": 0 + }, + "3": { + "success": 125, + "error": 0 + }, + "4": { + "success": 223, + "error": 0 + }, + "5": { + "success": 222, + "error": 0 + }, + "6": { + "success": 146, + "error": 0 + }, + "7": { + "success": 243, + "error": 0 + }, + "8": { + "success": 180, + "error": 0 + }, + "9": { + "success": 155, + "error": 0 + }, + "10": { + "success": 122, + "error": 0 + }, + "11": { + "success": 106, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.412, + "throttled_seconds": 0.625, + "throttled_period_ratio": 0.121 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.398, + "throttled_seconds": 0.549, + "throttled_period_ratio": 0.156 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.39, + "throttled_seconds": 0.581, + "throttled_period_ratio": 0.134 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.356, + "throttled_seconds": 0.296, + "throttled_period_ratio": 0.094 + }, + "0e05653fd4e4": { + "service": "postgres", + "cpu_cores_used": 0.266, + "throttled_seconds": 63.173, + "throttled_period_ratio": 0.978 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.02, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.046, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 2333, + "rollbacks": 2323, + "blocks_read": 388, + "blocks_hit": 178454, + "temp_bytes": 0 + } + }, + { + "job": { + "series": "improved-db", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 1, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.077, + "concurrency": 32, + "successes": { + "write": 3787, + "read": 934 + }, + "errors": {}, + "rps": 390.895, + "all_attempt_latency_ms": { + "p50": 22.637, + "p95": 300.253, + "p99": 413.923 + }, + "successful_latency_ms": { + "p50": 22.637, + "p95": 300.253, + "p99": 413.923 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 445, + "error": 0 + }, + "1": { + "success": 293, + "error": 0 + }, + "2": { + "success": 377, + "error": 0 + }, + "3": { + "success": 543, + "error": 0 + }, + "4": { + "success": 352, + "error": 0 + }, + "5": { + "success": 386, + "error": 0 + }, + "6": { + "success": 527, + "error": 0 + }, + "7": { + "success": 322, + "error": 0 + }, + "8": { + "success": 260, + "error": 0 + }, + "9": { + "success": 341, + "error": 0 + }, + "10": { + "success": 516, + "error": 0 + }, + "11": { + "success": 359, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.887, + "throttled_seconds": 4.223, + "throttled_period_ratio": 0.44 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.869, + "throttled_seconds": 4.731, + "throttled_period_ratio": 0.484 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.935, + "throttled_seconds": 3.508, + "throttled_period_ratio": 0.466 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.88, + "throttled_seconds": 3.859, + "throttled_period_ratio": 0.429 + }, + "3d939b621b85": { + "service": "postgres", + "cpu_cores_used": 0.482, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.008 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.053, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.008 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.095, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 4814, + "rollbacks": 4802, + "blocks_read": 320, + "blocks_hit": 483542, + "temp_bytes": 0 + } + } +] diff --git a/evidence/lab3-research/run-01.json b/evidence/lab3-research/run-01.json new file mode 100644 index 00000000..d00d3db5 --- /dev/null +++ b/evidence/lab3-research/run-01.json @@ -0,0 +1,140 @@ +{ + "job": { + "series": "growing", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.063, + "concurrency": 32, + "successes": { + "write": 2080, + "read": 499 + }, + "errors": {}, + "rps": 213.789, + "all_attempt_latency_ms": { + "p50": 122.037, + "p95": 286.24, + "p99": 395.01 + }, + "successful_latency_ms": { + "p50": 122.037, + "p95": 286.24, + "p99": 395.01 + }, + "instances": [ + "04368908-e658-4c7c-a470-d062cee00352", + "3a6620ad-9802-4a1a-b0aa-d1a90cdd99a4", + "636c6e03-31dc-4934-b669-44db87b904f2", + "bac9cdaa-b147-4016-9670-982faefc8dfb" + ], + "seconds": { + "0": { + "success": 260, + "error": 0 + }, + "1": { + "success": 214, + "error": 0 + }, + "2": { + "success": 182, + "error": 0 + }, + "3": { + "success": 251, + "error": 0 + }, + "4": { + "success": 189, + "error": 0 + }, + "5": { + "success": 230, + "error": 0 + }, + "6": { + "success": 220, + "error": 0 + }, + "7": { + "success": 194, + "error": 0 + }, + "8": { + "success": 232, + "error": 0 + }, + "9": { + "success": 214, + "error": 0 + }, + "10": { + "success": 205, + "error": 0 + }, + "11": { + "success": 188, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "eb381287fdb4": { + "service": "api", + "cpu_cores_used": 0.5, + "throttled_seconds": 1.971, + "throttled_period_ratio": 0.236 + }, + "f3c20a708dcc": { + "service": "api", + "cpu_cores_used": 0.487, + "throttled_seconds": 1.388, + "throttled_period_ratio": 0.224 + }, + "302a50397bc8": { + "service": "api", + "cpu_cores_used": 0.5, + "throttled_seconds": 2.061, + "throttled_period_ratio": 0.244 + }, + "98cb11ec5f92": { + "service": "api", + "cpu_cores_used": 0.497, + "throttled_seconds": 1.572, + "throttled_period_ratio": 0.232 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.257, + "throttled_seconds": 52.306, + "throttled_period_ratio": 0.945 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.025, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.058, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 2724, + "rollbacks": 2708, + "blocks_read": 49, + "blocks_hit": 162542, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-02.json b/evidence/lab3-research/run-02.json new file mode 100644 index 00000000..d7318276 --- /dev/null +++ b/evidence/lab3-research/run-02.json @@ -0,0 +1,121 @@ +{ + "job": { + "series": "fixed", + "replicas": 1, + "cpus": 2.0, + "memory": "1024m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.051, + "concurrency": 32, + "successes": { + "write": 4022, + "read": 994 + }, + "errors": { + "503": 16 + }, + "rps": 416.231, + "all_attempt_latency_ms": { + "p50": 72.754, + "p95": 117.54, + "p99": 150.008 + }, + "successful_latency_ms": { + "p50": 72.792, + "p95": 117.618, + "p99": 150.008 + }, + "instances": [ + "2efaca98-1279-42fe-94e7-73d3fc78b131" + ], + "seconds": { + "0": { + "success": 447, + "error": 16 + }, + "1": { + "success": 435, + "error": 0 + }, + "2": { + "success": 417, + "error": 0 + }, + "3": { + "success": 455, + "error": 0 + }, + "4": { + "success": 391, + "error": 0 + }, + "5": { + "success": 439, + "error": 0 + }, + "6": { + "success": 412, + "error": 0 + }, + "7": { + "success": 380, + "error": 0 + }, + "8": { + "success": 403, + "error": 0 + }, + "9": { + "success": 411, + "error": 0 + }, + "10": { + "success": 410, + "error": 0 + }, + "11": { + "success": 416, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "9239e587f690": { + "service": "api", + "cpu_cores_used": 1.169, + "throttled_seconds": 0.006, + "throttled_period_ratio": 0.047 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.144, + "throttled_seconds": 0.874, + "throttled_period_ratio": 0.063 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.017, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.033, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 4864, + "rollbacks": 4859, + "blocks_read": 50, + "blocks_hit": 294514, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-03.json b/evidence/lab3-research/run-03.json new file mode 100644 index 00000000..cec384ca --- /dev/null +++ b/evidence/lab3-research/run-03.json @@ -0,0 +1,128 @@ +{ + "job": { + "series": "growing", + "replicas": 2, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.073, + "concurrency": 32, + "successes": { + "write": 4151, + "read": 1023 + }, + "errors": { + "503": 10 + }, + "rps": 428.551, + "all_attempt_latency_ms": { + "p50": 63.357, + "p95": 173.422, + "p99": 277.157 + }, + "successful_latency_ms": { + "p50": 63.445, + "p95": 173.456, + "p99": 277.157 + }, + "instances": [ + "4ef328f6-161e-4e5d-a964-c9eab89fca81", + "cf856ee0-31bc-440b-9d20-a2a0832fa756" + ], + "seconds": { + "0": { + "success": 498, + "error": 9 + }, + "1": { + "success": 576, + "error": 0 + }, + "2": { + "success": 438, + "error": 1 + }, + "3": { + "success": 558, + "error": 0 + }, + "4": { + "success": 452, + "error": 0 + }, + "5": { + "success": 400, + "error": 0 + }, + "6": { + "success": 547, + "error": 0 + }, + "7": { + "success": 372, + "error": 0 + }, + "8": { + "success": 285, + "error": 0 + }, + "9": { + "success": 274, + "error": 0 + }, + "10": { + "success": 285, + "error": 0 + }, + "11": { + "success": 489, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "db2a824f2a00": { + "service": "api", + "cpu_cores_used": 0.819, + "throttled_seconds": 1.849, + "throttled_period_ratio": 0.221 + }, + "bd5b0235f27f": { + "service": "api", + "cpu_cores_used": 0.824, + "throttled_seconds": 1.632, + "throttled_period_ratio": 0.233 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.254, + "throttled_seconds": 26.448, + "throttled_period_ratio": 0.89 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.023, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.057, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 5161, + "rollbacks": 5156, + "blocks_read": 39, + "blocks_hit": 370206, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-04.json b/evidence/lab3-research/run-04.json new file mode 100644 index 00000000..f2c59f44 --- /dev/null +++ b/evidence/lab3-research/run-04.json @@ -0,0 +1,121 @@ +{ + "job": { + "series": "growing", + "replicas": 1, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.32, + "concurrency": 32, + "successes": { + "write": 3032, + "read": 748 + }, + "errors": { + "503": 26 + }, + "rps": 306.81, + "all_attempt_latency_ms": { + "p50": 77.9, + "p95": 260.156, + "p99": 396.72 + }, + "successful_latency_ms": { + "p50": 78.1, + "p95": 261.031, + "p99": 398.059 + }, + "instances": [ + "4ef328f6-161e-4e5d-a964-c9eab89fca81" + ], + "seconds": { + "0": { + "success": 441, + "error": 26 + }, + "1": { + "success": 381, + "error": 0 + }, + "2": { + "success": 289, + "error": 0 + }, + "3": { + "success": 392, + "error": 0 + }, + "4": { + "success": 317, + "error": 0 + }, + "5": { + "success": 347, + "error": 0 + }, + "6": { + "success": 423, + "error": 0 + }, + "7": { + "success": 234, + "error": 0 + }, + "8": { + "success": 325, + "error": 0 + }, + "9": { + "success": 382, + "error": 0 + }, + "10": { + "success": 156, + "error": 0 + }, + "11": { + "success": 93, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "db2a824f2a00": { + "service": "api", + "cpu_cores_used": 0.95, + "throttled_seconds": 2.99, + "throttled_period_ratio": 0.752 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.174, + "throttled_seconds": 8.365, + "throttled_period_ratio": 0.219 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.017, + "throttled_seconds": 0.072, + "throttled_period_ratio": 0.008 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.029, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 3812, + "rollbacks": 3804, + "blocks_read": 0, + "blocks_hit": 268979, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-05.json b/evidence/lab3-research/run-05.json new file mode 100644 index 00000000..3d5f34c1 --- /dev/null +++ b/evidence/lab3-research/run-05.json @@ -0,0 +1,128 @@ +{ + "job": { + "series": "fixed", + "replicas": 2, + "cpus": 1.0, + "memory": "512m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.035, + "concurrency": 32, + "successes": { + "write": 5126, + "read": 1269 + }, + "errors": { + "503": 56 + }, + "rps": 531.374, + "all_attempt_latency_ms": { + "p50": 54.171, + "p95": 136.405, + "p99": 176.476 + }, + "successful_latency_ms": { + "p50": 54.417, + "p95": 136.703, + "p99": 176.505 + }, + "instances": [ + "0c2d85cc-ca99-4735-a9ec-a14aa6c272e3", + "692578e2-df33-464f-a411-21153bdeee25" + ], + "seconds": { + "0": { + "success": 620, + "error": 7 + }, + "1": { + "success": 654, + "error": 0 + }, + "2": { + "success": 452, + "error": 14 + }, + "3": { + "success": 624, + "error": 0 + }, + "4": { + "success": 442, + "error": 1 + }, + "5": { + "success": 577, + "error": 7 + }, + "6": { + "success": 554, + "error": 0 + }, + "7": { + "success": 480, + "error": 8 + }, + "8": { + "success": 611, + "error": 0 + }, + "9": { + "success": 659, + "error": 0 + }, + "10": { + "success": 399, + "error": 19 + }, + "11": { + "success": 323, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "1aecf9504651": { + "service": "api", + "cpu_cores_used": 0.916, + "throttled_seconds": 2.349, + "throttled_period_ratio": 0.312 + }, + "b1131b9dcd97": { + "service": "api", + "cpu_cores_used": 0.934, + "throttled_seconds": 2.21, + "throttled_period_ratio": 0.385 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.238, + "throttled_seconds": 13.394, + "throttled_period_ratio": 0.724 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.024, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.06, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 6618, + "rollbacks": 6613, + "blocks_read": 0, + "blocks_hit": 404706, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-06.json b/evidence/lab3-research/run-06.json new file mode 100644 index 00000000..a44773e3 --- /dev/null +++ b/evidence/lab3-research/run-06.json @@ -0,0 +1,142 @@ +{ + "job": { + "series": "fixed", + "replicas": 4, + "cpus": 0.5, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.125, + "concurrency": 32, + "successes": { + "write": 3040, + "read": 747 + }, + "errors": { + "503": 3 + }, + "rps": 312.319, + "all_attempt_latency_ms": { + "p50": 37.504, + "p95": 345.099, + "p99": 468.638 + }, + "successful_latency_ms": { + "p50": 37.371, + "p95": 345.099, + "p99": 468.638 + }, + "instances": [ + "1844a7a1-c409-43c4-a8de-2cd6b1600bef", + "594f8ae5-0189-440d-a505-8d4dd6f7cd39", + "620b03d8-6d6c-40de-9510-a54ba51a2ea0", + "d4c2ec26-eeed-4078-b64f-26fea2a528c8" + ], + "seconds": { + "0": { + "success": 254, + "error": 0 + }, + "1": { + "success": 373, + "error": 0 + }, + "2": { + "success": 320, + "error": 0 + }, + "3": { + "success": 352, + "error": 3 + }, + "4": { + "success": 224, + "error": 0 + }, + "5": { + "success": 355, + "error": 0 + }, + "6": { + "success": 391, + "error": 0 + }, + "7": { + "success": 315, + "error": 0 + }, + "8": { + "success": 291, + "error": 0 + }, + "9": { + "success": 346, + "error": 0 + }, + "10": { + "success": 313, + "error": 0 + }, + "11": { + "success": 253, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "d0e29b2201aa": { + "service": "api", + "cpu_cores_used": 0.436, + "throttled_seconds": 8.563, + "throttled_period_ratio": 0.567 + }, + "0185e1dff3bd": { + "service": "api", + "cpu_cores_used": 0.425, + "throttled_seconds": 6.669, + "throttled_period_ratio": 0.481 + }, + "d16c24c6c953": { + "service": "api", + "cpu_cores_used": 0.443, + "throttled_seconds": 8.619, + "throttled_period_ratio": 0.595 + }, + "c418691b39d2": { + "service": "api", + "cpu_cores_used": 0.437, + "throttled_seconds": 6.958, + "throttled_period_ratio": 0.527 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.211, + "throttled_seconds": 6.524, + "throttled_period_ratio": 0.302 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.026, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.05, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 3888, + "rollbacks": 3876, + "blocks_read": 0, + "blocks_hit": 231109, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-07.json b/evidence/lab3-research/run-07.json new file mode 100644 index 00000000..b46930fb --- /dev/null +++ b/evidence/lab3-research/run-07.json @@ -0,0 +1,140 @@ +{ + "job": { + "series": "growing", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.139, + "concurrency": 32, + "successes": { + "write": 1952, + "read": 473 + }, + "errors": {}, + "rps": 199.765, + "all_attempt_latency_ms": { + "p50": 137.703, + "p95": 390.46, + "p99": 490.225 + }, + "successful_latency_ms": { + "p50": 137.703, + "p95": 390.46, + "p99": 490.225 + }, + "instances": [ + "133c457b-06af-4737-a009-bd31e2aa6851", + "2eb738ce-8097-4ad7-baed-b611c7159587", + "85481adc-d38a-41c7-852c-4bdc351f346d", + "d1215dd9-3edf-47ab-9d9b-c9d7f1362cab" + ], + "seconds": { + "0": { + "success": 189, + "error": 0 + }, + "1": { + "success": 176, + "error": 0 + }, + "2": { + "success": 276, + "error": 0 + }, + "3": { + "success": 144, + "error": 0 + }, + "4": { + "success": 236, + "error": 0 + }, + "5": { + "success": 217, + "error": 0 + }, + "6": { + "success": 156, + "error": 0 + }, + "7": { + "success": 277, + "error": 0 + }, + "8": { + "success": 151, + "error": 0 + }, + "9": { + "success": 180, + "error": 0 + }, + "10": { + "success": 226, + "error": 0 + }, + "11": { + "success": 197, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "244d74627927": { + "service": "api", + "cpu_cores_used": 0.491, + "throttled_seconds": 0.823, + "throttled_period_ratio": 0.164 + }, + "fc3b6ad2b080": { + "service": "api", + "cpu_cores_used": 0.454, + "throttled_seconds": 0.716, + "throttled_period_ratio": 0.129 + }, + "ebbccedd1574": { + "service": "api", + "cpu_cores_used": 0.484, + "throttled_seconds": 0.849, + "throttled_period_ratio": 0.144 + }, + "a51b63ac71b2": { + "service": "api", + "cpu_cores_used": 0.497, + "throttled_seconds": 1.068, + "throttled_period_ratio": 0.172 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.254, + "throttled_seconds": 57.791, + "throttled_period_ratio": 0.938 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.023, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.053, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 2470, + "rollbacks": 2454, + "blocks_read": 0, + "blocks_hit": 151979, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-08.json b/evidence/lab3-research/run-08.json new file mode 100644 index 00000000..3ed4e273 --- /dev/null +++ b/evidence/lab3-research/run-08.json @@ -0,0 +1,128 @@ +{ + "job": { + "series": "growing", + "replicas": 2, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.111, + "concurrency": 32, + "successes": { + "write": 3999, + "read": 985 + }, + "errors": { + "503": 16 + }, + "rps": 411.537, + "all_attempt_latency_ms": { + "p50": 63.153, + "p95": 201.141, + "p99": 303.704 + }, + "successful_latency_ms": { + "p50": 63.322, + "p95": 201.143, + "p99": 303.82 + }, + "instances": [ + "133c457b-06af-4737-a009-bd31e2aa6851", + "2eb738ce-8097-4ad7-baed-b611c7159587" + ], + "seconds": { + "0": { + "success": 468, + "error": 11 + }, + "1": { + "success": 541, + "error": 1 + }, + "2": { + "success": 472, + "error": 0 + }, + "3": { + "success": 350, + "error": 1 + }, + "4": { + "success": 94, + "error": 0 + }, + "5": { + "success": 399, + "error": 0 + }, + "6": { + "success": 382, + "error": 0 + }, + "7": { + "success": 659, + "error": 0 + }, + "8": { + "success": 434, + "error": 3 + }, + "9": { + "success": 478, + "error": 0 + }, + "10": { + "success": 407, + "error": 0 + }, + "11": { + "success": 300, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "244d74627927": { + "service": "api", + "cpu_cores_used": 0.826, + "throttled_seconds": 3.034, + "throttled_period_ratio": 0.344 + }, + "fc3b6ad2b080": { + "service": "api", + "cpu_cores_used": 0.847, + "throttled_seconds": 3.042, + "throttled_period_ratio": 0.414 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.249, + "throttled_seconds": 18.937, + "throttled_period_ratio": 0.723 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.026, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.057, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 5036, + "rollbacks": 5028, + "blocks_read": 0, + "blocks_hit": 307810, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-09.json b/evidence/lab3-research/run-09.json new file mode 100644 index 00000000..57c2b31d --- /dev/null +++ b/evidence/lab3-research/run-09.json @@ -0,0 +1,128 @@ +{ + "job": { + "series": "fixed", + "replicas": 2, + "cpus": 1.0, + "memory": "512m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.179, + "concurrency": 32, + "successes": { + "write": 2876, + "read": 707 + }, + "errors": { + "503": 12 + }, + "rps": 294.201, + "all_attempt_latency_ms": { + "p50": 96.034, + "p95": 235.511, + "p99": 377.248 + }, + "successful_latency_ms": { + "p50": 96.122, + "p95": 235.511, + "p99": 377.248 + }, + "instances": [ + "34257614-d3ec-4795-8dff-8eabcc3fba1a", + "6fa2733f-7e78-4e68-bc84-7ded28d29f82" + ], + "seconds": { + "0": { + "success": 319, + "error": 12 + }, + "1": { + "success": 387, + "error": 0 + }, + "2": { + "success": 270, + "error": 0 + }, + "3": { + "success": 166, + "error": 0 + }, + "4": { + "success": 187, + "error": 0 + }, + "5": { + "success": 326, + "error": 0 + }, + "6": { + "success": 313, + "error": 0 + }, + "7": { + "success": 384, + "error": 0 + }, + "8": { + "success": 319, + "error": 0 + }, + "9": { + "success": 250, + "error": 0 + }, + "10": { + "success": 408, + "error": 0 + }, + "11": { + "success": 254, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "022fe04f36c0": { + "service": "api", + "cpu_cores_used": 0.817, + "throttled_seconds": 2.225, + "throttled_period_ratio": 0.285 + }, + "f4d51ec5624a": { + "service": "api", + "cpu_cores_used": 0.785, + "throttled_seconds": 2.859, + "throttled_period_ratio": 0.3 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.248, + "throttled_seconds": 28.545, + "throttled_period_ratio": 0.823 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.027, + "throttled_seconds": 0.094, + "throttled_period_ratio": 0.008 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.055, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 3791, + "rollbacks": 3777, + "blocks_read": 0, + "blocks_hit": 279422, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-10.json b/evidence/lab3-research/run-10.json new file mode 100644 index 00000000..c7885124 --- /dev/null +++ b/evidence/lab3-research/run-10.json @@ -0,0 +1,117 @@ +{ + "job": { + "series": "growing", + "replicas": 1, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.053, + "concurrency": 32, + "successes": { + "write": 2384, + "read": 586 + }, + "errors": { + "503": 39 + }, + "rps": 246.411, + "all_attempt_latency_ms": { + "p50": 80.979, + "p95": 213.561, + "p99": 2588.529 + }, + "successful_latency_ms": { + "p50": 81.249, + "p95": 212.721, + "p99": 790.004 + }, + "instances": [ + "b8b62172-1e9e-455b-985d-cca51f6dad2c" + ], + "seconds": { + "0": { + "success": 314, + "error": 32 + }, + "1": { + "success": 374, + "error": 0 + }, + "2": { + "success": 319, + "error": 0 + }, + "3": { + "success": 318, + "error": 0 + }, + "4": { + "success": 402, + "error": 0 + }, + "5": { + "success": 215, + "error": 0 + }, + "6": { + "success": 351, + "error": 4 + }, + "7": { + "success": 10, + "error": 3 + }, + "9": { + "success": 12, + "error": 0 + }, + "10": { + "success": 254, + "error": 0 + }, + "11": { + "success": 401, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "95945cd8f7f8": { + "service": "api", + "cpu_cores_used": 0.921, + "throttled_seconds": 2.549, + "throttled_period_ratio": 0.696 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.168, + "throttled_seconds": 12.93, + "throttled_period_ratio": 0.281 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.042, + "throttled_seconds": 1.031, + "throttled_period_ratio": 0.09 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.113, + "throttled_seconds": 10.038, + "throttled_period_ratio": 0.185 + } + }, + "postgres_delta": { + "commits": 3001, + "rollbacks": 2995, + "blocks_read": 0, + "blocks_hit": 203302, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-11.json b/evidence/lab3-research/run-11.json new file mode 100644 index 00000000..2a641af8 --- /dev/null +++ b/evidence/lab3-research/run-11.json @@ -0,0 +1,121 @@ +{ + "job": { + "series": "fixed", + "replicas": 1, + "cpus": 2.0, + "memory": "1024m", + "db": 0.25, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.045, + "concurrency": 32, + "successes": { + "write": 2389, + "read": 583 + }, + "errors": { + "503": 44 + }, + "rps": 246.748, + "all_attempt_latency_ms": { + "p50": 82.077, + "p95": 270.373, + "p99": 2134.155 + }, + "successful_latency_ms": { + "p50": 82.186, + "p95": 241.754, + "p99": 762.948 + }, + "instances": [ + "ff9aa62e-7a72-4a81-a453-fc38c9ae9fac" + ], + "seconds": { + "0": { + "success": 442, + "error": 26 + }, + "1": { + "success": 397, + "error": 0 + }, + "2": { + "success": 72, + "error": 15 + }, + "3": { + "success": 6, + "error": 0 + }, + "5": { + "success": 67, + "error": 0 + }, + "6": { + "success": 154, + "error": 0 + }, + "7": { + "success": 412, + "error": 0 + }, + "8": { + "success": 327, + "error": 0 + }, + "9": { + "success": 376, + "error": 0 + }, + "10": { + "success": 357, + "error": 0 + }, + "11": { + "success": 350, + "error": 0 + }, + "4": { + "success": 12, + "error": 3 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "4c12f33367ec": { + "service": "api", + "cpu_cores_used": 1.019, + "throttled_seconds": 0.004, + "throttled_period_ratio": 0.023 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.196, + "throttled_seconds": 26.123, + "throttled_period_ratio": 0.442 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.044, + "throttled_seconds": 1.043, + "throttled_period_ratio": 0.091 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.05, + "throttled_seconds": 0.721, + "throttled_period_ratio": 0.034 + } + }, + "postgres_delta": { + "commits": 3084, + "rollbacks": 3067, + "blocks_read": 231, + "blocks_hit": 211003, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-12.json b/evidence/lab3-research/run-12.json new file mode 100644 index 00000000..a4bb2b17 --- /dev/null +++ b/evidence/lab3-research/run-12.json @@ -0,0 +1,140 @@ +{ + "job": { + "series": "fixed", + "replicas": 4, + "cpus": 0.5, + "memory": "256m", + "db": 0.25, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.138, + "concurrency": 32, + "successes": { + "write": 2454, + "read": 598 + }, + "errors": {}, + "rps": 251.44, + "all_attempt_latency_ms": { + "p50": 105.713, + "p95": 300.114, + "p99": 405.122 + }, + "successful_latency_ms": { + "p50": 105.713, + "p95": 300.114, + "p99": 405.122 + }, + "instances": [ + "45529784-2ef8-4034-bf5c-473e6ee82be6", + "8453a14a-1c41-4d57-a801-11cca5851b38", + "9bfcfcc5-6247-4ab3-acbb-5de71ca7f0a6", + "bb684af6-7e67-44e8-ba27-84abd8f442c3" + ], + "seconds": { + "0": { + "success": 293, + "error": 0 + }, + "1": { + "success": 291, + "error": 0 + }, + "2": { + "success": 203, + "error": 0 + }, + "3": { + "success": 210, + "error": 0 + }, + "4": { + "success": 291, + "error": 0 + }, + "5": { + "success": 304, + "error": 0 + }, + "6": { + "success": 144, + "error": 0 + }, + "7": { + "success": 299, + "error": 0 + }, + "8": { + "success": 282, + "error": 0 + }, + "9": { + "success": 144, + "error": 0 + }, + "10": { + "success": 276, + "error": 0 + }, + "11": { + "success": 315, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "eb7e10d4bd0b": { + "service": "api", + "cpu_cores_used": 0.401, + "throttled_seconds": 7.574, + "throttled_period_ratio": 0.477 + }, + "4606371b71ef": { + "service": "api", + "cpu_cores_used": 0.399, + "throttled_seconds": 7.289, + "throttled_period_ratio": 0.496 + }, + "97ed7c644a96": { + "service": "api", + "cpu_cores_used": 0.382, + "throttled_seconds": 5.903, + "throttled_period_ratio": 0.38 + }, + "45cf842a585a": { + "service": "api", + "cpu_cores_used": 0.386, + "throttled_seconds": 5.785, + "throttled_period_ratio": 0.413 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.243, + "throttled_seconds": 34.154, + "throttled_period_ratio": 0.715 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.025, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.052, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 3134, + "rollbacks": 3121, + "blocks_read": 0, + "blocks_hit": 227380, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-13.json b/evidence/lab3-research/run-13.json new file mode 100644 index 00000000..f8fefeab --- /dev/null +++ b/evidence/lab3-research/run-13.json @@ -0,0 +1,142 @@ +{ + "job": { + "series": "saturation", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 8, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 13.27, + "concurrency": 8, + "successes": { + "write": 1457, + "read": 361 + }, + "errors": { + "503": 2 + }, + "rps": 137.006, + "all_attempt_latency_ms": { + "p50": 21.391, + "p95": 108.973, + "p99": 308.348 + }, + "successful_latency_ms": { + "p50": 21.274, + "p95": 108.961, + "p99": 306.817 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 228, + "error": 0 + }, + "1": { + "success": 219, + "error": 0 + }, + "2": { + "success": 79, + "error": 0 + }, + "3": { + "success": 40, + "error": 0 + }, + "4": { + "success": 76, + "error": 0 + }, + "5": { + "success": 67, + "error": 0 + }, + "6": { + "success": 220, + "error": 0 + }, + "7": { + "success": 292, + "error": 0 + }, + "8": { + "success": 189, + "error": 0 + }, + "9": { + "success": 257, + "error": 0 + }, + "10": { + "success": 150, + "error": 2 + }, + "11": { + "success": 1, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.629, + "throttled_seconds": 1.194, + "throttled_period_ratio": 0.252 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.555, + "throttled_seconds": 1.269, + "throttled_period_ratio": 0.208 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.581, + "throttled_seconds": 1.577, + "throttled_period_ratio": 0.253 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.562, + "throttled_seconds": 1.449, + "throttled_period_ratio": 0.211 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.262, + "throttled_seconds": 41.634, + "throttled_period_ratio": 0.914 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.049, + "throttled_seconds": 0.842, + "throttled_period_ratio": 0.068 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.068, + "throttled_seconds": 0.232, + "throttled_period_ratio": 0.028 + } + }, + "postgres_delta": { + "commits": 1903, + "rollbacks": 1859, + "blocks_read": 1, + "blocks_hit": 135753, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-14.json b/evidence/lab3-research/run-14.json new file mode 100644 index 00000000..d3fc45af --- /dev/null +++ b/evidence/lab3-research/run-14.json @@ -0,0 +1,142 @@ +{ + "job": { + "series": "saturation", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 64, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.267, + "concurrency": 64, + "successes": { + "write": 1874, + "read": 442 + }, + "errors": { + "503": 8 + }, + "rps": 188.797, + "all_attempt_latency_ms": { + "p50": 300.149, + "p95": 707.871, + "p99": 902.089 + }, + "successful_latency_ms": { + "p50": 300.251, + "p95": 707.928, + "p99": 902.089 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 266, + "error": 8 + }, + "1": { + "success": 160, + "error": 0 + }, + "2": { + "success": 219, + "error": 0 + }, + "3": { + "success": 180, + "error": 0 + }, + "4": { + "success": 193, + "error": 0 + }, + "5": { + "success": 205, + "error": 0 + }, + "6": { + "success": 135, + "error": 0 + }, + "7": { + "success": 253, + "error": 0 + }, + "8": { + "success": 180, + "error": 0 + }, + "9": { + "success": 183, + "error": 0 + }, + "10": { + "success": 210, + "error": 0 + }, + "11": { + "success": 132, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.446, + "throttled_seconds": 0.375, + "throttled_period_ratio": 0.099 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.461, + "throttled_seconds": 0.731, + "throttled_period_ratio": 0.138 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.427, + "throttled_seconds": 0.431, + "throttled_period_ratio": 0.115 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.455, + "throttled_seconds": 0.532, + "throttled_period_ratio": 0.144 + }, + "91cd41379d5e": { + "service": "postgres", + "cpu_cores_used": 0.254, + "throttled_seconds": 61.348, + "throttled_period_ratio": 0.932 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.022, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.053, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 2381, + "rollbacks": 2376, + "blocks_read": 0, + "blocks_hit": 168153, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-15.json b/evidence/lab3-research/run-15.json new file mode 100644 index 00000000..17d562ac --- /dev/null +++ b/evidence/lab3-research/run-15.json @@ -0,0 +1,140 @@ +{ + "job": { + "series": "improved-db", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 1, + "concurrency": 32, + "repeat": 0 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.162, + "concurrency": 32, + "successes": { + "write": 3334, + "read": 816 + }, + "errors": {}, + "rps": 341.228, + "all_attempt_latency_ms": { + "p50": 33.386, + "p95": 312.029, + "p99": 445.522 + }, + "successful_latency_ms": { + "p50": 33.386, + "p95": 312.029, + "p99": 445.522 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 452, + "error": 0 + }, + "1": { + "success": 363, + "error": 0 + }, + "2": { + "success": 394, + "error": 0 + }, + "3": { + "success": 390, + "error": 0 + }, + "4": { + "success": 258, + "error": 0 + }, + "5": { + "success": 264, + "error": 0 + }, + "6": { + "success": 459, + "error": 0 + }, + "7": { + "success": 318, + "error": 0 + }, + "8": { + "success": 301, + "error": 0 + }, + "9": { + "success": 252, + "error": 0 + }, + "10": { + "success": 373, + "error": 0 + }, + "11": { + "success": 326, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.901, + "throttled_seconds": 4.456, + "throttled_period_ratio": 0.435 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.85, + "throttled_seconds": 5.255, + "throttled_period_ratio": 0.516 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.905, + "throttled_seconds": 3.738, + "throttled_period_ratio": 0.415 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.852, + "throttled_seconds": 5.264, + "throttled_period_ratio": 0.484 + }, + "73da35c364cb": { + "service": "postgres", + "cpu_cores_used": 0.436, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.05, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.093, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 4283, + "rollbacks": 4270, + "blocks_read": 43, + "blocks_hit": 338210, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-16.json b/evidence/lab3-research/run-16.json new file mode 100644 index 00000000..cd2e1557 --- /dev/null +++ b/evidence/lab3-research/run-16.json @@ -0,0 +1,140 @@ +{ + "job": { + "series": "saturation", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 8, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.07, + "concurrency": 8, + "successes": { + "write": 1767, + "read": 436 + }, + "errors": {}, + "rps": 182.516, + "all_attempt_latency_ms": { + "p50": 21.138, + "p95": 117.513, + "p99": 249.372 + }, + "successful_latency_ms": { + "p50": 21.138, + "p95": 117.513, + "p99": 249.372 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 273, + "error": 0 + }, + "1": { + "success": 96, + "error": 0 + }, + "2": { + "success": 96, + "error": 0 + }, + "3": { + "success": 67, + "error": 0 + }, + "4": { + "success": 105, + "error": 0 + }, + "5": { + "success": 222, + "error": 0 + }, + "6": { + "success": 187, + "error": 0 + }, + "7": { + "success": 308, + "error": 0 + }, + "8": { + "success": 184, + "error": 0 + }, + "9": { + "success": 178, + "error": 0 + }, + "10": { + "success": 224, + "error": 0 + }, + "11": { + "success": 263, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.659, + "throttled_seconds": 2.4, + "throttled_period_ratio": 0.293 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.626, + "throttled_seconds": 2.126, + "throttled_period_ratio": 0.271 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.6, + "throttled_seconds": 2.305, + "throttled_period_ratio": 0.315 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.655, + "throttled_seconds": 2.201, + "throttled_period_ratio": 0.346 + }, + "0e05653fd4e4": { + "service": "postgres", + "cpu_cores_used": 0.257, + "throttled_seconds": 22.819, + "throttled_period_ratio": 0.931 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.034, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.053, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 2233, + "rollbacks": 2225, + "blocks_read": 90, + "blocks_hit": 159401, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-17.json b/evidence/lab3-research/run-17.json new file mode 100644 index 00000000..4e52e96a --- /dev/null +++ b/evidence/lab3-research/run-17.json @@ -0,0 +1,142 @@ +{ + "job": { + "series": "saturation", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 0.25, + "concurrency": 64, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.4, + "concurrency": 64, + "successes": { + "write": 1820, + "read": 427 + }, + "errors": { + "503": 5 + }, + "rps": 181.203, + "all_attempt_latency_ms": { + "p50": 289.129, + "p95": 910.173, + "p99": 1195.996 + }, + "successful_latency_ms": { + "p50": 289.364, + "p95": 910.173, + "p99": 1195.996 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 290, + "error": 5 + }, + "1": { + "success": 204, + "error": 0 + }, + "2": { + "success": 231, + "error": 0 + }, + "3": { + "success": 125, + "error": 0 + }, + "4": { + "success": 223, + "error": 0 + }, + "5": { + "success": 222, + "error": 0 + }, + "6": { + "success": 146, + "error": 0 + }, + "7": { + "success": 243, + "error": 0 + }, + "8": { + "success": 180, + "error": 0 + }, + "9": { + "success": 155, + "error": 0 + }, + "10": { + "success": 122, + "error": 0 + }, + "11": { + "success": 106, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.412, + "throttled_seconds": 0.625, + "throttled_period_ratio": 0.121 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.398, + "throttled_seconds": 0.549, + "throttled_period_ratio": 0.156 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.39, + "throttled_seconds": 0.581, + "throttled_period_ratio": 0.134 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.356, + "throttled_seconds": 0.296, + "throttled_period_ratio": 0.094 + }, + "0e05653fd4e4": { + "service": "postgres", + "cpu_cores_used": 0.266, + "throttled_seconds": 63.173, + "throttled_period_ratio": 0.978 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.02, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.046, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 2333, + "rollbacks": 2323, + "blocks_read": 388, + "blocks_hit": 178454, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/run-18.json b/evidence/lab3-research/run-18.json new file mode 100644 index 00000000..7345bde4 --- /dev/null +++ b/evidence/lab3-research/run-18.json @@ -0,0 +1,140 @@ +{ + "job": { + "series": "improved-db", + "replicas": 4, + "cpus": 1, + "memory": "256m", + "db": 1, + "concurrency": 32, + "repeat": 1 + }, + "report": { + "duration_seconds": 12, + "elapsed_seconds": 12.077, + "concurrency": 32, + "successes": { + "write": 3787, + "read": 934 + }, + "errors": {}, + "rps": 390.895, + "all_attempt_latency_ms": { + "p50": 22.637, + "p95": 300.253, + "p99": 413.923 + }, + "successful_latency_ms": { + "p50": 22.637, + "p95": 300.253, + "p99": 413.923 + }, + "instances": [ + "0cadf110-e663-4a11-9415-650ca2d79d91", + "30dbc2a7-d6b5-402b-b712-82f8e6aae3cd", + "a42e7db4-75b7-4037-abf8-a57a7eae0bb6", + "fcd9c04d-59b2-4092-8819-456d47f66d92" + ], + "seconds": { + "0": { + "success": 445, + "error": 0 + }, + "1": { + "success": 293, + "error": 0 + }, + "2": { + "success": 377, + "error": 0 + }, + "3": { + "success": 543, + "error": 0 + }, + "4": { + "success": 352, + "error": 0 + }, + "5": { + "success": 386, + "error": 0 + }, + "6": { + "success": 527, + "error": 0 + }, + "7": { + "success": 322, + "error": 0 + }, + "8": { + "success": 260, + "error": 0 + }, + "9": { + "success": 341, + "error": 0 + }, + "10": { + "success": 516, + "error": 0 + }, + "11": { + "success": 359, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" + }, + "cpu": { + "848a127ef749": { + "service": "api", + "cpu_cores_used": 0.887, + "throttled_seconds": 4.223, + "throttled_period_ratio": 0.44 + }, + "95b8eb5e744d": { + "service": "api", + "cpu_cores_used": 0.869, + "throttled_seconds": 4.731, + "throttled_period_ratio": 0.484 + }, + "0dde79ac04f4": { + "service": "api", + "cpu_cores_used": 0.935, + "throttled_seconds": 3.508, + "throttled_period_ratio": 0.466 + }, + "566dcb0004c3": { + "service": "api", + "cpu_cores_used": 0.88, + "throttled_seconds": 3.859, + "throttled_period_ratio": 0.429 + }, + "3d939b621b85": { + "service": "postgres", + "cpu_cores_used": 0.482, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.008 + }, + "f71bc2ef45c8": { + "service": "redis", + "cpu_cores_used": 0.053, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.008 + }, + "279562a6ff00": { + "service": "lb", + "cpu_cores_used": 0.095, + "throttled_seconds": 0.0, + "throttled_period_ratio": 0.0 + } + }, + "postgres_delta": { + "commits": 4814, + "rollbacks": 4802, + "blocks_read": 320, + "blocks_hit": 483542, + "temp_bytes": 0 + } +} diff --git a/evidence/lab3-research/scaling.png b/evidence/lab3-research/scaling.png new file mode 100644 index 0000000000000000000000000000000000000000..df57707b4a2247a6e6fdaf32b0995cf53bd00d9a GIT binary patch literal 115169 zcmb5Wby$;c*f&mht8@#3ba#V-AfZx@29X#&kw!{DDFadIkZ#!M6amSB!0484VRZbi zeV_Mzet*9^4&_i`bJu;|=lQ8~?+o-b$w?SVu&}VmA8Bbk#lj-M!@|OW5D|dCS+ElL z48F*{dSLqMnfuFEJ~m$VSh_Z^JY3vgxj5Ofzqa>+Ik~%u3yF#fi3zYfzIx>WlM@zp z{on5pa`$o&4vE_ZPl844q4gYwg>@$y^9%dexJo7#HWt<+4OK(m)a_aPZ-(}Cg!|R) zLbJ28_ldM~w8BF|IA_Umw27igZ1*|dhw=OzmIIZf%$P#6^;M@k=`AFMg6~zC!B5nFMp(3 z-@<3-M4Ad|F`!G|7P%9lV7gaO7ABHKd+d>nR=M!Dl)?z?R_Apn<90`#AY&{OU+wBi38!I;H`!4SA<3-P>r;V>&i?`mK zA8l;ju*kjo@M_~v{pA@=GWh4-v{Muic#JByDqn3shzgpV@ywpAhvjci*Xk!ry9?FB)?S|;$_6ymZ<%lRpR~KT zUfugDY(=X%R`5g}yr;Dx1sM~CpmW3X;~oC%>uXkdw(i=iuGGUdWZz;()R-UZg+YzW zF--6=8@JSgl z2kLpf*K(n!Ym%vg9WEVou~QrQx94-Wsj;%MvU(H+3mLdl6s>bS8G*LE#wFh-y+7R3 zW$c)!v?G7=Pn^B8drf? zk$F0+K%40J_;^va_y-E}xjJ;kecmg*cb1`P3Vwe!kY7Kn^nBJV%?P?UW}qp)#iK`G zWLRkXnyvo}|5ux{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L*wldu8V(fs`U#6BiFd(oTGx;MLN&)5OVv6zY<>r=Pt7?(OGX>k&!T2_Fn`S0C6 zs9A6pUpRwzL$=9XG`{t>UIjiTse1MkYNwf){&QIgrY4XicHT5WtLioh(DtJ>7cn`KeV)ij_a0ht zxa0z#%naIt@N){7N?T2xt21KdE>z+V)8*yx?t)uBgf(%1*oQ2m62jn?Rp??fKHFRL zTNmDM)9SoLG+E%W4&>d7AA&m_kkK+D?BFzqHtVYaFA1lJ@=YamL~?0eT6sn$BO0TK-} zBl)6xis|~KS87H2dZyW}Z1Xgw-KNgaZ7fySPRxjT5j7Am%ak6craG(FIxyfSs-GCt zVlq;7KovI1&VA{1zR6!_ZKBII*?ywp%F$jWAL0}BCR}?7vU2%ok3qN>Qe4$6>5_0$ zzFHf4b5+QV+Fg8yX4nC6cx!5t!4o`X(s}`CoFR+qFX&xrulufr6#?r${ZLl;O{4aIQa>j zU#B2bK{cC*czx&}Y{fdMaglN5(;0s@Gs~3GX?p5}XKVI#F;U;Lnr;4{Ew)_tQMUSQ z_T{NluFt&l-DPurq3q`yD!Ng5MT&7jr-Xm+yfk%AZi~r@NuN9~nRo})wf_0-o3;0R zOW)LIdnY_j%-Gv9&%ghCjnjVaSk9`9&5#y)FfRLx`ONcE-3Jd(># zNBC_&vpj9j63Ogi%PQ^G#RazkFB4SHS~Gjj^(i+tu6Q=%Sos^%^}fpcK5x8I<8Sg? z?7Crp_MDZHr`5j|FV(iZ%`x+V@(2B$crISi_+U4KZvEA9k$+PBM7yF&AQoeghj&${$nO8jRPTo~B zJ>MMkD^BJ6Uazy~YogvN3#!UF=K@nA3}8$&fcNe$-T36%JK*Fd5PY6~=hj~rmrT&i w6C5n^X}Bx`8X1QIBSz>d8wj5y?u3tj35k7ob^Pgg&ebxsLQ0P_V?=Kufz literal 0 HcmV?d00001 diff --git a/evidence/lab3-research/scaling.svg b/evidence/lab3-research/scaling.svg new file mode 100644 index 00000000..1f409c1e --- /dev/null +++ b/evidence/lab3-research/scaling.svg @@ -0,0 +1,2578 @@ + + + + + + + + 2026-11-06T18:37:44.633331 + image/svg+xml + + + Matplotlib v3.11.2, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/evidence/lab3-research/summary.csv b/evidence/lab3-research/summary.csv new file mode 100644 index 00000000..185372b2 --- /dev/null +++ b/evidence/lab3-research/summary.csv @@ -0,0 +1,19 @@ +series,replicas,cpus,memory,db,concurrency,repeat,rps,p95_ms,errors,postgres_cores +growing,4,1,256m,0.25,32,0,213.789,286.24,0,0.257 +fixed,1,2.0,1024m,0.25,32,1,416.231,117.54,16,0.144 +growing,2,1,256m,0.25,32,1,428.551,173.422,10,0.254 +growing,1,1,256m,0.25,32,1,306.81,260.156,26,0.174 +fixed,2,1.0,512m,0.25,32,1,531.374,136.405,56,0.238 +fixed,4,0.5,256m,0.25,32,0,312.319,345.099,3,0.211 +growing,4,1,256m,0.25,32,1,199.765,390.46,0,0.254 +growing,2,1,256m,0.25,32,0,411.537,201.141,16,0.249 +fixed,2,1.0,512m,0.25,32,0,294.201,235.511,12,0.248 +growing,1,1,256m,0.25,32,0,246.411,213.561,39,0.168 +fixed,1,2.0,1024m,0.25,32,0,246.748,270.373,44,0.196 +fixed,4,0.5,256m,0.25,32,1,251.44,300.114,0,0.243 +saturation,4,1,256m,0.25,8,0,137.006,108.973,2,0.262 +saturation,4,1,256m,0.25,64,0,188.797,707.871,8,0.254 +improved-db,4,1,256m,1,32,0,341.228,312.029,0,0.436 +saturation,4,1,256m,0.25,8,1,182.516,117.513,0,0.257 +saturation,4,1,256m,0.25,64,1,181.203,910.173,5,0.266 +improved-db,4,1,256m,1,32,1,390.895,300.253,0,0.482 diff --git a/evidence/lab3-restart-proof.json b/evidence/lab3-restart-proof.json new file mode 100644 index 00000000..bd6fa270 --- /dev/null +++ b/evidence/lab3-restart-proof.json @@ -0,0 +1,18 @@ +{ + "api_before": { + "f730d1a3b9656761f8b2ac78e1d7d7e46f10e84d6e02f709e8538d325cd3adad": "2026-11-06T15:33:45.580305918Z", + "68b27434c3a1f944dd5ca1cc99905c5d041cc80217cd1184b9af932c69e71b51": "2026-11-06T15:33:54.765635756Z" + }, + "api_after": { + "e377f47f183418456b39f816013726755dd3e3be1259e2d84b168e3bfbc87745": "2026-11-06T15:35:15.093688376Z", + "ccd508b0d9c695a3527803368fb69ed25eca9451b33b9cd0fb29da25c4ce088d": "2026-11-06T15:35:15.170884043Z" + }, + "storage_before": { + "postgres": "2026-11-06T15:20:17.858429503Z", + "redis": "2026-11-06T14:45:02.138503885Z" + }, + "storage_after": { + "postgres": "2026-11-06T15:35:11.3787345Z", + "redis": "2026-11-06T15:35:11.424523166Z" + } +} diff --git a/evidence/lab3-review-summary.json b/evidence/lab3-review-summary.json new file mode 100644 index 00000000..940151d5 --- /dev/null +++ b/evidence/lab3-review-summary.json @@ -0,0 +1,9 @@ +{ + "audit-run": "PASS", + "edge-audit": "PASS", + "verify": "PASS", + "final-checks": "PASS", + "clean-start": "PASS", + "research-run": "PASS", + "research-plots": "PASS" +} diff --git a/evidence/lab3-review.txt b/evidence/lab3-review.txt new file mode 100644 index 00000000..e6956f26 --- /dev/null +++ b/evidence/lab3-review.txt @@ -0,0 +1,15 @@ +Starting audit-run +audit-run PASS +Starting edge-audit +edge-audit PASS +Starting verify +verify PASS +Starting final-checks +final-checks PASS +Starting clean-start +clean-start PASS +Starting research-run +research-run PASS +Starting research-plots +research-plots PASS +PASS: complete pre-submission review diff --git a/evidence/lab3-rolling-load.json b/evidence/lab3-rolling-load.json new file mode 100644 index 00000000..4b81de1b --- /dev/null +++ b/evidence/lab3-rolling-load.json @@ -0,0 +1,192 @@ +{ + "duration_seconds": 40, + "elapsed_seconds": 40.071, + "concurrency": 8, + "successes": { + "write": 6411, + "read": 1598 + }, + "errors": { + "503": 39 + }, + "rps": 199.869, + "all_attempt_latency_ms": { + "p50": 16.527, + "p95": 120.783, + "p99": 192.247 + }, + "successful_latency_ms": { + "p50": 16.62, + "p95": 122.345, + "p99": 192.247 + }, + "instances": [ + "26994c32-3a09-4940-b937-2ccdb77cb027", + "27af37f5-0a10-42e6-885c-481bd4951cb0", + "677c0215-4023-4648-ba02-4cbe3cffc627", + "a64d7a03-52c8-42e9-b205-18ea7884844b" + ], + "seconds": { + "0": { + "success": 123, + "error": 0 + }, + "1": { + "success": 122, + "error": 0 + }, + "2": { + "success": 155, + "error": 0 + }, + "3": { + "success": 231, + "error": 0 + }, + "4": { + "success": 164, + "error": 39 + }, + "5": { + "success": 137, + "error": 0 + }, + "6": { + "success": 241, + "error": 0 + }, + "7": { + "success": 363, + "error": 0 + }, + "8": { + "success": 178, + "error": 0 + }, + "9": { + "success": 191, + "error": 0 + }, + "10": { + "success": 217, + "error": 0 + }, + "11": { + "success": 163, + "error": 0 + }, + "12": { + "success": 111, + "error": 0 + }, + "13": { + "success": 173, + "error": 0 + }, + "14": { + "success": 278, + "error": 0 + }, + "15": { + "success": 161, + "error": 0 + }, + "16": { + "success": 168, + "error": 0 + }, + "17": { + "success": 264, + "error": 0 + }, + "18": { + "success": 90, + "error": 0 + }, + "19": { + "success": 112, + "error": 0 + }, + "20": { + "success": 195, + "error": 0 + }, + "21": { + "success": 285, + "error": 0 + }, + "22": { + "success": 104, + "error": 0 + }, + "23": { + "success": 149, + "error": 0 + }, + "24": { + "success": 286, + "error": 0 + }, + "25": { + "success": 278, + "error": 0 + }, + "26": { + "success": 135, + "error": 0 + }, + "27": { + "success": 219, + "error": 0 + }, + "28": { + "success": 347, + "error": 0 + }, + "29": { + "success": 157, + "error": 0 + }, + "30": { + "success": 162, + "error": 0 + }, + "31": { + "success": 294, + "error": 0 + }, + "32": { + "success": 158, + "error": 0 + }, + "33": { + "success": 170, + "error": 0 + }, + "34": { + "success": 213, + "error": 0 + }, + "35": { + "success": 331, + "error": 0 + }, + "36": { + "success": 152, + "error": 0 + }, + "37": { + "success": 149, + "error": 0 + }, + "38": { + "success": 300, + "error": 0 + }, + "39": { + "success": 283, + "error": 0 + } + }, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries" +} diff --git a/evidence/lab3-rolling.txt b/evidence/lab3-rolling.txt new file mode 100644 index 00000000..80b233ee --- /dev/null +++ b/evidence/lab3-rolling.txt @@ -0,0 +1,37 @@ +{ + "mode": "rolling replacement, one surge, same schema", + "events": [ + { + "old_container": "4856ec40e6db", + "new_container": "f730d1a3b965", + "new_instance": "677c0215-4023-4648-ba02-4cbe3cffc627", + "old_exit_code": 0, + "drained_slots": [ + "api1" + ], + "stop_seconds": 1.168 + }, + { + "old_container": "6205d0db9981", + "new_container": "68b27434c3a1", + "new_instance": "a64d7a03-52c8-42e9-b205-18ea7884844b", + "old_exit_code": 0, + "drained_slots": [ + "api2" + ], + "stop_seconds": 0.895 + } + ] +} + Container mtusi2026lab1-api-15 Running + Container mtusi2026lab1-api-16 Running + Container mtusi2026lab1-api-17 Creating + Container mtusi2026lab1-api-17 Created + Container mtusi2026lab1-api-17 Starting + Container mtusi2026lab1-api-17 Started + Container mtusi2026lab1-api-16 Running + Container mtusi2026lab1-api-17 Running + Container mtusi2026lab1-api-18 Creating + Container mtusi2026lab1-api-18 Created + Container mtusi2026lab1-api-18 Starting + Container mtusi2026lab1-api-18 Started diff --git a/evidence/lab3-smoke.txt b/evidence/lab3-smoke.txt new file mode 100644 index 00000000..fc20f9dd --- /dev/null +++ b/evidence/lab3-smoke.txt @@ -0,0 +1 @@ +PASS: lab3 public API scenario; infrastructure and grading evidence remain separate. diff --git a/evidence/lab3-transfer-edge-checks.txt b/evidence/lab3-transfer-edge-checks.txt new file mode 100644 index 00000000..31b7c89e --- /dev/null +++ b/evidence/lab3-transfer-edge-checks.txt @@ -0,0 +1,18 @@ +{ + "result": "PASS", + "checks": [ + "duplicate Idempotency-Key and Content-Type rejected", + "strict integer and repeated query parameters", + "NUL/emoji user and chat Unicode roundtrip", + "100 code point names and 4000 code point messages", + "no text trim or silent Unicode normalization", + "16 conflicting simultaneous requests: 8 replayed winners, 8 conflicts, one DB row", + "DB failure after message INSERT rolls back message and key; same key succeeds after recovery", + "invalid cached Unicode/timezone falls back to DB with TTL", + "one TCP connection reaches both API" + ], + "keepalive_instances": [ + "1117b014-edbb-473e-ba6f-107991a36b0c", + "cf4df4a1-2ff5-4d04-a979-42a2425d3b80" + ] +} diff --git a/evidence/lab3-transfer-failover.txt b/evidence/lab3-transfer-failover.txt new file mode 100644 index 00000000..9bd4d7d8 --- /dev/null +++ b/evidence/lab3-transfer-failover.txt @@ -0,0 +1,3 @@ +Executing explicit failover hook; hook output suppressed to avoid leaking secrets. +{"observed_instances_before": 2, "successful_writes": 110, "failed_attempts": 3, "first_recovery_seconds": 2.597} +PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. diff --git a/evidence/lab3-transfer-final-smoke.txt b/evidence/lab3-transfer-final-smoke.txt new file mode 100644 index 00000000..fc20f9dd --- /dev/null +++ b/evidence/lab3-transfer-final-smoke.txt @@ -0,0 +1 @@ +PASS: lab3 public API scenario; infrastructure and grading evidence remain separate. diff --git a/evidence/lab3-transfer-migrations.txt b/evidence/lab3-transfer-migrations.txt new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/evidence/lab3-transfer-migrations.txt @@ -0,0 +1 @@ + diff --git a/evidence/lab3-transfer-persistence.txt b/evidence/lab3-transfer-persistence.txt new file mode 100644 index 00000000..749fd29b --- /dev/null +++ b/evidence/lab3-transfer-persistence.txt @@ -0,0 +1,2 @@ +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/lab3-transfer-quality.txt b/evidence/lab3-transfer-quality.txt new file mode 100644 index 00000000..5df37e93 --- /dev/null +++ b/evidence/lab3-transfer-quality.txt @@ -0,0 +1,8 @@ +.venv/bin/python scripts/check_contract.py +PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. +.venv/bin/python scripts/validate_openapi.py +PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested. +.venv/bin/python -m ruff check src +All checks passed! +.venv/bin/python -m ruff format --check src +48 files already formatted diff --git a/evidence/lab3-transfer-runtime.json b/evidence/lab3-transfer-runtime.json new file mode 100644 index 00000000..97d65595 --- /dev/null +++ b/evidence/lab3-transfer-runtime.json @@ -0,0 +1,22 @@ +{ + "project": "mtusi2026lab3", + "schema_revision": "006", + "api_instances": 2, + "api_states": { + "71547b2044ee": { + "status": "running", + "health": "healthy" + }, + "faa17650a7a8": { + "status": "running", + "health": "healthy" + } + }, + "public_sha256": { + "contracts/openapi.json": "9c3787e5d08a60c59ae67eeb429e9d75fbf134992a4e1f0954e926db49e111be", + "tests/client.py": "8d50976fc7c7bbb81e88a152f613c61ab25eaf53dba33c6a9dfab19f868d546d", + "tests/smoke.py": "52ac38eb343ff7d43e7543588e1da58ca06c9fce74b2b0d0bf0e4982bc23c1db", + "tests/resilience.py": "1f96663a174b3978d24eff66f2741f5f8c9b788d3242261d37a972720c52788b", + "tests/load.py": "6d3511ea719c7a7e841083e73d435c86dcbfd9f4e5c2a07d62eb9614b01d9933" + } +} diff --git a/evidence/lab3-transfer-runtime.txt b/evidence/lab3-transfer-runtime.txt new file mode 100644 index 00000000..83af50bf --- /dev/null +++ b/evidence/lab3-transfer-runtime.txt @@ -0,0 +1,11 @@ +persistence PASS +failover PASS + Container mtusi2026lab3-api-1 Running + Container mtusi2026lab3-api-2 Starting + Container mtusi2026lab3-api-2 Started + Container mtusi2026lab3-api-2 Waiting + Container mtusi2026lab3-api-1 Waiting + Container mtusi2026lab3-api-2 Healthy + Container mtusi2026lab3-api-1 Healthy +final-smoke PASS +PASS: transferred application retains data/session and survives API failover diff --git a/evidence/lab3-transfer-tests.txt b/evidence/lab3-transfer-tests.txt new file mode 100644 index 00000000..9e3e992c --- /dev/null +++ b/evidence/lab3-transfer-tests.txt @@ -0,0 +1,13 @@ +.venv/bin/python tests/smoke.py --base-url "http://localhost:8081" +PASS: lab3 public API scenario; infrastructure and grading evidence remain separate. +.venv/bin/python tests/lab3.py --base-url "http://localhost:8081" +{ + "parallel_repeats": 16, + "instances": [ + "1117b014-edbb-473e-ba6f-107991a36b0c", + "cf4df4a1-2ff5-4d04-a979-42a2425d3b80" + ], + "messages_created": 1, + "checks": "normalization, conflict, key scope, invalid keys, access, logout, headers", + "result": "PASS" +} diff --git a/evidence/lab3-unicode-migration.json b/evidence/lab3-unicode-migration.json new file mode 100644 index 00000000..8b663546 --- /dev/null +++ b/evidence/lab3-unicode-migration.json @@ -0,0 +1,23 @@ +{ + "before": { + "messages": { + "count": 83505, + "digest": "96926747176835df6a17d627a5a8ff32" + }, + "message_requests": { + "count": 82522, + "digest": "703190403d91cc26b340d25edf5ee6be" + } + }, + "after": { + "messages": { + "count": 83505, + "digest": "96926747176835df6a17d627a5a8ff32" + }, + "message_requests": { + "count": 82522, + "digest": "703190403d91cc26b340d25edf5ee6be" + } + }, + "same_existing_bytes": true +} diff --git a/evidence/lab3-unicode-names-migration.json b/evidence/lab3-unicode-names-migration.json new file mode 100644 index 00000000..07b0d432 --- /dev/null +++ b/evidence/lab3-unicode-names-migration.json @@ -0,0 +1,23 @@ +{ + "before": { + "users": { + "count": 297, + "digest": "aa93cf19bae06e20372f71b3c8ddd908" + }, + "chats": { + "count": 201, + "digest": "b626c1d4c74a5baa792cd6da396f06c2" + } + }, + "after": { + "users": { + "count": 297, + "digest": "aa93cf19bae06e20372f71b3c8ddd908" + }, + "chats": { + "count": 201, + "digest": "b626c1d4c74a5baa792cd6da396f06c2" + } + }, + "same_existing_bytes": true +} diff --git a/evidence/lab3-verify.txt b/evidence/lab3-verify.txt new file mode 100644 index 00000000..ef57a4f6 --- /dev/null +++ b/evidence/lab3-verify.txt @@ -0,0 +1,21 @@ +lab3-smoke.txt PASS +lab3-lab3.txt PASS +lab3-extra.txt PASS +lab3-regressions.txt PASS +lab3-production.txt PASS +lab3-db-idempotency.txt PASS +lab3-public-failover.txt PASS + Container mtusi2026lab1-api-16 Running + Container mtusi2026lab1-api-15 Starting + Container mtusi2026lab1-api-15 Started + Container mtusi2026lab1-api-16 Waiting + Container mtusi2026lab1-api-15 Waiting + Container mtusi2026lab1-api-16 Healthy + Container mtusi2026lab1-api-15 Healthy +Failure test 4856ec40e6db 87e7909e-5d06-4d0e-9314-5bdc86b2f617 +Failure test 6205d0db9981 f9491c25-70ac-4b45-935d-f742415b6366 +Both replicas survived sequential hard-failure tests +lab3-rolling.txt PASS +lab3-persistence.txt PASS +lab3-final-smoke.txt PASS +PASS: all lab3 acceptance checks diff --git a/examples/requests.http b/examples/requests.http index 492f9383..431683cd 100644 --- a/examples/requests.http +++ b/examples/requests.http @@ -20,11 +20,9 @@ Content-Type: application/json "password": "Example-only-not-a-real-secret-123" } -### Create session: generate the Base64 value locally, do not commit credentials -# Base64 of UTF-8 username:password; only this endpoint accepts Basic. +### Create session with Basic; the HTTP client encodes UTF-8 credentials POST {{baseUrl}}/api/v1/auth/sessions -Authorization: Basic REPLACE_WITH_LOCAL_BASE64_CREDENTIAL - +Authorization: Basic admin admin-password-123 ### Create chat; both UUIDs must be real registered users POST {{baseUrl}}/api/v1/chats @@ -35,8 +33,8 @@ Content-Type: application/json ### Send message POST {{baseUrl}}/api/v1/chats/{{chatId}}/messages +Idempotency-Key: {{$uuid}} Authorization: Bearer {{sessionToken}} -Idempotency-Key: example-message-001 Content-Type: application/json {"text":"Привет, Боб!"} diff --git a/infra/haproxy.cfg b/infra/haproxy.cfg new file mode 100644 index 00000000..5a96573b --- /dev/null +++ b/infra/haproxy.cfg @@ -0,0 +1,43 @@ +global + log stdout format raw local0 + maxconn 2048 + stats socket /tmp/haproxy.sock mode 600 level admin + stats socket ipv4@127.0.0.1:9999 level admin + +defaults + log global + mode http + option httplog + timeout connect 1s + timeout client 15s + timeout server 12s + timeout http-request 7s + timeout http-keep-alive 2s + timeout check 1s + # Не повторяем POST автоматически: неизвестный результат повторяет клиент + # с исходным Idempotency-Key. Соединения к недоступному API не ждут долго. + retries 0 + +resolvers docker + nameserver dns 127.0.0.11:53 + resolve_retries 3 + timeout resolve 1s + timeout retry 1s + hold valid 1s + hold obsolete 1s + hold nx 1s + hold timeout 1s + hold refused 1s + accepted_payload_size 8192 + +frontend public + bind :8080 + default_backend api_pool + +backend api_pool + balance roundrobin + option httpchk + http-check send meth GET uri /health/ready ver HTTP/1.1 hdr Host api + http-check expect status 200 + default-server inter 1s fastinter 500ms downinter 1s fall 2 rise 2 + server-template api 1-16 api:8080 check resolvers docker resolve-prefer ipv4 init-addr none diff --git a/lab.json b/lab.json index 57bb9fbb..5194777c 100644 --- a/lab.json +++ b/lab.json @@ -4,5 +4,5 @@ "contract_version": "1.3.0", "default_base_url": "http://localhost:8080", "grading": "3; 4 includes 3; 5 includes 4 plus one completed research track", - "scaffold_has_application": false + "scaffold_has_application": true } diff --git a/migrations/env.py b/migrations/env.py new file mode 100644 index 00000000..16eaf7ee --- /dev/null +++ b/migrations/env.py @@ -0,0 +1,34 @@ +import asyncio + +from alembic import context +from sqlalchemy import pool +from sqlalchemy.ext.asyncio import create_async_engine + +from src.core.db.models import Base +from src.core.settings import settings + +url = settings.sqlalchemy_database_url +target_metadata = Base.metadata + + +def run_migrations(connection): + context.configure(connection=connection, target_metadata=target_metadata, compare_type=True) + with context.begin_transaction(): + context.run_migrations() + + +async def run_online(): + engine = create_async_engine(url, poolclass=pool.NullPool) + try: + async with engine.connect() as connection: + await connection.run_sync(run_migrations) + finally: + await engine.dispose() + + +if context.is_offline_mode(): + context.configure(url=url, target_metadata=target_metadata, literal_binds=True) + with context.begin_transaction(): + context.run_migrations() +else: + asyncio.run(run_online()) diff --git a/migrations/script.py.mako b/migrations/script.py.mako new file mode 100644 index 00000000..5449f624 --- /dev/null +++ b/migrations/script.py.mako @@ -0,0 +1,17 @@ +"""${message}""" +from alembic import op +import sqlalchemy as sa +${imports if imports else ""} + +revision = ${repr(up_revision)} +down_revision = ${repr(down_revision)} +branch_labels = ${repr(branch_labels)} +depends_on = ${repr(depends_on)} + + +def upgrade(): + ${upgrades if upgrades else "pass"} + + +def downgrade(): + ${downgrades if downgrades else "pass"} diff --git a/migrations/versions/001_initial.py b/migrations/versions/001_initial.py new file mode 100644 index 00000000..b8cef401 --- /dev/null +++ b/migrations/versions/001_initial.py @@ -0,0 +1,60 @@ +"""Пользователи, чаты, участники, сообщения и сессии.""" +from alembic import op +import sqlalchemy as sa + +revision = '001' +down_revision = None +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'users', + sa.Column('id', sa.Uuid(), primary_key=True), + sa.Column('username', sa.String(32), nullable=False, unique=True), + sa.Column('display_name', sa.String(100), nullable=False), + sa.Column('password_hash', sa.Text(), nullable=False), + sa.Column('created_at', sa.DateTime(timezone=True), nullable=False), + sa.CheckConstraint("username ~ '^[a-z0-9_]{3,32}$'"), + sa.CheckConstraint('length(trim(display_name)) > 0'), + ) + op.create_table( + 'chats', + sa.Column('id', sa.Uuid(), primary_key=True), + sa.Column('title', sa.String(100), nullable=False), + sa.Column('created_at', sa.DateTime(timezone=True), nullable=False), + sa.CheckConstraint('length(trim(title)) > 0'), + ) + op.create_table( + 'chat_members', + sa.Column('chat_id', sa.Uuid(), sa.ForeignKey('chats.id', ondelete='CASCADE'), primary_key=True), + sa.Column('user_id', sa.Uuid(), sa.ForeignKey('users.id'), primary_key=True), + ) + op.create_index('chat_members_user_idx', 'chat_members', ['user_id', 'chat_id']) + op.create_table( + 'messages', + sa.Column('id', sa.Uuid(), primary_key=True), + sa.Column('chat_id', sa.Uuid(), sa.ForeignKey('chats.id'), nullable=False), + sa.Column('sender_id', sa.Uuid(), sa.ForeignKey('users.id'), nullable=False), + sa.Column('text', sa.String(4000), nullable=False), + sa.Column('created_at', sa.DateTime(timezone=True), nullable=False), + sa.ForeignKeyConstraint(['chat_id', 'sender_id'], ['chat_members.chat_id', 'chat_members.user_id']), + sa.CheckConstraint('length(trim(text)) > 0'), + ) + op.create_index('messages_history_idx', 'messages', ['chat_id', 'created_at', 'id']) + op.create_table( + 'sessions', + sa.Column('token_hash', sa.Text(), primary_key=True), + sa.Column('user_id', sa.Uuid(), sa.ForeignKey('users.id', ondelete='CASCADE'), nullable=False), + sa.Column('expires_at', sa.DateTime(timezone=True), nullable=False), + ) + op.create_index('sessions_expiry_idx', 'sessions', ['expires_at']) + + +def downgrade(): + op.drop_table('sessions') + op.drop_table('messages') + op.drop_table('chat_members') + op.drop_table('chats') + op.drop_table('users') diff --git a/migrations/versions/002_redis_sessions.py b/migrations/versions/002_redis_sessions.py new file mode 100644 index 00000000..109638b5 --- /dev/null +++ b/migrations/versions/002_redis_sessions.py @@ -0,0 +1,22 @@ +"""Сессии перенесены в Redis.""" +from alembic import op +import sqlalchemy as sa + +revision = '002' +down_revision = '001' +branch_labels = None +depends_on = None + + +def upgrade(): + op.drop_table('sessions') + + +def downgrade(): + op.create_table( + 'sessions', + sa.Column('token_hash', sa.Text(), primary_key=True), + sa.Column('user_id', sa.Uuid(), sa.ForeignKey('users.id', ondelete='CASCADE'), nullable=False), + sa.Column('expires_at', sa.DateTime(timezone=True), nullable=False), + ) + op.create_index('sessions_expiry_idx', 'sessions', ['expires_at']) diff --git a/migrations/versions/003_admin.py b/migrations/versions/003_admin.py new file mode 100644 index 00000000..7b57ee8c --- /dev/null +++ b/migrations/versions/003_admin.py @@ -0,0 +1,16 @@ +"""Признак системного администратора.""" +from alembic import op +import sqlalchemy as sa + +revision = '003' +down_revision = '002' +branch_labels = None +depends_on = None + + +def upgrade(): + op.add_column('users', sa.Column('is_admin', sa.Boolean(), nullable=False, server_default=sa.false())) + + +def downgrade(): + op.drop_column('users', 'is_admin') diff --git a/migrations/versions/004_idempotency.py b/migrations/versions/004_idempotency.py new file mode 100644 index 00000000..017366af --- /dev/null +++ b/migrations/versions/004_idempotency.py @@ -0,0 +1,25 @@ +"""Общая идемпотентность сообщений, совместимая с предыдущей схемой.""" + +from alembic import op +import sqlalchemy as sa + +revision = "004" +down_revision = "003" +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + "message_requests", + sa.Column("sender_id", sa.Uuid(), sa.ForeignKey("users.id"), primary_key=True), + sa.Column("chat_id", sa.Uuid(), sa.ForeignKey("chats.id"), primary_key=True), + sa.Column("key", sa.String(128), primary_key=True), + sa.Column("request_text", sa.String(4000), nullable=False), + sa.Column("message_id", sa.Uuid(), sa.ForeignKey("messages.id"), nullable=True), + sa.Column("expires_at", sa.DateTime(timezone=True), nullable=False), + ) + + +def downgrade(): + op.drop_table("message_requests") diff --git a/migrations/versions/005_message_unicode.py b/migrations/versions/005_message_unicode.py new file mode 100644 index 00000000..762803d8 --- /dev/null +++ b/migrations/versions/005_message_unicode.py @@ -0,0 +1,55 @@ +"""Сохранять весь допустимый Unicode сообщений, включая U+0000, без потерь.""" + +import sqlalchemy as sa +from alembic import op + +revision = "005" +down_revision = "004" +branch_labels = None +depends_on = None + + +def upgrade(): + op.drop_constraint("messages_text_check", "messages", type_="check") + op.alter_column( + "messages", + "text", + existing_type=sa.String(4000), + type_=sa.LargeBinary(), + existing_nullable=False, + postgresql_using="convert_to(text, 'UTF8')", + ) + op.alter_column( + "message_requests", + "request_text", + existing_type=sa.String(4000), + type_=sa.LargeBinary(), + existing_nullable=False, + postgresql_using="convert_to(request_text, 'UTF8')", + ) + op.create_check_constraint( + "messages_text_bytes_check", "messages", "octet_length(text) BETWEEN 1 AND 16000" + ) + + +def downgrade(): + # convert_from откажет при наличии U+0000: не удаляем символы или строки + # молча. Откат возможен только если все данные представимы в PostgreSQL text. + op.drop_constraint("messages_text_bytes_check", "messages", type_="check") + op.alter_column( + "messages", + "text", + existing_type=sa.LargeBinary(), + type_=sa.String(4000), + existing_nullable=False, + postgresql_using="convert_from(text, 'UTF8')", + ) + op.alter_column( + "message_requests", + "request_text", + existing_type=sa.LargeBinary(), + type_=sa.String(4000), + existing_nullable=False, + postgresql_using="convert_from(request_text, 'UTF8')", + ) + op.create_check_constraint("messages_text_check", "messages", "length(trim(text)) > 0") diff --git a/migrations/versions/006_unicode_names.py b/migrations/versions/006_unicode_names.py new file mode 100644 index 00000000..e60df496 --- /dev/null +++ b/migrations/versions/006_unicode_names.py @@ -0,0 +1,40 @@ +"""Сохранение допустимого Unicode имён и названий, включая U+0000.""" + +import sqlalchemy as sa +from alembic import op + +revision = "006" +down_revision = "005" +branch_labels = None +depends_on = None + + +def upgrade(): + for table, column in [("users", "display_name"), ("chats", "title")]: + op.drop_constraint(f"{table}_{column}_check", table, type_="check") + op.alter_column( + table, + column, + existing_type=sa.String(100), + type_=sa.LargeBinary(), + existing_nullable=False, + postgresql_using=f"convert_to({column}, 'UTF8')", + ) + op.create_check_constraint( + f"{table}_{column}_bytes_check", table, f"octet_length({column}) BETWEEN 1 AND 400" + ) + + +def downgrade(): + # PostgreSQL откажет при U+0000 и откатит транзакцию вместо потери символов. + for table, column in [("users", "display_name"), ("chats", "title")]: + op.drop_constraint(f"{table}_{column}_bytes_check", table, type_="check") + op.alter_column( + table, + column, + existing_type=sa.LargeBinary(), + type_=sa.String(100), + existing_nullable=False, + postgresql_using=f"convert_from({column}, 'UTF8')", + ) + op.create_check_constraint(f"{table}_{column}_check", table, f"length(trim({column})) > 0") diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..6c704779 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[tool.ruff] +target-version = "py313" +line-length = 100 +include = ["src/**/*.py"] + +[tool.ruff.lint] +select = ["E4", "E7", "E9", "F", "I"] diff --git a/requirements-dev.txt b/requirements-dev.txt index 6b103ddb..fc598663 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,2 +1,6 @@ -# Only for full OpenAPI/JSON Schema validation; HTTP tests use stdlib. +# Development tools: OpenAPI validation, linting and formatting. HTTP tests use stdlib. openapi-spec-validator==0.7.2 +ruff==0.14.2 + +# Research charts (not installed in the application image). +matplotlib==3.11.2 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..284bbcf5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,19 @@ +annotated-doc==0.0.5 +annotated-types==0.8.0 +anyio==4.15.1 +click==8.5.0 +fastapi==0.141.1 +h11==0.16.0 +idna==3.20 +pydantic==2.13.5 +pydantic-core==2.46.5 +starlette==1.7.0 +typing-extensions==4.16.0 +typing-inspection==0.4.4 +uvicorn==0.53.0 +asyncpg==0.30.0 +redis==5.2.1 +argon2-cffi==25.1.0 +SQLAlchemy[asyncio]==2.0.44 +alembic==1.17.0 +pydantic-settings==2.15.0 diff --git a/scripts/audit-dependencies.py b/scripts/audit-dependencies.py new file mode 100644 index 00000000..24b164a4 --- /dev/null +++ b/scripts/audit-dependencies.py @@ -0,0 +1,61 @@ +"""Проверка реально установленных Python-пакетов API через публичную базу OSV.""" +import argparse +from concurrent.futures import ThreadPoolExecutor +from datetime import datetime, timezone +import json +from pathlib import Path +import subprocess +import ssl +from urllib.request import Request, urlopen + + +def fetch(url, data=None): + request = Request(url, data=None if data is None else json.dumps(data).encode(), + headers={'Content-Type': 'application/json'}) + with urlopen(request, timeout=30, context=TLS_CONTEXT) as response: + return json.load(response) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--output', default='evidence/lab2-production-dependencies.json') + parser.add_argument('--ca-file', help='Дополнительный доверенный CA bundle; TLS-проверка остаётся включённой') + args = parser.parse_args() + global TLS_CONTEXT + TLS_CONTEXT = ssl.create_default_context(cafile=args.ca_file) + raw = subprocess.check_output(['docker', 'compose', 'exec', '-T', 'api', 'python', '-c', + 'import importlib.metadata as m,json; print(json.dumps(sorted({d.metadata["Name"]:d.version for d in m.distributions()}.items())))'], + text=True, timeout=20) + packages = json.loads(raw) + queries = [{'package': {'ecosystem': 'PyPI', 'name': name}, 'version': version} + for name, version in packages] + pending = list(enumerate(queries)) + vulnerabilities = {i: set() for i in range(len(packages))} + while pending: + results = fetch('https://api.osv.dev/v1/querybatch', {'queries': [q for _, q in pending]})['results'] + if len(results) != len(pending): + raise RuntimeError('Неполный ответ OSV') + next_pending = [] + for (index, query), result in zip(pending, results): + vulnerabilities[index].update(v['id'] for v in result.get('vulns', [])) + if result.get('next_page_token'): + next_pending.append((index, {**query, 'page_token': result['next_page_token']})) + pending = next_pending + ids = sorted(set().union(*vulnerabilities.values())) + with ThreadPoolExecutor(max_workers=4) as pool: + records = dict(zip(ids, pool.map(lambda i: fetch('https://api.osv.dev/v1/vulns/' + i), ids))) + findings = [{'name': packages[i][0], 'version': packages[i][1], + 'vulnerabilities': [records[v] for v in sorted(found)]} + for i, found in vulnerabilities.items() if found] + report = {'checked_at_utc': datetime.now(timezone.utc).isoformat(), + 'source': 'https://api.osv.dev/v1/querybatch', 'packages': packages, 'findings': findings, + 'scope': 'Python packages in running API; excludes OS/container image vulnerabilities'} + Path(args.output).write_text(json.dumps(report, ensure_ascii=False, indent=2) + '\n') + print('OSV: проверено пакетов:', len(packages), '; пакетов с известными advisory:', len(findings)) + for finding in findings: + print(finding['name'], finding['version'], ', '.join(v['id'] for v in finding['vulnerabilities'])) + raise SystemExit(bool(findings)) + + +if __name__ == '__main__': + main() diff --git a/scripts/audit-lab3.py b/scripts/audit-lab3.py new file mode 100644 index 00000000..0335edf3 --- /dev/null +++ b/scripts/audit-lab3.py @@ -0,0 +1,550 @@ +"""Воспроизведение замечаний к lab3. Только текущий локальный Compose-стенд. +Временные переименования, pause и замены контейнеров восстанавливаются в finally. +Секреты не печатаются. Все созданные пользователи и сообщения синтетические. +""" + +import argparse +import base64 +import http.client +import json +import os +import subprocess +import sys +import threading +import time +import uuid +from concurrent.futures import ThreadPoolExecutor +from urllib.parse import urlsplit + +from replicas import ( + ROOT, + compose, + containers, + describe, + docker, + instance_id, + wait_ready, + wait_visible, +) + +sys.path.insert(0, str(ROOT / "tests")) +from client import Client + +EVIDENCE = ROOT / "evidence" + + +def sql(query): + return subprocess.check_output( + [ + "docker", + "compose", + "exec", + "-T", + "postgres", + "sh", + "-c", + 'exec psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" -At', + ], + cwd=ROOT, + input=query, + text=True, + timeout=15, + ).strip() + + +def wire(method, path, actor=None, body=None, timeout=7): + url = urlsplit(os.environ.get("BASE_URL", "http://localhost:8080")) + headers = {"Content-Type": "application/json"} + if actor: + headers["Authorization"] = "Bearer " + actor["token"] + conn = http.client.HTTPConnection(url.hostname, url.port, timeout=timeout) + before = time.monotonic() + try: + conn.request( + method, + path, + body=None if body is None else json.dumps(body).encode(), + headers=headers, + ) + response = conn.getresponse() + response.read() + return { + "status": response.status, + "seconds": round(time.monotonic() - before, 3), + "instance": response.getheader("X-Instance-Id"), + } + finally: + conn.close() + + +def direct_ready(cid): + code = """import urllib.request,urllib.error +try: r=urllib.request.urlopen('http://127.0.0.1:8080/health/ready',timeout=6) +except urllib.error.HTTPError as e: r=e +with r: print(r.status) +""" + return int(docker("exec", cid, "python", "-c", code)) + + +def restored(): + for cid in containers(): + wait_visible(wait_ready(cid)) + + +def contract(): + client = Client() + alice, bob, eve, chat = client.bootstrap() + path = "/api/v1/chats/" + chat["id"] + "/messages" + for endpoint in ["/api/v1/chats", path]: + for query in [ + "cursor=W10", + "cursor=bnVsbA", + "limit=abc", + "limit=0", + "limit=101", + ]: + client.call("GET", endpoint + "?" + query, 400, actor=alice) + # Unicode Basic password including colon and no body on login. + registration = { + "username": "audit_utf_" + uuid.uuid4().hex[:12], + "display_name": "Unicode", + "password": "пароль:😀с-пробелом 123", + } + client.call("POST", "/api/v1/users", 201, body=registration, schema="User") + basic = ( + "Basic " + + base64.b64encode( + (registration["username"] + ":" + registration["password"]).encode() + ).decode() + ) + client.call( + "POST", + "/api/v1/auth/sessions", + 201, + headers={"Authorization": basic}, + schema="Session", + ) + client.call( + "POST", + "/api/v1/auth/sessions", + 400, + raw=b"{}", + headers={"Authorization": basic}, + ) + client.call( + "POST", + "/api/v1/chats", + 400, + actor=alice, + body={ + "title": "Unknown member", + "member_ids": [alice["id"], str(uuid.uuid4())], + }, + ) + # Empty page limit=7 is warmed before the successful write. + assert not client.call("GET", path + "?limit=7", actor=alice, schema="MessagePage")[ + "json" + ]["items"] + key = uuid.uuid4().hex + barrier = threading.Barrier(16) + clients = [Client() for _ in range(16)] + message = "Начало\u0000конец 👋" + + def send(local): + barrier.wait() + return local.message(alice, chat, message, key=key) + + with ThreadPoolExecutor(max_workers=16) as pool: + responses = list(pool.map(send, clients)) + original = responses[0]["json"] + assert all(r["json"] == original for r in responses) + observed = {r["headers"]["X-Instance-Id"] for r in responses} + assert len(observed) >= 2 + assert int(sql(f"SELECT count(*) FROM messages WHERE chat_id='{chat['id']}'")) == 1 + assert ( + int(sql(f"SELECT count(*) FROM message_requests WHERE chat_id='{chat['id']}'")) + == 1 + ) + assert ( + int( + sql( + f"SELECT position(decode('00','hex') IN text) FROM messages WHERE id='{original['id']}'" + ) + ) + > 0 + ) + for limit in [1, 7, 10, 20, 50, 100]: + result = client.call( + "GET", path + "?limit=" + str(limit), actor=bob, schema="MessagePage" + )["json"] + assert result["items"] == [original], "Stale history or lost U+0000" + client.call( + "POST", + path, + 409, + actor=alice, + body={"text": "changed"}, + headers={"Idempotency-Key": key}, + ) + chat2 = client.call( + "POST", + "/api/v1/chats", + 201, + actor=alice, + body={"title": "Other chat", "member_ids": [alice["id"]]}, + schema="Chat", + )["json"] + client.message(alice, chat2, message, key=key) + client.message(bob, chat, message, key=key) + for bad in ["", "x" * 129, "bad key", "bad/key"]: + client.call( + "POST", + path, + 400, + actor=alice, + body={"text": "bad key"}, + headers={"Idempotency-Key": bad}, + ) + # Bind cursor to actual chat; limit=1 produces a nonempty cursor. + page = client.call("GET", path + "?limit=1", actor=alice, schema="MessagePage")[ + "json" + ] + client.call( + "GET", + "/api/v1/chats/" + chat2["id"] + "/messages?cursor=" + page["next_cursor"], + 400, + actor=alice, + ) + large = client.call( + "POST", + path, + 413, + actor=alice, + raw=b'{"text":"valid"}' + b" " * 70000, + headers={ + "Content-Type": "application/json", + "Idempotency-Key": uuid.uuid4().hex, + }, + ) + assert large["headers"]["X-Instance-Id"] and large["headers"]["X-Request-Id"] + # A raw U+0000 is illegal JSON; escaped \u0000 is valid and must round-trip. + client.call( + "POST", + path, + 400, + actor=alice, + raw=b'{"text":"bad\x00json"}', + headers={ + "Content-Type": "application/json", + "Idempotency-Key": uuid.uuid4().hex, + }, + ) + client.call( + "POST", + path, + 404, + actor=eve, + body={"text": message}, + headers={"Idempotency-Key": key}, + ) + # Exercise boundary on Unicode code points, not UTF-8 byte count. + long_message = client.message(alice, chat, "\u0000" * 4000)["json"] + assert long_message["text"] == "\u0000" * 4000 + replay = client.message(alice, chat, message, key=key) + assert replay["json"] == original + return { + "result": "PASS", + "simultaneous_requests": 16, + "observed_instances": sorted(observed), + "database_rows_for_first_key": 1, + "headers_413": "present", + "nul_roundtrip": "201, replay and history; 4000 code points supported", + "checks": [ + "invalid cursor types/limit", + "UTF-8 Basic", + "login body rejected", + "unknown member 400", + "key scope/format", + "foreign cursor", + "fresh history limit=7 and other limits", + "outsider hidden", + "raw invalid JSON rejected", + ], + } + + +def readiness(): + client = Client() + actor = client.user("audit_ready") + evidence = [] + for table in ["users", "chats", "chat_members", "messages", "message_requests"]: + hidden = "audit_hidden_" + table + try: + sql(f"ALTER TABLE {table} RENAME TO {hidden}") + statuses = {cid[:12]: direct_ready(cid) for cid in containers()} + assert set(statuses.values()) == {503}, statuses + deadline = time.monotonic() + 8 + while wire("GET", "/api/v1/users/me", actor)["status"] != 503: + assert time.monotonic() < deadline, "LB still routes to unready API" + time.sleep(0.2) + results = [] + for _ in range(8): + result = wire("GET", "/api/v1/users/me", actor) + assert result["status"] == 503, result + results.append(result) + registration = wire( + "POST", + "/api/v1/users", + body={ + "username": "blocked_" + uuid.uuid4().hex[:12], + "display_name": "Must not route", + "password": "valid-audit-password-123", + }, + ) + assert registration["status"] == 503, registration + evidence.append( + { + "missing_table": table, + "direct_readiness": statuses, + "business_requests": results, + "registration": registration, + } + ) + finally: + sql(f"ALTER TABLE IF EXISTS {hidden} RENAME TO {table}") + restored() + return {"result": "PASS", "experiments": evidence} + + +def frozen_stores(): + client = Client() + actor = client.user("audit_pause") + client.call("GET", "/api/v1/users/me", actor=actor, schema="User") + evidence = [] + for service in ["postgres", "redis"]: + try: + began = time.monotonic() + compose("pause", service) + transition = wire("GET", "/health/ready") + assert transition["status"] == 503, transition + assert transition["seconds"] < 7 + # Allow active checks to exclude all API, then test the LB route, + # including registration that itself does not depend on Redis. + time.sleep(4) + result = wire("GET", "/api/v1/users/me", actor) + registration = wire( + "POST", + "/api/v1/users", + body={ + "username": "paused_" + uuid.uuid4().hex[:12], + "display_name": "Paused store", + "password": "valid-audit-password-123", + }, + ) + assert result["status"] == registration["status"] == 503, ( + result, + registration, + ) + evidence.append( + { + "service": service, + "initial_ready_request": transition, + "business": result, + "registration": registration, + "elapsed_seconds": round(time.monotonic() - began, 3), + } + ) + finally: + compose("unpause", service) + restored() + client.call("GET", "/api/v1/users/me", actor=actor, schema="User") + return {"result": "PASS", "experiments": evidence} + + +def changing_ips(): + client = Client() + actor = client.user("audit_dns") + chat = client.call( + "POST", + "/api/v1/chats", + 201, + actor=actor, + body={"title": "Forced new IPs", "member_ids": [actor["id"]]}, + schema="Chat", + )["json"] + originals = containers() + lb = compose("ps", "-q", "lb") + lb_started = describe(lb)["StartedAt"] + holders = [] + events = [] + occupied = [] + try: + for old in originals: + networks = json.loads( + docker("inspect", "--format", "{{json .NetworkSettings.Networks}}", old) + ) + assert len(networks) == 1 + network, state = next(iter(networks.items())) + ip = state["IPAddress"] + alias = instance_id(old) + docker("stop", "--time", "10", old) + docker("rm", old) + holder = "lab3-audit-ip-" + uuid.uuid4().hex[:10] + docker( + "run", + "-d", + "--name", + holder, + "--network", + network, + "--ip", + ip, + "--cpus", + ".05", + "--memory", + "32m", + "--read-only", + "--cap-drop", + "ALL", + "--entrypoint", + "python", + "mtusi-messenger:lab3", + "-c", + "import time; time.sleep(900)", + ) + holders.append(holder) + occupied.append(ip) + before = set(containers()) + compose("up", "-d", "--no-deps", "--no-recreate", "--scale", "api=2", "api") + added = set(containers()) - before + assert len(added) == 1 + new = added.pop() + new_alias = wait_ready(new) + new_ip = docker( + "inspect", + "--format", + "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}", + new, + ) + assert new_ip not in occupied + began = time.monotonic() + wait_visible(new_alias, timeout=10) + message = client.message(actor, chat, "DNS " + new_alias)["json"] + page = client.call( + "GET", + "/api/v1/chats/" + chat["id"] + "/messages", + actor=actor, + schema="MessagePage", + )["json"] + assert message in page["items"] + events.append( + { + "old_container": old[:12], + "old_ip": ip, + "old_instance": alias, + "new_container": new[:12], + "new_ip": new_ip, + "new_instance": new_alias, + "discovery_after_ready_seconds": round(time.monotonic() - began, 3), + } + ) + observed = { + client.call("GET", "/api/v1/users/me", actor=actor, schema="User")[ + "headers" + ]["X-Instance-Id"] + for _ in range(40) + } + assert observed == {e["new_instance"] for e in events}, observed + assert describe(lb)["StartedAt"] == lb_started, "HAProxy was restarted" + return { + "result": "PASS", + "events": events, + "observed_instances_after": sorted(observed), + "lb_restarted": False, + "old_ips_kept_occupied_during_test": occupied, + } + finally: + for holder in holders: + docker("rm", "-f", holder) + compose("up", "-d", "--no-deps", "--wait", "api") + restored() + + +def limits_and_evidence(): + limits = {} + for service in ["api", "postgres", "redis", "lb", "migration"]: + limits[service] = [] + for cid in compose("ps", "--all", "-q", service).split(): + state = json.loads( + docker("inspect", "--format", "{{json .HostConfig}}", cid) + ) + record = { + "container": cid[:12], + "cpu": state["NanoCpus"] / 1e9, + "memory_bytes": state["Memory"], + } + assert record["cpu"] > 0 and record["memory_bytes"] > 0 + if service == "api": + assert not state["PortBindings"] + limits[service].append(record) + rows = json.loads((EVIDENCE / "lab3-research/results.json").read_text()) + for series in ["fixed", "growing"]: + for count in [1, 2, 4]: + assert any( + r["job"]["series"] == series and r["job"]["replicas"] == count + for r in rows + ) + fixed = [r for r in rows if r["job"]["series"] == "fixed"] + assert {r["job"]["replicas"] * r["job"]["cpus"] for r in fixed} == {2.0} + assert {r["job"]["replicas"] * int(r["job"]["memory"][:-1]) for r in fixed} == { + 1024 + } + assert any(r["job"]["series"] == "improved-db" for r in rows) + for name in ["results.json", "summary.csv", "scaling.png", "bottleneck.png"]: + assert (EVIDENCE / "lab3-research" / name).stat().st_size > 0 + # The rolling command explicitly invokes Python and needs no executable bit. + assert "$(PYTHON) scripts/rolling-update.py" in (ROOT / "Makefile").read_text() + for file in ["scripts/restart.sh", "scripts/stop-one.sh"]: + assert (ROOT / file).stat().st_mode & 0o111 + return { + "result": "PASS", + "limits": limits, + "fixed_api_budget": {"cpu": 2, "memory_mib": 1024}, + "research_runs": len(rows), + "rolling_command": "python3 scripts/rolling-update.py", + "shell_hooks_executable": True, + } + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--phase", choices=["all", "contract", "infrastructure"], default="all" + ) + args = parser.parse_args() + checks = [("contract", contract)] if args.phase == "contract" else [] + if args.phase == "all": + checks.append(("contract", contract)) + if args.phase in ["all", "infrastructure"]: + checks += [ + ("readiness", readiness), + ("frozen-stores", frozen_stores), + ("changing-ips", changing_ips), + ("limits-evidence", limits_and_evidence), + ] + summary = {} + for name, check in checks: + print("Checking " + name, flush=True) + result = check() + (EVIDENCE / ("lab3-audit-" + name + ".json")).write_text( + json.dumps(result, ensure_ascii=False, indent=2) + "\n" + ) + summary[name] = "PASS" + print(name + " PASS", flush=True) + (EVIDENCE / ("lab3-audit-summary-" + args.phase + ".json")).write_text( + json.dumps(summary, indent=2) + "\n" + ) + + +if __name__ == "__main__": + main() diff --git a/scripts/benchmark.py b/scripts/benchmark.py new file mode 100644 index 00000000..866b2cb4 --- /dev/null +++ b/scripts/benchmark.py @@ -0,0 +1,167 @@ +"""Повторяемый closed-loop: постоянные HTTP-соединения, 80% POST / 20% GET. +Не измеряет open-loop SLA. Ошибки и задержки всех попыток учитываются отдельно. +""" + +import http.client +import json +import math +import os +import sys +import threading +import time +import uuid +from collections import Counter +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path +from urllib.parse import urlsplit + +from runtime_config import base_url + +os.environ.setdefault("BASE_URL", base_url()) + +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "tests")) +from client import Client + + +def fixture(): + c = Client(os.environ.get("BASE_URL")) + actor = c.user("bench") + chat = c.call( + "POST", + "/api/v1/chats", + 201, + actor=actor, + body={"title": "Synthetic benchmark", "member_ids": [actor["id"]]}, + schema="Chat", + )["json"] + for n in range(20): + c.message(actor, chat, "seed-%d" % n) + return actor, chat + + +def measure(actor, chat, duration=15, concurrency=16, event=None): + url = urlsplit(os.environ.get("BASE_URL", "http://localhost:8080")) + assert url.scheme == "http", "Local isolated HTTP benchmark only" + path = "/api/v1/chats/" + chat["id"] + "/messages" + barrier = threading.Barrier(concurrency + 1) + start = [None] + prefix = uuid.uuid4().hex + + def worker(index): + connection = http.client.HTTPConnection(url.hostname, url.port or 80, timeout=5) + headers = { + "Authorization": "Bearer " + actor["token"], + "Content-Type": "application/json", + } + latencies, successes, failures, instances, seconds, confirmations = ( + [], + Counter(), + Counter(), + set(), + {}, + [], + ) + completed = [] + counter = 0 + barrier.wait() + while time.monotonic() < start[0] + duration: + write = counter % 5 != 4 + key = "%s-%d-%d" % (prefix, index, counter) + body = json.dumps({"text": "load-" + key}) if write else None + before = time.monotonic() + status = 0 + try: + connection.request( + "POST" if write else "GET", + path if write else path + "?limit=20", + body=body, + headers={**headers, "Idempotency-Key": key}, + ) + response = connection.getresponse() + data = response.read() + status = response.status + if status == (201 if write else 200): + parsed = json.loads(data) + successes["write" if write else "read"] += 1 + instances.add(response.getheader("X-Instance-Id")) + completed.append((time.monotonic(), "write" if write else "read")) + if write: + confirmations.append((key, parsed["id"])) + else: + failures[str(status)] += 1 + except (OSError, http.client.HTTPException, ValueError): + failures["connection"] += 1 + connection.close() + elapsed = time.monotonic() - before + latencies.append((elapsed, status == (201 if write else 200))) + bucket = int(before - start[0]) + record = seconds.setdefault(bucket, {"success": 0, "error": 0}) + record["success" if status == (201 if write else 200) else "error"] += 1 + counter += 1 + connection.close() + return ( + latencies, + successes, + failures, + instances, + seconds, + confirmations, + completed, + ) + + with ThreadPoolExecutor(max_workers=concurrency) as pool: + futures = [pool.submit(worker, i) for i in range(concurrency)] + start[0] = time.monotonic() + barrier.wait() + results = [f.result() for f in futures] + elapsed = time.monotonic() - start[0] + latencies = sorted(v for r in results for v, _ in r[0]) + successful = sorted(v for r in results for v, ok in r[0] if ok) + successes, failures, instances, seconds = Counter(), Counter(), set(), {} + for _, ok, bad, seen, buckets, _, _ in results: + successes.update(ok) + failures.update(bad) + instances.update(seen) + for b, counts in buckets.items(): + dest = seconds.setdefault(b, {"success": 0, "error": 0}) + for k, v in counts.items(): + dest[k] += v + + def percentiles(values): + return { + name: round(values[max(0, math.ceil(p * len(values)) - 1)] * 1000, 3) + if values + else None + for name, p in [("p50", 0.5), ("p95", 0.95), ("p99", 0.99)] + } + + report = { + "duration_seconds": duration, + "elapsed_seconds": round(elapsed, 3), + "concurrency": concurrency, + "successes": dict(successes), + "errors": dict(failures), + "rps": round(sum(successes.values()) / elapsed, 3), + "all_attempt_latency_ms": percentiles(latencies), + "successful_latency_ms": percentiles(successful), + "instances": sorted(instances), + "seconds": seconds, + "profile": "closed-loop, keepalive, 80% unique POST/20% GET first 20, no retries", + } + if event: + report["first_success_after_action_seconds"] = { + kind: round( + min( + ( + at - event[0] + for r in results + for at, method in r[6] + if method == kind and at >= event[0] + ), + default=duration, + ), + 3, + ) + for kind in ["read", "write"] + } + return report, [x for r in results for x in r[5]] diff --git a/scripts/check-transfer.py b/scripts/check-transfer.py new file mode 100644 index 00000000..9f8adfa0 --- /dev/null +++ b/scripts/check-transfer.py @@ -0,0 +1,73 @@ +"""Проверка реализации в новом клоне: контракт, restart и отказ одной API.""" + +import hashlib +import json +import subprocess +import sys + +from replicas import ROOT, compose, containers, describe, wait_ready, wait_visible + + +def check(name, *command): + result = subprocess.run(command, cwd=ROOT, text=True, capture_output=True) + (ROOT / "evidence" / ("lab3-transfer-" + name + ".txt")).write_text( + result.stdout + result.stderr + ) + print(name, "PASS" if result.returncode == 0 else "FAIL", flush=True) + if result.returncode: + raise RuntimeError((result.stdout + result.stderr)[-2000:]) + + +check( + "persistence", + sys.executable, + "tests/resilience.py", + "--mode", + "persistence", + "--action-script", + "scripts/restart.sh", +) +try: + check( + "failover", + sys.executable, + "tests/resilience.py", + "--mode", + "failover", + "--action-script", + "scripts/stop-one.sh", + ) +finally: + compose("up", "-d", "--no-deps", "--wait", "api") + for cid in containers(): + wait_visible(wait_ready(cid)) +check("final-smoke", sys.executable, "tests/smoke.py") +logs = compose("logs", "--no-color", "migration") +(ROOT / "evidence/lab3-transfer-migrations.txt").write_text(logs + "\n") +proof = { + "project": "mtusi2026lab3", + "schema_revision": "006", + "api_instances": len(containers()), + "api_states": { + cid[:12]: { + "status": describe(cid)["Status"], + "health": describe(cid).get("Health", {}).get("Status"), + } + for cid in containers() + }, + "public_sha256": { + name: hashlib.sha256((ROOT / name).read_bytes()).hexdigest() + for name in [ + "contracts/openapi.json", + "tests/client.py", + "tests/smoke.py", + "tests/resilience.py", + "tests/load.py", + ] + }, +} +assert proof["api_instances"] == 2 +(ROOT / "evidence/lab3-transfer-runtime.json").write_text( + json.dumps(proof, ensure_ascii=False, indent=2) + "\n" +) +print("PASS: transferred application retains data/session and survives API failover", flush=True) diff --git a/scripts/edge-audit-lab3.py b/scripts/edge-audit-lab3.py new file mode 100644 index 00000000..1ea0d651 --- /dev/null +++ b/scripts/edge-audit-lab3.py @@ -0,0 +1,344 @@ +"""Дополнительный adversarial-аудит: неоднозначность, Unicode, гонки, rollback. +Только синтетические данные. Временный DB-trigger действует на один случайный +ключ и удаляется в finally. Повреждённый кэш восстанавливается из PostgreSQL. +""" + +import base64 +import http.client +import json +import os +import subprocess +import sys +import threading +import uuid +from concurrent.futures import ThreadPoolExecutor +from urllib.parse import urlencode, urlsplit + +from replicas import ROOT + +sys.path.insert(0, str(ROOT / "tests")) +from client import Client + + +def sql(query): + return subprocess.check_output( + [ + "docker", + "compose", + "exec", + "-T", + "postgres", + "sh", + "-c", + 'exec psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" -At', + ], + cwd=ROOT, + input=query, + text=True, + timeout=15, + ).strip() + + +def redis(*args, raw=None): + command = ["docker", "compose", "exec", "-T", "redis", "redis-cli", "--raw"] + if raw is not None: + command += ["-x"] + return subprocess.check_output( + command + list(args), cwd=ROOT, input=raw, timeout=10 + ).rstrip(b"\n") + + +def duplicate_headers(path, actor, pairs): + body = b'{"text":"ambiguous headers"}' + conn = http.client.HTTPConnection( + urlsplit(os.environ.get("BASE_URL", "http://localhost:8080")).hostname, + urlsplit(os.environ.get("BASE_URL", "http://localhost:8080")).port or 80, + timeout=5, + ) + try: + conn.putrequest("POST", path) + for name, value in [ + ("Authorization", "Bearer " + actor["token"]), + ("Content-Length", str(len(body))), + *pairs, + ]: + conn.putheader(name, value) + conn.endheaders(body) + response = conn.getresponse() + response.read() + assert response.status == 400, response.status + assert response.getheader("X-Instance-Id") and response.getheader( + "X-Request-Id" + ) + finally: + conn.close() + + +def main(): + client = Client() + alice, bob, eve, chat = client.bootstrap() + path = "/api/v1/chats/" + chat["id"] + "/messages" + duplicate_headers( + path, + alice, + [ + ("Content-Type", "application/json"), + ("Idempotency-Key", uuid.uuid4().hex), + ("Idempotency-Key", uuid.uuid4().hex), + ], + ) + duplicate_headers( + path, + alice, + [ + ("Content-Type", "application/json"), + ("Content-Type", "text/plain"), + ("Idempotency-Key", uuid.uuid4().hex), + ], + ) + for endpoint in ["/api/v1/chats", path]: + for val in ["1.0", "1e0", "+1", " 1 ", "١", "true", "-1", "101"]: + client.call( + "GET", endpoint + "?" + urlencode({"limit": val}), 400, actor=alice + ) + for query in ["limit=1&limit=100", "cursor=W10&cursor=bnVsbA", "extra=1"]: + client.call("GET", endpoint + "?" + query, 400, actor=alice) + # Every Unicode scalar permitted by the contract is stored unchanged. + special = "Имя\u0000😀" + registration = { + "username": "edge_" + uuid.uuid4().hex[:16], + "display_name": special, + "password": " пароль:\u0000😀с пробелами ", + } + registered = client.call( + "POST", "/api/v1/users", 201, body=registration, schema="User" + )["json"] + assert registered["display_name"] == special + basic = ( + "Basic " + + base64.b64encode( + (registration["username"] + ":" + registration["password"]).encode() + ).decode() + ) + session = client.call( + "POST", + "/api/v1/auth/sessions", + 201, + headers={"Authorization": basic}, + schema="Session", + )["json"] + assert session["user"] == registered + special_actor = {"id": registered["id"], "token": session["token"]} + assert ( + client.call("GET", "/api/v1/users/me", actor=special_actor, schema="User")[ + "json" + ] + == registered + ) + title = "Чат\u0000😀" + special_chat = client.call( + "POST", + "/api/v1/chats", + 201, + actor=special_actor, + body={"title": title, "member_ids": [registered["id"]]}, + schema="Chat", + )["json"] + assert special_chat["title"] == title + assert ( + client.call( + "GET", + "/api/v1/chats/" + special_chat["id"], + actor=special_actor, + schema="Chat", + )["json"] + == special_chat + ) + maximum_name = { + **registration, + "username": "max_" + uuid.uuid4().hex[:16], + "display_name": "😀" * 100, + } + assert ( + client.call("POST", "/api/v1/users", 201, body=maximum_name, schema="User")[ + "json" + ]["display_name"] + == "😀" * 100 + ) + max_chat = client.call( + "POST", + "/api/v1/chats", + 201, + actor=alice, + body={"title": "😀" * 100, "member_ids": [alice["id"]]}, + schema="Chat", + )["json"] + assert max_chat["title"] == "😀" * 100 + for value in ["\u0000", "😀" * 4000, "e\u0301", "\u200b", " Пробелы\nсохраняются "]: + assert client.message(alice, chat, value)["json"]["text"] == value + for value in ["😀" * 4001, "\u2003" * 4, None, 123, True, [], {}]: + client.call( + "POST", + path, + 400, + actor=alice, + body={"text": value}, + headers={"Idempotency-Key": uuid.uuid4().hex}, + ) + same_key = uuid.uuid4().hex + client.message(alice, chat, "é", key=same_key) + client.call( + "POST", + path, + 409, + actor=alice, + body={"text": "e\u0301"}, + headers={"Idempotency-Key": same_key}, + ) + # Conflicting simultaneous content must commit exactly one of the bodies. + race_chat = client.call( + "POST", + "/api/v1/chats", + 201, + actor=alice, + body={"title": "Conflicting race", "member_ids": [alice["id"]]}, + schema="Chat", + )["json"] + race_path = "/api/v1/chats/" + race_chat["id"] + "/messages" + race_key = uuid.uuid4().hex + barrier = threading.Barrier(16) + locals_ = [Client() for _ in range(16)] + + def contender(i): + barrier.wait() + return locals_[i].call( + "POST", + race_path, + [201, 409], + actor=alice, + body={"text": "A" if i % 2 else "B"}, + headers={"Idempotency-Key": race_key}, + schema="Message", + ) + + with ThreadPoolExecutor(max_workers=16) as pool: + results = list(pool.map(contender, range(16))) + winners = [r["json"] for r in results if r["status"] == 201] + assert len(winners) == 8 and all(m == winners[0] for m in winners) + assert ( + int(sql(f"SELECT count(*) FROM messages WHERE chat_id='{race_chat['id']}'")) + == 1 + ) + # Inject a failure exactly between the INSERT message and saving its result. + fail_key = uuid.uuid4().hex + trigger = "audit_fail_" + uuid.uuid4().hex[:10] + fault_chat = client.call( + "POST", + "/api/v1/chats", + 201, + actor=alice, + body={"title": "Atomicity fault", "member_ids": [alice["id"]]}, + schema="Chat", + )["json"] + fault_path = "/api/v1/chats/" + fault_chat["id"] + "/messages" + try: + sql( + f"CREATE FUNCTION {trigger}() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN RAISE EXCEPTION 'injected audit failure'; END $$; CREATE TRIGGER {trigger} BEFORE UPDATE ON message_requests FOR EACH ROW WHEN (NEW.key='{fail_key}' AND NEW.message_id IS NOT NULL) EXECUTE FUNCTION {trigger}();" + ) + client.call( + "POST", + fault_path, + 503, + actor=alice, + body={"text": "Retry after rollback"}, + headers={"Idempotency-Key": fail_key}, + ) + assert ( + int( + sql(f"SELECT count(*) FROM messages WHERE chat_id='{fault_chat['id']}'") + ) + == 0 + ) + assert ( + int( + sql( + f"SELECT count(*) FROM message_requests WHERE chat_id='{fault_chat['id']}'" + ) + ) + == 0 + ) + finally: + sql( + f"DROP TRIGGER IF EXISTS {trigger} ON message_requests; DROP FUNCTION IF EXISTS {trigger}();" + ) + client.message(alice, fault_chat, "Retry after rollback", key=fail_key) + assert ( + int(sql(f"SELECT count(*) FROM messages WHERE chat_id='{fault_chat['id']}'")) + == 1 + ) + # Corrupt-but-parseable cached values must not break the public API. + profile_key = "user:v1:" + alice["id"] + for field, value in [ + ("display_name", "bad\ud800"), + ("created_at", "0001-01-01T00:00:00+23:59"), + ("created_at", "2026-11-06T12:00:00"), + ]: + try: + redis( + "SET", + profile_key, + raw=json.dumps({**alice["user"], field: value}).encode(), + ) + assert ( + client.call("GET", "/api/v1/users/me", actor=alice, schema="User")[ + "json" + ] + == alice["user"] + ) + assert 0 < int(redis("TTL", profile_key)) <= 60 + finally: + redis("DEL", profile_key) + # Reuse one TCP connection: routing must not pin this user to one API. + conn = http.client.HTTPConnection( + urlsplit(os.environ.get("BASE_URL", "http://localhost:8080")).hostname, + urlsplit(os.environ.get("BASE_URL", "http://localhost:8080")).port or 80, + timeout=5, + ) + instances = set() + try: + for _ in range(8): + conn.request( + "GET", + "/api/v1/users/me", + headers={"Authorization": "Bearer " + alice["token"]}, + ) + r = conn.getresponse() + assert r.status == 200 + r.read() + instances.add(r.getheader("X-Instance-Id")) + finally: + conn.close() + assert len(instances) >= 2 + proof = { + "result": "PASS", + "checks": [ + "duplicate Idempotency-Key and Content-Type rejected", + "strict integer and repeated query parameters", + "NUL/emoji user and chat Unicode roundtrip", + "100 code point names and 4000 code point messages", + "no text trim or silent Unicode normalization", + "16 conflicting simultaneous requests: 8 replayed winners, 8 conflicts, one DB row", + "DB failure after message INSERT rolls back message and key; same key succeeds after recovery", + "invalid cached Unicode/timezone falls back to DB with TTL", + "one TCP connection reaches both API", + ], + "keepalive_instances": sorted(instances), + } + (ROOT / "evidence/lab3-edge-audit.json").write_text( + json.dumps(proof, ensure_ascii=False, indent=2) + "\n" + ) + print(json.dumps(proof, ensure_ascii=False, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/scripts/final-checks-lab3.py b/scripts/final-checks-lab3.py new file mode 100644 index 00000000..e2c36f14 --- /dev/null +++ b/scripts/final-checks-lab3.py @@ -0,0 +1,76 @@ +"""Финальные регрессии и безопасный снимок инфраструктуры без Config.Env.""" + +import json +import subprocess +import sys +from pathlib import Path + +from replicas import compose, containers, docker + +ROOT = Path(__file__).resolve().parents[1] +DEST = ROOT / "evidence" + + +def check(name, command, stdin=None): + result = subprocess.run(command, cwd=ROOT, input=stdin, text=True, capture_output=True) + (DEST / ("lab3-final-" + name + ".txt")).write_text(result.stdout + result.stderr) + print(name, "PASS" if result.returncode == 0 else "FAIL", flush=True) + if result.returncode: + raise RuntimeError((result.stdout + result.stderr)[-3000:]) + + +for name in ["smoke", "lab3", "regressions", "dependencies"]: + check(name, [sys.executable, "tests/" + name + ".py"]) +for name in [ + "database", + "passwords", + "settings", + "callbacks", + "idempotency_db", + "readiness", + "error_headers", +]: + check( + name, + ["docker", "exec", "-i", containers()[0], "python"], + (ROOT / "tests" / (name + ".py")).read_text(), + ) + +snapshot = {} +all_ids = [] +for service in ["api", "lb", "postgres", "redis", "migration"]: + ids = compose("ps", "--all", "-q", service).split() + snapshot[service] = [] + for cid in ids: + # Only explicitly selected infrastructure fields; credentials are excluded. + obj = json.loads(docker("inspect", "--format", "{{json .}}", cid)) + state = obj["State"] + record = { + "id": cid[:12], + "name": obj["Name"], + "image_id": obj["Image"], + "status": state["Status"], + "exit_code": state["ExitCode"], + "cpu_limit": obj["HostConfig"]["NanoCpus"] / 1e9, + "memory_limit_bytes": obj["HostConfig"]["Memory"], + "ports": obj["NetworkSettings"]["Ports"], + "read_only_root": obj["HostConfig"]["ReadonlyRootfs"], + } + snapshot[service].append(record) + assert record["cpu_limit"] > 0 and record["memory_limit_bytes"] > 0 + if service == "api": + assert not any(record["ports"].values()), "API port is published" + if state["Running"]: + all_ids.append(cid) +assert len(snapshot["api"]) == 2 +snapshot["post_test_usage"] = [ + json.loads(line) + for line in docker("stats", "--no-stream", "--format", "{{json .}}", *all_ids).splitlines() +] +snapshot["note"] = ( + "CPU/memory usage snapshot after tests, not a peak load measurement; cgroup CPU deltas under load are in research results." +) +(DEST / "lab3-infrastructure.json").write_text( + json.dumps(snapshot, ensure_ascii=False, indent=2) + "\n" +) +print("PASS: 2 API, internal ports, CPU/RAM limits on all containers", flush=True) diff --git a/scripts/haproxy.py b/scripts/haproxy.py new file mode 100644 index 00000000..8221befe --- /dev/null +++ b/scripts/haproxy.py @@ -0,0 +1,61 @@ +"""Runtime API доступен только на loopback внутри контейнера HAProxy.""" + +import csv +import io +import re +import subprocess +import time + +from replicas import ROOT, compose, docker + + +def runtime(command): + container = compose("ps", "-q", "lb") + return subprocess.check_output( + ["docker", "exec", "-i", container, "nc", "-w", "1", "127.0.0.1", "9999"], + input=command + "\n", + text=True, + cwd=ROOT, + timeout=5, + ).strip() + + +def drain(container): + address = docker( + "inspect", "--format", "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}", container + ) + lines = runtime("show servers state api_pool").splitlines() + header = next(line.lstrip("# ").split() for line in lines if line.startswith("#")) + rows = [ + dict(zip(header, line.split())) + for line in lines + if line and not line.startswith("#") and line != "1" + ] + names = [r["srv_name"] for r in rows if r.get("srv_addr") == address] + if not names or any(re.fullmatch(r"api[0-9]+", n) is None for n in names): + raise RuntimeError("Cannot map container to HAProxy backend") + for name in names: + result = runtime("set server api_pool/" + name + " state drain") + if result: + raise RuntimeError(result) + deadline = time.monotonic() + 10 + while True: + rows = list(csv.DictReader(io.StringIO(runtime("show stat").lstrip("# ")))) + active = sum( + int(r["scur"]) for r in rows if r["pxname"] == "api_pool" and r["svname"] in names + ) + if active == 0: + return names + if time.monotonic() > deadline: + raise RuntimeError("Backend did not drain within 10s") + time.sleep(0.2) + + +def release(names): + # Старый процесс уже остановлен. Слот возвращаем под контроль health checks, + # но не объявляем здоровым принудительно: новая реплика должна пройти ready. + for name in names: + for setting in ["health down", "state ready"]: + result = runtime("set server api_pool/" + name + " " + setting) + if result: + raise RuntimeError(result) diff --git a/scripts/plot-lab3.py b/scripts/plot-lab3.py new file mode 100644 index 00000000..6b75e5b3 --- /dev/null +++ b/scripts/plot-lab3.py @@ -0,0 +1,100 @@ +"""Графики только из сохранённых исходных результатов; значения не сглаживаются.""" + +import json +import os +import statistics +from collections import defaultdict +from pathlib import Path + +os.environ.setdefault("MPLCONFIGDIR", "/tmp/mtusi-lab3-matplotlib") +os.environ.setdefault("XDG_CACHE_HOME", "/tmp/mtusi-lab3-cache") +import matplotlib + +matplotlib.use("Agg") +import matplotlib.pyplot as plt + +ROOT = Path(__file__).resolve().parents[1] +DEST = ROOT / "evidence/lab3-research" +rows = json.loads((DEST / "results.json").read_text()) +groups = defaultdict(list) +for row in rows: + job = row["job"] + groups[(job["series"], job["replicas"], job["concurrency"])].append(row) +plt.rcParams.update( + { + "font.family": "DejaVu Sans", + "font.size": 11, + "axes.spines.top": False, + "axes.spines.right": False, + "figure.dpi": 140, + } +) +colors = {"fixed": "#315de0", "growing": "#139879"} +fig, axes = plt.subplots(1, 2, figsize=(11, 4.3), layout="constrained") +for series, label in [ + ("fixed", "Постоянные 2 CPU / 1 GiB на все API"), + ("growing", "1 CPU / 256 MiB на каждую API"), +]: + values = [[r["report"]["rps"] for r in groups[(series, n, 32)]] for n in [1, 2, 4]] + axes[0].errorbar( + [1, 2, 4], + [statistics.mean(v) for v in values], + yerr=[statistics.stdev(v) for v in values], + marker="o", + capsize=5, + label=label, + color=colors[series], + ) + latency = [ + [r["report"]["all_attempt_latency_ms"]["p95"] for r in groups[(series, n, 32)]] + for n in [1, 2, 4] + ] + axes[1].plot( + [1, 2, 4], + [statistics.mean(v) for v in latency], + marker="o", + color=colors[series], + label=label, + ) +for ax in axes: + ax.set_xlabel("Количество API-реплик") + ax.set_xticks([1, 2, 4]) + ax.grid(alpha=0.2) +axes[0].set_ylabel("Успешных запросов / с") +axes[0].set_title("Масштабирование: среднее ± SD, 2 повтора") +axes[1].set_ylabel("p95 всех попыток, мс") +axes[1].set_title("Задержка при 32 клиентах") +axes[0].legend(fontsize=8, loc="best") +fig.suptitle("PostgreSQL: 0.25 CPU; профиль 80% POST / 20% GET", fontsize=12) +fig.savefig(DEST / "scaling.png") +fig.savefig(DEST / "scaling.svg") +plt.close(fig) + +fig, axes = plt.subplots(1, 2, figsize=(11, 4.2), layout="constrained") +concurrencies = [8, 32, 64] +measurements = [ + groups[("growing", 4, 32)] if c == 32 else groups[("saturation", 4, c)] for c in concurrencies +] +axes[0].plot( + concurrencies, + [statistics.mean(r["report"]["rps"] for r in rs) for rs in measurements], + marker="o", + color="#315de0", +) +axes[0].set_xlabel("Параллельные клиенты") +axes[0].set_ylabel("Успешных запросов / с") +axes[0].set_title("4 API: рост очереди не даёт роста RPS") +axes[0].grid(alpha=0.2) +base = groups[("growing", 4, 32)] +improved = groups[("improved-db", 4, 32)] +means = [statistics.mean(r["report"]["rps"] for r in rs) for rs in [base, improved]] +axes[1].bar(["БД: 0.25 CPU", "БД: 1 CPU"], means, color=["#778392", "#139879"], width=0.55) +for i, m in enumerate(means): + axes[1].text(i, m + max(means) * 0.02, f"{m:.1f}", ha="center") +axes[1].set_ylim(0, max(means) * 1.18) +axes[1].set_ylabel("Успешных запросов / с") +axes[1].set_title("Проверка улучшения: 4 API, 32 клиента") +fig.savefig(DEST / "bottleneck.png") +fig.savefig(DEST / "bottleneck.svg") +plt.close(fig) +print("Saved scaling.png/svg and bottleneck.png/svg") diff --git a/scripts/replicas.py b/scripts/replicas.py new file mode 100644 index 00000000..0bc932e8 --- /dev/null +++ b/scripts/replicas.py @@ -0,0 +1,60 @@ +"""Управление только API-контейнерами текущего Compose-проекта.""" + +import json +import os +import subprocess +import time +import urllib.request +from pathlib import Path + +from runtime_config import base_url + +os.environ.setdefault("BASE_URL", base_url()) + +ROOT = Path(__file__).resolve().parents[1] + + +def docker(*args): + return subprocess.check_output(["docker", *args], cwd=ROOT, text=True).strip() + + +def compose(*args): + return docker("compose", "--env-file", os.environ.get("ENV_FILE", ".env"), *args) + + +def containers(): + return compose("ps", "--all", "-q", "api").split() + + +def describe(container): + # Никогда не выводим Config.Env: там credentials. + return json.loads(docker("inspect", "--format", "{{json .State}}", container)) + + +def instance_id(container): + code = "import urllib.request; r=urllib.request.urlopen('http://127.0.0.1:8080/health/ready', timeout=2); print(r.headers['X-Instance-Id'])" + return docker("exec", container, "python", "-c", code) + + +def wait_ready(container, timeout=60): + deadline = time.monotonic() + timeout + while time.monotonic() < deadline: + state = describe(container) + if state.get("Health", {}).get("Status") == "healthy": + return instance_id(container) + time.sleep(0.5) + raise RuntimeError("API container did not become healthy: " + container[:12]) + + +def wait_visible(instance, timeout=30): + base = os.environ.get("BASE_URL", "http://localhost:8080").rstrip("/") + deadline = time.monotonic() + timeout + while time.monotonic() < deadline: + try: + with urllib.request.urlopen(base + "/health/ready", timeout=2) as response: + if response.headers.get("X-Instance-Id") == instance: + return + except OSError: + pass + time.sleep(0.1) + raise RuntimeError("New replica was not discovered by HAProxy") diff --git a/scripts/research-lab3.py b/scripts/research-lab3.py new file mode 100644 index 00000000..a2add2ab --- /dev/null +++ b/scripts/research-lab3.py @@ -0,0 +1,294 @@ +"""Трек 1: фиксированные/растущие ресурсы, насыщение PostgreSQL, улучшение. +Учебные данные добавляются; volumes не удаляются. По завершении восстанавливает +обычную конфигурацию. Сводки не содержат сессионных токенов. +""" + +import argparse +import csv +import hashlib +import json +import os +import platform +import random +import subprocess +import time +from pathlib import Path + +from benchmark import fixture, measure +from replicas import compose, containers, docker, wait_ready, wait_visible + +ROOT = Path(__file__).resolve().parents[1] +DEST = ROOT / "evidence/lab3-research" + + +def cpu_stats(): + result = {} + for service in ["api", "postgres", "redis", "lb"]: + for cid in compose("ps", "-q", service).split(): + raw = docker("exec", cid, "cat", "/sys/fs/cgroup/cpu.stat") + memory = docker( + "exec", cid, "cat", "/sys/fs/cgroup/memory.current", "/sys/fs/cgroup/memory.peak" + ).split() + result[cid] = { + "service": service, + "memory_current_bytes": int(memory[0]), + "memory_peak_bytes": int(memory[1]), + **{line.split()[0]: int(line.split()[1]) for line in raw.splitlines()}, + } + return result + + +def pg_stats(): + # Не выводим env/password и не меняем данные. + query = "SELECT json_build_object('commits',xact_commit,'rollbacks',xact_rollback,'blocks_read',blks_read,'blocks_hit',blks_hit,'temp_bytes',temp_bytes) FROM pg_stat_database WHERE datname=current_database()" + result = subprocess.check_output( + [ + "docker", + "compose", + "--env-file", + os.environ.get("ENV_FILE", ".env"), + "exec", + "-T", + "postgres", + "sh", + "-c", + 'exec psql -U "$POSTGRES_USER" -d "$POSTGRES_DB" -At', + ], + input=query, + text=True, + cwd=ROOT, + ) + return json.loads(result) + + +def configure(replicas, cpus, memory, db_cpus, pool=10): + os.environ.update( + API_REPLICAS=str(replicas), + API_CPUS=str(cpus), + API_MEMORY=memory, + POSTGRES_CPUS=str(db_cpus), + DATABASE_POOL_SIZE=str(pool), + LOG_LEVEL="WARNING", + ) + compose("up", "-d", "--no-build", "--wait") + ids = containers() + assert len(ids) == replicas + for cid in ids: + wait_visible(wait_ready(cid)) + + +def main(): + global DEST + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--full", + action="store_true", + help="Полная матрица 1/2/4; без флага короткая проверка ресурса БД", + ) + parser.add_argument("--duration", type=int, default=12) + parser.add_argument("--repeats", type=int, default=2) + parser.add_argument("--concurrency", type=int, default=32) + args = parser.parse_args() + if not args.full: + DEST = ROOT / "evidence/lab3-control" + args.duration = min(args.duration, 8) + args.repeats = 1 + DEST.mkdir(parents=True, exist_ok=True) + machine = { + "host": platform.platform(), + "architecture": platform.machine(), + "docker": json.loads(docker("info", "--format", "{{json .}}")), + } + # Keep only hardware/runtime fields. Docker Info also has registry/user info. + machine["docker"] = { + k: machine["docker"].get(k) + for k in [ + "ServerVersion", + "NCPU", + "MemTotal", + "KernelVersion", + "OperatingSystem", + "Architecture", + ] + } + machine["application"] = { + "schema_revision": "006", + "message_storage": "UTF-8 bytea", + "source_sha256": { + str(path.relative_to(ROOT)): hashlib.sha256(path.read_bytes()).hexdigest() + for path in sorted((ROOT / "src").rglob("*.py")) + }, + "configuration_sha256": { + name: hashlib.sha256((ROOT / name).read_bytes()).hexdigest() + for name in ["compose.yaml", "infra/haproxy.cfg", "scripts/benchmark.py"] + }, + } + machine["method"] = { + "warmup_seconds": 3, + "repeats": args.repeats, + "duration_seconds": args.duration, + "concurrency": args.concurrency, + "profile": "80% POST unique keys, 20% GET first page limit20, 20 seed messages; fresh chat per run", + "generator": "Python http.client, one persistent connection per thread, closed-loop, no retries", + "limits": "PostgreSQL 0.25 CPU/512MiB baseline, LB 0.5CPU/128MiB, Redis 0.25CPU/128MiB", + "randomization_seed": 20261106, + } + (DEST / "method.json").write_text(json.dumps(machine, ensure_ascii=False, indent=2) + "\n") + jobs = [] + for repeat in range(args.repeats): + for count in [1, 2, 4]: + jobs += [ + dict( + series="fixed", + replicas=count, + cpus=2 / count, + memory=f"{1024 // count}m", + db=0.25, + concurrency=args.concurrency, + repeat=repeat, + ), + dict( + series="growing", + replicas=count, + cpus=1, + memory="256m", + db=0.25, + concurrency=args.concurrency, + repeat=repeat, + ), + ] + random.Random(20261106).shuffle(jobs) + # Additional load sweep establishes a plateau; the final series tests a + # hypothesis that allocating more CPU to PostgreSQL raises throughput. + for repeat in range(args.repeats): + for concurrency in [8, 64]: + jobs.append( + dict( + series="saturation", + replicas=4, + cpus=1, + memory="256m", + db=0.25, + concurrency=concurrency, + repeat=repeat, + ) + ) + jobs.append( + dict( + series="improved-db", + replicas=4, + cpus=1, + memory="256m", + db=1, + concurrency=args.concurrency, + repeat=repeat, + ) + ) + if not args.full: + jobs = [ + job + for job in jobs + if job["replicas"] == 4 + and job["series"] in {"growing", "improved-db"} + and job["concurrency"] == args.concurrency + ] + results = [] + try: + for index, job in enumerate(jobs): + print(f"[{index + 1}/{len(jobs)}] {job}", flush=True) + configure(job["replicas"], job["cpus"], job["memory"], job["db"]) + actor, chat = fixture() + measure(actor, chat, 3, job["concurrency"]) + before = cpu_stats() + pg_before = pg_stats() + began = time.monotonic() + report, _ = measure(actor, chat, args.duration, job["concurrency"]) + elapsed = time.monotonic() - began + pg_after = pg_stats() + after = cpu_stats() + cpu = {} + for cid, end in after.items(): + if cid not in before: + continue + delta = {k: end[k] - before[cid][k] for k in end if k != "service"} + cpu[cid[:12]] = { + "service": end["service"], + "memory_current_mib": round(end["memory_current_bytes"] / 1048576, 2), + "memory_peak_lifetime_mib": round(end["memory_peak_bytes"] / 1048576, 2), + "cpu_cores_used": round(delta["usage_usec"] / 1e6 / elapsed, 3), + "throttled_seconds": round(delta.get("throttled_usec", 0) / 1e6, 3), + "throttled_period_ratio": round( + delta.get("nr_throttled", 0) / max(1, delta.get("nr_periods", 0)), 3 + ), + } + row = { + "job": job, + "report": report, + "cpu": cpu, + "postgres_delta": {k: pg_after[k] - pg_before[k] for k in pg_before}, + } + results.append(row) + (DEST / f"run-{index + 1:02}.json").write_text( + json.dumps(row, ensure_ascii=False, indent=2) + "\n" + ) + print( + "RPS", + report["rps"], + "errors", + report["errors"], + "p95", + report["all_attempt_latency_ms"]["p95"], + flush=True, + ) + (DEST / "results.json").write_text(json.dumps(results, ensure_ascii=False, indent=2) + "\n") + with (DEST / "summary.csv").open("w") as f: + fields = [ + "series", + "replicas", + "cpus", + "memory", + "db", + "concurrency", + "repeat", + "rps", + "p95_ms", + "errors", + "postgres_cores", + ] + writer = csv.DictWriter(f, fieldnames=fields) + writer.writeheader() + for row in results: + writer.writerow( + { + **row["job"], + "rps": row["report"]["rps"], + "p95_ms": row["report"]["all_attempt_latency_ms"]["p95"], + "errors": sum(row["report"]["errors"].values()), + "postgres_cores": sum( + c["cpu_cores_used"] + for c in row["cpu"].values() + if c["service"] == "postgres" + ), + } + ) + print( + "PASS: research series complete; inspect results before drawing conclusions", flush=True + ) + finally: + for key in [ + "API_REPLICAS", + "API_CPUS", + "API_MEMORY", + "POSTGRES_CPUS", + "DATABASE_POOL_SIZE", + "LOG_LEVEL", + ]: + os.environ.pop(key, None) + compose("up", "-d", "--no-build", "--wait") + for cid in containers(): + wait_visible(wait_ready(cid)) + print("Default two-replica configuration restored", flush=True) + + +if __name__ == "__main__": + main() diff --git a/scripts/restart.sh b/scripts/restart.sh new file mode 100755 index 00000000..18fb6abf --- /dev/null +++ b/scripts/restart.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -eu +cd "$(dirname "$0")/.." +# --volumes не используется: PostgreSQL и сессии должны сохраниться. +docker compose --env-file "${ENV_FILE:-.env}" restart postgres redis +docker compose --env-file "${ENV_FILE:-.env}" up -d --wait --force-recreate api diff --git a/scripts/review-lab3.py b/scripts/review-lab3.py new file mode 100644 index 00000000..ad6ebee9 --- /dev/null +++ b/scripts/review-lab3.py @@ -0,0 +1,42 @@ +"""Полная проверка перед сдачей; инфраструктурные этапы строго последовательно.""" + +import argparse +import json +import subprocess +import sys +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] +parser = argparse.ArgumentParser(description=__doc__) +parser.add_argument( + "--research", action="store_true", help="Повторить 18 измерений и построить графики" +) +args = parser.parse_args() +steps = [ + ("audit-run", "scripts/audit-lab3.py"), + ("edge-audit", "scripts/edge-audit-lab3.py"), + ("verify", "scripts/verify-lab3.py"), + ("final-checks", "scripts/final-checks-lab3.py"), + ("clean-start", "scripts/test-clean-lab3.py"), +] +if args.research: + steps += [ + ("research-run", "scripts/research-lab3.py"), + ("research-plots", "scripts/plot-lab3.py"), + ] +summary = {} +for name, script in steps: + print("Starting " + name, flush=True) + with (ROOT / "evidence" / ("lab3-" + name + ".txt")).open("w") as output: + result = subprocess.run( + [sys.executable, script] + (["--full"] if name == "research-run" else []), + cwd=ROOT, + stdout=output, + stderr=subprocess.STDOUT, + ) + summary[name] = "PASS" if result.returncode == 0 else "FAIL" + (ROOT / "evidence/lab3-review-summary.json").write_text(json.dumps(summary, indent=2) + "\n") + print(name + " " + summary[name], flush=True) + if result.returncode: + raise SystemExit(result.returncode) +print("PASS: complete pre-submission review", flush=True) diff --git a/scripts/rolling-update.py b/scripts/rolling-update.py new file mode 100644 index 00000000..affb9dd3 --- /dev/null +++ b/scripts/rolling-update.py @@ -0,0 +1,43 @@ +"""Compose rolling replacement с одной временной репликой и ожиданием LB.""" + +import json +import time + +from haproxy import drain, release +from replicas import compose, containers, describe, docker, wait_ready, wait_visible + +old = [c for c in containers() if describe(c)["Running"]] +if len(old) < 2 or len(old) != len(containers()): + raise SystemExit("Restore all API replicas first; need >=2") +count = len(old) +events = [] +# Build separately before starting this script. --no-recreate keeps old instances +# alive even when the image has changed. Each new container uses the current image. +for index, previous in enumerate(old): + before = set(containers()) + compose("up", "-d", "--no-deps", "--no-recreate", "--scale", f"api={count + 1}", "api") + added = set(containers()) - before + assert len(added) == 1, "Expected one surge replica" + replacement = added.pop() + new_instance = wait_ready(replacement) + wait_visible(new_instance) + drained_slots = drain(previous) + started = time.monotonic() + docker("stop", "--time", "10", previous) + state = describe(previous) + assert state["ExitCode"] == 0, "API did not exit gracefully" + docker("rm", previous) + release(drained_slots) + event = { + "old_container": previous[:12], + "new_container": replacement[:12], + "new_instance": new_instance, + "old_exit_code": state["ExitCode"], + "drained_slots": drained_slots, + "stop_seconds": round(time.monotonic() - started, 3), + } + events.append(event) +assert len(containers()) == count +print( + json.dumps({"mode": "rolling replacement, one surge, same schema", "events": events}, indent=2) +) diff --git a/scripts/runtime_config.py b/scripts/runtime_config.py new file mode 100644 index 00000000..386db3dd --- /dev/null +++ b/scripts/runtime_config.py @@ -0,0 +1,30 @@ +"""Внешний адрес локального стенда: BASE_URL → APP_PORT → выбранный .env.""" + +import os +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] + + +def base_url() -> str: + if os.environ.get("BASE_URL"): + return os.environ["BASE_URL"].rstrip("/") + port = os.environ.get("APP_PORT") + if not port: + path = Path(os.environ.get("ENV_FILE", str(ROOT / ".env"))) + if not path.is_absolute(): + path = ROOT / path + if path.is_file(): + for line in path.read_text().splitlines(): + key, separator, value = line.partition("=") + if separator and key.strip() == "APP_PORT": + port = value.split("#", 1)[0].strip().strip("\"'") + break + port = port or "8080" + if not port.isascii() or not port.isdigit() or not 1 <= int(port) <= 65535: + raise ValueError("APP_PORT должен быть номером порта от 1 до 65535") + return "http://localhost:" + str(int(port)) + + +if __name__ == "__main__": + print(base_url()) diff --git a/scripts/stop-one.py b/scripts/stop-one.py new file mode 100644 index 00000000..0430d67c --- /dev/null +++ b/scripts/stop-one.py @@ -0,0 +1,34 @@ +"""Сопоставить X-Instance-Id реальному контейнеру и оставить его остановленным.""" + +import json +import os +import time + +from replicas import containers, describe, docker, instance_id + +target = os.environ["TARGET_INSTANCE_ID"] +running = [c for c in containers() if describe(c)["Running"]] +if len(running) < 2: + raise SystemExit("Need at least two running API containers") +for container in running: + if instance_id(container) == target: + before = describe(container) + started = time.monotonic() + docker("stop", "--time", "10", container) + after = describe(container) + assert not after["Running"] + print( + json.dumps( + { + "container": container[:12], + "instance_id": target, + "started_at": before["StartedAt"], + "finished_at": after["FinishedAt"], + "stop_seconds": round(time.monotonic() - started, 3), + "exit_code": after["ExitCode"], + } + ) + ) + break +else: + raise SystemExit("Requested instance not found in this Compose project") diff --git a/scripts/stop-one.sh b/scripts/stop-one.sh new file mode 100755 index 00000000..383f91ed --- /dev/null +++ b/scripts/stop-one.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -eu +cd "$(dirname "$0")/.." +exec "${PYTHON:-python3}" scripts/stop-one.py diff --git a/scripts/test-clean-lab3.py b/scripts/test-clean-lab3.py new file mode 100644 index 00000000..d2321639 --- /dev/null +++ b/scripts/test-clean-lab3.py @@ -0,0 +1,65 @@ +"""Запуск на пустых volumes в отдельном временном Compose-проекте. +Текущий стенд и его volumes не удаляются. Секрет создаётся в TemporaryDirectory. +""" + +import json +import os +import secrets +import socket +import subprocess +import sys +import uuid +from pathlib import Path +from tempfile import TemporaryDirectory + +ROOT = Path(__file__).resolve().parents[1] +project = "lab3-audit-clean-" + uuid.uuid4().hex[:8] +with socket.socket() as sock: + sock.bind(("127.0.0.1", 0)) + port = sock.getsockname()[1] +with TemporaryDirectory(prefix="lab3-clean-") as folder: + env_file = Path(folder) / ".env" + env_file.write_text( + "POSTGRES_PASSWORD=" + secrets.token_hex(24) + "\nAPP_PORT=" + str(port) + "\n" + ) + env = { + **os.environ, + "COMPOSE_PROJECT_NAME": project, + "ENV_FILE": str(env_file), + "APP_PORT": str(port), + } + command = ["docker", "compose", "--env-file", str(env_file)] + + def run(*args): + return subprocess.run(args, cwd=ROOT, env=env, text=True, check=True, capture_output=True) + + try: + run(*command, "up", "-d", "--no-build", "--wait") + version = run( + *command, + "exec", + "-T", + "postgres", + "sh", + "-c", + 'exec psql -U "$POSTGRES_USER" -d "$POSTGRES_DB" -Atc "SELECT version_num FROM alembic_version"', + ).stdout.strip() + assert version == "006", version + result = run(sys.executable, "tests/smoke.py", "--base-url", f"http://127.0.0.1:{port}") + proof = { + "result": "PASS", + "project": project, + "schema_revision": version, + "public_smoke": result.stdout.strip(), + "empty_volumes": True, + "temporary_project_removed": True, + } + except subprocess.CalledProcessError as error: + print((error.stdout + error.stderr)[-3000:]) + raise + finally: + run(*command, "down", "--volumes") + (ROOT / "evidence/lab3-clean-start.json").write_text( + json.dumps(proof, ensure_ascii=False, indent=2) + "\n" + ) + print(json.dumps(proof, ensure_ascii=False, indent=2)) diff --git a/scripts/test-expiry.sh b/scripts/test-expiry.sh new file mode 100755 index 00000000..1c479ec8 --- /dev/null +++ b/scripts/test-expiry.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu +cd "$(dirname "$0")/.." +# Сохраняет обычный TTL и восстанавливает API даже при падении проверки. +restore() { docker compose up -d --wait --force-recreate api; } +trap restore EXIT +SESSION_TTL_SECONDS=2 docker compose up -d --wait --force-recreate api +"${PYTHON:-python3}" tests/expiry.py diff --git a/scripts/test-persistence.py b/scripts/test-persistence.py new file mode 100644 index 00000000..cafd8ec8 --- /dev/null +++ b/scripts/test-persistence.py @@ -0,0 +1,69 @@ +"""Исходный persistence-сценарий плюс доказательство рестарта всех трёх сервисов.""" + +import argparse +import json +from pathlib import Path +from runtime_config import base_url +import subprocess +import sys + +ROOT = Path(__file__).resolve().parents[1] + + +def states(): + result = {} + for service in ("api", "postgres", "redis"): + ids = subprocess.check_output( + ["docker", "compose", "ps", "-q", service], cwd=ROOT, text=True + ).split() + if not ids: + raise RuntimeError("Не запущен сервис " + service) + result[service] = {} + for container in ids: + state = json.loads( + subprocess.check_output( + ["docker", "inspect", "--format", "{{json .State}}", container], + cwd=ROOT, + text=True, + ) + ) + result[service][container] = { + "StartedAt": state["StartedAt"], + "Pid": state["Pid"], + } + return result + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--base-url", default=base_url()) + parser.add_argument("--action-script", required=True) + parser.add_argument("--ca-file") + args = parser.parse_args() + before = states() + print("ДО: " + json.dumps(before), flush=True) + command = [ + sys.executable, + str(ROOT / "tests/resilience.py"), + "--mode", + "persistence", + "--action-script", + args.action_script, + "--base-url", + args.base_url, + ] + if args.ca_file: + command += ["--ca-file", args.ca_file] + subprocess.run(command, cwd=ROOT, check=True) + after = states() + print("ПОСЛЕ: " + json.dumps(after), flush=True) + for service in before: + if before[service] == after[service]: + raise AssertionError("Сервис не перезапущен: " + service) + print( + "PASS: StartedAt изменился у API, PostgreSQL и Redis; прежний токен и данные сохранены" + ) + + +if __name__ == "__main__": + main() diff --git a/scripts/verify-lab3.py b/scripts/verify-lab3.py new file mode 100644 index 00000000..66cd4395 --- /dev/null +++ b/scripts/verify-lab3.py @@ -0,0 +1,135 @@ +"""Полная проверка lab3. Использует текущий учебный стенд, volumes сохраняет.""" + +import json +import subprocess +import sys +import time +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path + +from benchmark import Client, fixture, measure +from replicas import compose, containers, describe, docker, instance_id, wait_ready, wait_visible + +ROOT = Path(__file__).resolve().parents[1] +EVIDENCE = ROOT / "evidence" + + +def run_test(name, *args, stdin=None): + result = subprocess.run(args, cwd=ROOT, input=stdin, text=True, capture_output=True) + (EVIDENCE / name).write_text(result.stdout + result.stderr) + print(name, "PASS" if result.returncode == 0 else "FAIL", flush=True) + if result.returncode: + raise RuntimeError((result.stdout + result.stderr)[-3000:]) + + +def main(): + py = sys.executable + for filename in ["smoke", "lab3", "extra", "regressions", "production"]: + run_test("lab3-" + filename + ".txt", py, "tests/" + filename + ".py") + run_test( + "lab3-db-idempotency.txt", + "docker", + "exec", + "-i", + containers()[0], + "python", + stdin=(ROOT / "tests/idempotency_db.py").read_text(), + ) + run_test( + "lab3-public-failover.txt", + py, + "tests/resilience.py", + "--mode", + "failover", + "--action-script", + "scripts/stop-one.sh", + ) + compose("up", "-d", "--no-deps", "--wait", "api") + for c in containers(): + wait_visible(wait_ready(c)) + events = [] + actor, chat = fixture() + initial = containers() + for target in initial: + alias = instance_id(target) + print("Failure test", target[:12], alias, flush=True) + with ThreadPoolExecutor(max_workers=1) as pool: + event = [] + load = pool.submit(measure, actor, chat, 12, 8, event) + time.sleep(3) + event.append(time.monotonic()) + docker("kill", "--signal", "KILL", target) + report, confirmations = load.result() + assert not describe(target)["Running"] + assert report["successes"].get("read") and report["successes"].get("write") + assert all(report["seconds"][b]["success"] > 0 for b in range(5, 11)), ( + "No service after detection" + ) + c = Client() + # Each acknowledged message is read back with the same idempotency key. + for key, mid in confirmations: + response = c.message(actor, chat, "load-" + key, key=key) + assert response["json"]["id"] == mid + assert response["headers"]["X-Instance-Id"] != alias + report.update( + { + "stopped_container": target[:12], + "stopped_instance": alias, + "exit_code": describe(target)["ExitCode"], + "all_acknowledged_messages_replayed": len(confirmations), + "failure_started_at_load_second": 3, + "service_after_second_5": "reads/writes continue", + "note": "hard SIGKILL, no automatic retries in load, replay confirmations after failure", + } + ) + events.append(report) + docker("start", target) + wait_visible(wait_ready(target)) + (EVIDENCE / "lab3-failures.json").write_text( + json.dumps(events, ensure_ascii=False, indent=2) + "\n" + ) + print("Both replicas survived sequential hard-failure tests", flush=True) + actor, chat = fixture() + with ThreadPoolExecutor(max_workers=1) as pool: + load = pool.submit(measure, actor, chat, 40, 8) + time.sleep(3) + run_test("lab3-rolling.txt", py, "scripts/rolling-update.py") + report, confirmations = load.result() + (EVIDENCE / "lab3-rolling-load.json").write_text(json.dumps(report, indent=2) + "\n") + assert report["successes"].get("read") and report["successes"].get("write") + # Zero errors are not required by rubric; any transitional errors are reported. + client = Client() + for key, mid in confirmations: + assert client.message(actor, chat, "load-" + key, key=key)["json"]["id"] == mid + before = {c: describe(c)["StartedAt"] for c in containers()} + storage_before = { + s: describe(compose("ps", "-q", s))["StartedAt"] for s in ["postgres", "redis"] + } + run_test( + "lab3-persistence.txt", + py, + "tests/resilience.py", + "--mode", + "persistence", + "--action-script", + "scripts/restart.sh", + ) + after = {c: describe(c)["StartedAt"] for c in containers()} + storage_after = { + s: describe(compose("ps", "-q", s))["StartedAt"] for s in ["postgres", "redis"] + } + assert set(before) != set(after) or before != after + assert all(storage_before[s] != storage_after[s] for s in storage_before) + proof = { + "api_before": before, + "api_after": after, + "storage_before": storage_before, + "storage_after": storage_after, + } + (EVIDENCE / "lab3-restart-proof.json").write_text(json.dumps(proof, indent=2) + "\n") + run_test("lab3-final-smoke.txt", py, "tests/smoke.py") + print("PASS: all lab3 acceptance checks", flush=True) + + +if __name__ == "__main__": + main() diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/__main__.py b/src/__main__.py new file mode 100644 index 00000000..da5d2b9b --- /dev/null +++ b/src/__main__.py @@ -0,0 +1,13 @@ +import uvicorn + +from src.core.settings import settings + +if __name__ == "__main__": + uvicorn.run( + "src.main:app", + host=settings.app_host, + port=settings.app_port, + workers=settings.app_workers, + log_level=settings.log_level.lower(), + timeout_graceful_shutdown=settings.shutdown_timeout_seconds, + ) diff --git a/src/api/__init__.py b/src/api/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/api/dependencies.py b/src/api/dependencies.py new file mode 100644 index 00000000..d04ea93d --- /dev/null +++ b/src/api/dependencies.py @@ -0,0 +1,106 @@ +import base64 +import binascii +import re +from typing import Annotated + +from fastapi import Depends, Request +from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer +from fastapi.security.http import HTTPBase, HTTPBasicCredentials +from sqlalchemy.ext.asyncio import AsyncSession + +from src.core.db.session import get_db_session +from src.core.errors import ApiError +from src.core.settings import settings +from src.service.auth import AuthService +from src.service.chat import ChatService +from src.service.dto import UserDTO +from src.service.exceptions import InvalidSessionException +from src.service.message import MessageService +from src.service.user import UserService + +bearer_scheme = HTTPBearer( + scheme_name="bearerAuth", + description="Вставьте токен из ответа на вход, без префикса Bearer.", + auto_error=False, +) +basic_scheme = HTTPBase(scheme="basic", scheme_name="basicAuth", auto_error=False) + + +async def get_basic_credentials( + request: Request, + credentials: Annotated[HTTPAuthorizationCredentials | None, Depends(basic_scheme)], +) -> HTTPBasicCredentials: + if await request.body(): + raise ApiError(400, "invalid_request", "Вход не принимает тело запроса") + try: + authorization = request.headers.getlist("authorization") + if len(authorization) != 1 or len(authorization[0]) > settings.authorization_max_length: + raise ValueError + if credentials is None or credentials.scheme.lower() != "basic": + raise ValueError + decoded = base64.b64decode(credentials.credentials, validate=True).decode("utf-8") + username, separator, password = decoded.partition(":") + if ( + not separator + or re.fullmatch(r"[a-z0-9_]{3,32}", username) is None + or not 12 <= len(password) <= 128 + or not password.strip() + ): + raise ValueError + except (ValueError, UnicodeError, binascii.Error): + raise ApiError(401, "unauthorized", "Неверный логин или пароль") from None + return HTTPBasicCredentials(username=username, password=password) + + +def get_user_service( + db_session: Annotated[AsyncSession, Depends(get_db_session, scope="function")], +) -> UserService: + return UserService(db_session=db_session) + + +def get_chat_service( + db_session: Annotated[AsyncSession, Depends(get_db_session, scope="function")], +) -> ChatService: + return ChatService(db_session=db_session) + + +def get_message_service( + db_session: Annotated[AsyncSession, Depends(get_db_session, scope="function")], +) -> MessageService: + return MessageService(db_session=db_session) + + +def get_auth_service( + db_session: Annotated[AsyncSession, Depends(get_db_session, scope="function")], +) -> AuthService: + return AuthService( + db_session=db_session, + session_ttl_seconds=settings.session_ttl_seconds, + ) + + +def get_bearer_token( + request: Request, + credentials: Annotated[HTTPAuthorizationCredentials | None, Depends(bearer_scheme)], +) -> str: + if credentials is None or len(request.headers.getlist("authorization")) != 1: + raise ApiError(401, "unauthorized", "Требуется Bearer-токен") + token = credentials.credentials + if ( + credentials.scheme.lower() != "bearer" + or not token + or len(token) > 512 + or any(c.isspace() for c in token) + ): + raise ApiError(401, "unauthorized", "Требуется Bearer-токен") + return token + + +async def get_current_user( + auth: Annotated[AuthService, Depends(get_auth_service)], + token: Annotated[str, Depends(get_bearer_token)], +) -> UserDTO: + try: + return await auth.get_user(token=token) + except InvalidSessionException as error: + raise ApiError(401, "unauthorized", str(error)) from error diff --git a/src/api/router.py b/src/api/router.py new file mode 100644 index 00000000..553eedc5 --- /dev/null +++ b/src/api/router.py @@ -0,0 +1,14 @@ +from fastapi import APIRouter + +from src.api.v1.routers.auth.router import router as auth_router +from src.api.v1.routers.chats.router import router as chats_router +from src.api.v1.routers.messages.router import router as messages_router +from src.api.v1.routers.users.router import router as users_router + +router = APIRouter(prefix="/api/v1", tags=["Версия 1"]) + +router.include_router(users_router) +router.include_router(chats_router) +router.include_router(messages_router) + +router.include_router(auth_router) diff --git a/src/api/v1/__init__.py b/src/api/v1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/api/v1/routers/__init__.py b/src/api/v1/routers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/api/v1/routers/auth/__init__.py b/src/api/v1/routers/auth/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/api/v1/routers/auth/callback.py b/src/api/v1/routers/auth/callback.py new file mode 100644 index 00000000..45334b8b --- /dev/null +++ b/src/api/v1/routers/auth/callback.py @@ -0,0 +1,31 @@ +import logging + +from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker + +from src.core.db.repo.auth import fetch_user_credentials +from src.core.security import verify_password_async +from src.core.settings import settings +from src.service.user import UserService + +logger = logging.getLogger(__name__) + + +async def create_admin(session_factory: async_sessionmaker[AsyncSession]) -> None: + async with session_factory.begin() as session: + admin = await UserService(db_session=session).create_admin( + username=settings.admin_username, + display_name=settings.admin_display_name, + password=settings.admin_password.get_secret_value(), + ) + if admin is None and settings.app_env == "production": + credentials = await fetch_user_credentials(session, settings.admin_username) + if credentials is None or not await verify_password_async( + settings.admin_password.get_secret_value(), credentials.password_hash + ): + raise RuntimeError( + "Пароль существующего администратора не совпадает с настройкой production" + ) + if admin is None: + logger.info("Администратор уже существует") + else: + logger.info("Администратор создан: пользователь=%s", admin.id) diff --git a/src/api/v1/routers/auth/router.py b/src/api/v1/routers/auth/router.py new file mode 100644 index 00000000..49076ecd --- /dev/null +++ b/src/api/v1/routers/auth/router.py @@ -0,0 +1,50 @@ +from dataclasses import asdict +from typing import Annotated + +from fastapi import APIRouter, Depends, Response +from fastapi.security import HTTPBasicCredentials + +from src.api.dependencies import ( + get_auth_service, + get_basic_credentials, + get_bearer_token, + get_current_user, +) +from src.api.v1.routers.auth.schemas import SessionOut +from src.api.v1.routers.users.schemas import UserOut +from src.core.errors import ApiError +from src.service.auth import AuthService +from src.service.dto import UserDTO +from src.service.exceptions import InvalidCredentialsException + +router = APIRouter(prefix="/auth/sessions", tags=["Сессии"]) + + +@router.post("", status_code=201, response_model=SessionOut) +async def login( + credentials: Annotated[HTTPBasicCredentials, Depends(get_basic_credentials)], + auth: Annotated[AuthService, Depends(get_auth_service)], +) -> SessionOut: + try: + result = await auth.login( + username=credentials.username, + password=credentials.password, + ) + except InvalidCredentialsException as error: + raise ApiError(401, "unauthorized", str(error)) from error + return SessionOut( + token=result.token, + token_type=result.token_type, + expires_at=result.expires_at, + user=UserOut(**asdict(result.user)), + ) + + +@router.delete("/current", status_code=204) +async def logout( + current_user: Annotated[UserDTO, Depends(get_current_user)], + token: Annotated[str, Depends(get_bearer_token)], + auth: Annotated[AuthService, Depends(get_auth_service)], +) -> Response: + await auth.logout(token=token) + return Response(status_code=204) diff --git a/src/api/v1/routers/auth/schemas.py b/src/api/v1/routers/auth/schemas.py new file mode 100644 index 00000000..cdeff562 --- /dev/null +++ b/src/api/v1/routers/auth/schemas.py @@ -0,0 +1,13 @@ +from datetime import datetime +from typing import Literal + +from pydantic import BaseModel + +from src.api.v1.routers.users.schemas import UserOut + + +class SessionOut(BaseModel): + token: str + token_type: Literal["Bearer"] + expires_at: datetime + user: UserOut diff --git a/src/api/v1/routers/chats/__init__.py b/src/api/v1/routers/chats/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/api/v1/routers/chats/router.py b/src/api/v1/routers/chats/router.py new file mode 100644 index 00000000..d0718393 --- /dev/null +++ b/src/api/v1/routers/chats/router.py @@ -0,0 +1,86 @@ +from typing import Annotated +from uuid import UUID + +from fastapi import APIRouter, Depends, Query, status + +from src.api.dependencies import get_chat_service, get_current_user +from src.api.v1.routers.chats.schemas import ChatOut, CreateChatIn, GetChatOut +from src.api.v1.schemas import PaginationQuery +from src.core.errors import ApiError +from src.core.pagination import decode_cursor, encode_cursor +from src.service.chat import ChatService +from src.service.dto import ChatDTO, UserDTO +from src.service.exceptions import ChatNotFoundException, InvalidChatMembersException + +router = APIRouter(prefix="/chats", tags=["Чаты"]) + + +def _to_chat_out(chat: ChatDTO) -> ChatOut: + return ChatOut( + id=chat.id, + title=chat.title, + member_ids=list(chat.member_ids), + created_at=chat.created_at, + ) + + +@router.post("", status_code=status.HTTP_201_CREATED) +async def create_chat( + chat_in: CreateChatIn, + current_user: Annotated[UserDTO, Depends(get_current_user)], + chat_service: Annotated[ChatService, Depends(get_chat_service)], +) -> ChatOut: + try: + chat = await chat_service.create_chat( + title=chat_in.title, + member_ids=chat_in.member_ids, + current_user_id=current_user.id, + ) + except InvalidChatMembersException as error: + raise ApiError(400, "invalid_request", str(error)) from error + return _to_chat_out(chat) + + +@router.get("", status_code=status.HTTP_200_OK) +async def get_chats( + pagination: Annotated[PaginationQuery, Query()], + current_user: Annotated[UserDTO, Depends(get_current_user)], + chat_service: Annotated[ChatService, Depends(get_chat_service)], +) -> GetChatOut: + after = None + if pagination.cursor is not None: + after = decode_cursor( + pagination.cursor, + expected_kind="chats", + expected_owner_id=current_user.id, + ) + chats = await chat_service.get_chats( + current_user_id=current_user.id, limit=pagination.limit + 1, after=after + ) + + page = chats[: pagination.limit] + next_cursor = None + if len(chats) > pagination.limit: + last = page[-1] + next_cursor = encode_cursor("chats", current_user.id, last.created_at, last.id) + + return GetChatOut( + items=[_to_chat_out(chat) for chat in page], + next_cursor=next_cursor, + ) + + +@router.get("/{chat_id}", summary="Получить доступный чат") +async def get_chat( + chat_id: UUID, + current_user: Annotated[UserDTO, Depends(get_current_user)], + chat_service: Annotated[ChatService, Depends(get_chat_service)], +) -> ChatOut: + try: + chat = await chat_service.get_chat( + chat_id=chat_id, + current_user_id=current_user.id, + ) + except ChatNotFoundException as error: + raise ApiError(404, "not_found", str(error)) from error + return _to_chat_out(chat) diff --git a/src/api/v1/routers/chats/schemas.py b/src/api/v1/routers/chats/schemas.py new file mode 100644 index 00000000..b51b7f88 --- /dev/null +++ b/src/api/v1/routers/chats/schemas.py @@ -0,0 +1,42 @@ +from datetime import datetime +from uuid import UUID + +from pydantic import BaseModel, ConfigDict, Field, field_validator + + +class CreateChatIn(BaseModel): + model_config = ConfigDict(extra="forbid") + + title: str = Field(min_length=1, max_length=100) + member_ids: list[UUID] = Field(min_length=1, max_length=100) + + @field_validator("title") + @classmethod + def title_must_not_be_blank(cls, value: str) -> str: + value.encode("utf-8") + if not value.strip(): + raise ValueError("title не может состоять только из пробелов") + return value + + @field_validator("member_ids") + @classmethod + def member_ids_must_be_unique(cls, value: list[UUID]) -> list[UUID]: + if len(value) != len(set(value)): + raise ValueError("member_ids не должен содержать дубликаты") + return value + + +class ChatOut(BaseModel): + model_config = ConfigDict(extra="forbid") + + id: UUID + title: str + member_ids: list[UUID] + created_at: datetime + + +class GetChatOut(BaseModel): + model_config = ConfigDict(extra="forbid") + + items: list[ChatOut] + next_cursor: str | None diff --git a/src/api/v1/routers/messages/__init__.py b/src/api/v1/routers/messages/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/api/v1/routers/messages/router.py b/src/api/v1/routers/messages/router.py new file mode 100644 index 00000000..1b8eab1b --- /dev/null +++ b/src/api/v1/routers/messages/router.py @@ -0,0 +1,94 @@ +import re +from typing import Annotated +from uuid import UUID + +from fastapi import APIRouter, Depends, Header, Query, Request, status + +from src.api.dependencies import get_current_user, get_message_service +from src.api.v1.routers.messages.schemas import ( + CreateMessageIn, + MessageOut, + MessagePageOut, +) +from src.api.v1.schemas import PaginationQuery +from src.core.errors import ApiError +from src.core.pagination import decode_cursor, encode_cursor +from src.service.dto import MessageDTO, UserDTO +from src.service.exceptions import ChatNotFoundException, IdempotencyConflictException +from src.service.message import MessageService + +router = APIRouter(prefix="/chats", tags=["Сообщения"]) + + +def _to_message_out(message: MessageDTO) -> MessageOut: + return MessageOut( + id=message.id, + chat_id=message.chat_id, + sender_id=message.sender_id, + text=message.text, + created_at=message.created_at, + ) + + +@router.post("/{chat_id}/messages", status_code=status.HTTP_201_CREATED) +async def create_message( + chat_id: UUID, + message_in: CreateMessageIn, + request: Request, + current_user: Annotated[UserDTO, Depends(get_current_user)], + message_service: Annotated[MessageService, Depends(get_message_service)], + idempotency_key: Annotated[str, Header()], +) -> MessageOut: + if ( + len(request.headers.getlist("idempotency-key")) != 1 + or re.fullmatch(r"[A-Za-z0-9._:-]{1,128}", idempotency_key) is None + ): + raise ApiError(400, "invalid_request", "Требуется корректный Idempotency-Key") + try: + message = await message_service.create_message( + chat_id=chat_id, + sender_id=current_user.id, + text=message_in.text, + idempotency_key=idempotency_key, + ) + except ChatNotFoundException as error: + raise ApiError(404, "not_found", str(error)) from error + except IdempotencyConflictException as error: + raise ApiError(409, "conflict", "Ключ уже использован для другого сообщения") from error + return _to_message_out(message) + + +@router.get("/{chat_id}/messages", status_code=status.HTTP_200_OK) +async def get_messages( + chat_id: UUID, + pagination: Annotated[PaginationQuery, Query()], + current_user: Annotated[UserDTO, Depends(get_current_user)], + message_service: Annotated[MessageService, Depends(get_message_service)], +) -> MessagePageOut: + after = None + if pagination.cursor is not None: + after = decode_cursor( + pagination.cursor, + expected_kind="messages", + expected_owner_id=chat_id, + ) + try: + messages = await message_service.get_messages( + chat_id=chat_id, + current_user_id=current_user.id, + limit=pagination.limit + 1, + after=after, + ) + except ChatNotFoundException as error: + raise ApiError(404, "not_found", str(error)) from error + + page = messages[: pagination.limit] + next_cursor = None + if len(messages) > pagination.limit: + last = page[-1] + next_cursor = encode_cursor("messages", chat_id, last.created_at, last.id) + + return MessagePageOut( + items=[_to_message_out(message) for message in page], + next_cursor=next_cursor, + ) diff --git a/src/api/v1/routers/messages/schemas.py b/src/api/v1/routers/messages/schemas.py new file mode 100644 index 00000000..4fd538df --- /dev/null +++ b/src/api/v1/routers/messages/schemas.py @@ -0,0 +1,36 @@ +from datetime import datetime +from uuid import UUID + +from pydantic import BaseModel, ConfigDict, Field, field_validator + + +class CreateMessageIn(BaseModel): + model_config = ConfigDict(extra="forbid") + + text: str = Field(min_length=1, max_length=4000) + attachment_ids: list[UUID] = Field(default_factory=list, max_length=0) + + @field_validator("text") + @classmethod + def text_must_not_be_blank(cls, value: str) -> str: + value.encode("utf-8") + if not value.strip(): + raise ValueError("text не может состоять только из пробелов") + return value + + +class MessageOut(BaseModel): + model_config = ConfigDict(extra="forbid") + + id: UUID + chat_id: UUID + sender_id: UUID + text: str + created_at: datetime + + +class MessagePageOut(BaseModel): + model_config = ConfigDict(extra="forbid") + + items: list[MessageOut] + next_cursor: str | None diff --git a/src/api/v1/routers/users/__init__.py b/src/api/v1/routers/users/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/api/v1/routers/users/router.py b/src/api/v1/routers/users/router.py new file mode 100644 index 00000000..cbe37264 --- /dev/null +++ b/src/api/v1/routers/users/router.py @@ -0,0 +1,44 @@ +from typing import Annotated + +from fastapi import APIRouter, Depends, status + +from src.api.dependencies import get_current_user, get_user_service +from src.api.v1.routers.users.schemas import CreateUserIn, UserOut +from src.core.errors import ApiError +from src.service.dto import UserDTO +from src.service.exceptions import UserAlreadyExistsException +from src.service.user import UserService + +router = APIRouter(prefix="/users", tags=["Пользователи"]) + + +def _to_user_out(user: UserDTO) -> UserOut: + return UserOut( + id=user.id, + username=user.username, + display_name=user.display_name, + created_at=user.created_at, + ) + + +@router.post("", status_code=status.HTTP_201_CREATED) +async def create_user( + user_in: CreateUserIn, + user_service: Annotated[UserService, Depends(get_user_service)], +) -> UserOut: + try: + user = await user_service.create_user( + password=user_in.password, + username=user_in.username, + display_name=user_in.display_name, + ) + except UserAlreadyExistsException as error: + raise ApiError(409, "conflict", str(error)) from error + return _to_user_out(user) + + +@router.get("/me", status_code=status.HTTP_200_OK) +async def get_me( + current_user: Annotated[UserDTO, Depends(get_current_user)], +) -> UserOut: + return _to_user_out(current_user) diff --git a/src/api/v1/routers/users/schemas.py b/src/api/v1/routers/users/schemas.py new file mode 100644 index 00000000..7cac9dae --- /dev/null +++ b/src/api/v1/routers/users/schemas.py @@ -0,0 +1,29 @@ +from datetime import datetime +from uuid import UUID + +from pydantic import BaseModel, ConfigDict, Field, field_validator + + +class CreateUserIn(BaseModel): + model_config = ConfigDict(extra="forbid") + + username: str = Field(pattern=r"^[a-z0-9_]{3,32}$") + password: str = Field(min_length=12, max_length=128) + display_name: str = Field(min_length=1, max_length=100) + + @field_validator("display_name", "password") + @classmethod + def required_string_must_not_be_blank(cls, value: str) -> str: + value.encode("utf-8") + if not value.strip(): + raise ValueError("Обязательная строка не может состоять только из пробелов") + return value + + +class UserOut(BaseModel): + model_config = ConfigDict(extra="forbid") + + id: UUID + username: str + display_name: str + created_at: datetime diff --git a/src/api/v1/schemas.py b/src/api/v1/schemas.py new file mode 100644 index 00000000..63106894 --- /dev/null +++ b/src/api/v1/schemas.py @@ -0,0 +1,21 @@ +import re + +from pydantic import BaseModel, ConfigDict, Field, field_validator + +from src.core.settings import settings + + +class PaginationQuery(BaseModel): + model_config = ConfigDict(extra="forbid") + + limit: int = Field(default=50, ge=1, le=100) + cursor: str | None = Field(default=None, min_length=1, max_length=settings.cursor_max_length) + + @field_validator("limit", mode="before") + @classmethod + def limit_must_be_integer(cls, value): + if isinstance(value, bool) or isinstance(value, float): + raise ValueError("limit должен быть целым числом") + if isinstance(value, str) and re.fullmatch(r"[0-9]+", value) is None: + raise ValueError("limit должен содержать десятичные цифры") + return value diff --git a/src/core/__init__.py b/src/core/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/core/cache.py b/src/core/cache.py new file mode 100644 index 00000000..19444bfe --- /dev/null +++ b/src/core/cache.py @@ -0,0 +1,68 @@ +"""Клиент Redis и необязательный кэш профилей пользователей.""" + +import logging + +from redis.asyncio import Redis +from redis.exceptions import RedisError + +from src.core.settings import settings + +logger = logging.getLogger(__name__) +cache: Redis | None = None + + +def open_cache(): + global cache + cache = Redis.from_url( + settings.redis_url.get_secret_value(), + decode_responses=True, + max_connections=settings.redis_max_connections, + socket_connect_timeout=settings.redis_connect_timeout_seconds, + socket_timeout=settings.redis_read_timeout_seconds, + retry_on_timeout=settings.redis_retry_on_timeout, + ) + + +async def close_cache(): + global cache + if cache is not None: + await cache.aclose() + cache = None + + +async def get(key: str) -> str | None: + if cache is None: + return None + try: + return await cache.get(key) + except UnicodeError: + logger.warning("Повреждённый UTF-8 в кэше профиля; читаем PostgreSQL") + await delete(key) + return None + except (RedisError, OSError): + logger.warning("Redis недоступен; читаем профиль из PostgreSQL") + return None + + +async def set(key: str, value: str): + if cache is None: + return + try: + await cache.set(key, value, ex=settings.profile_cache_ttl_seconds) + except (RedisError, OSError): + logger.warning("Redis недоступен; пропускаем запись кэша") + + +async def delete(key: str) -> None: + if cache is None: + return + try: + await cache.delete(key) + except (RedisError, OSError): + logger.warning("Redis недоступен; пропускаем удаление кэша профиля") + + +def get_client() -> Redis: + if cache is None: + raise RedisError("Клиент Redis не настроен") + return cache diff --git a/src/core/callback.py b/src/core/callback.py new file mode 100644 index 00000000..3cf0cff6 --- /dev/null +++ b/src/core/callback.py @@ -0,0 +1,24 @@ +from collections.abc import AsyncIterator +from contextlib import asynccontextmanager + +from fastapi import FastAPI + +from src.api.v1.routers.auth.callback import create_admin +from src.core import readiness +from src.core.db import session as database + +STARTUP_CALLBACKS = (create_admin,) + + +@asynccontextmanager +async def lifespan(app: FastAPI) -> AsyncIterator[None]: + async with database.database_lifespan(app): + session_factory = database.session_factory + if session_factory is None: + raise RuntimeError("Фабрика сессий не запущена") + for callback in STARTUP_CALLBACKS: + await callback(session_factory) + try: + yield + finally: + await readiness.close() diff --git a/src/core/db/__init__.py b/src/core/db/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/core/db/models.py b/src/core/db/models.py new file mode 100644 index 00000000..da242f8e --- /dev/null +++ b/src/core/db/models.py @@ -0,0 +1,90 @@ +from datetime import datetime +from uuid import UUID + +from sqlalchemy import ( + Boolean, + CheckConstraint, + DateTime, + ForeignKey, + ForeignKeyConstraint, + Index, + String, + Text, + false, +) +from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column, relationship + +from src.core.db.types import Utf8Text + + +class Base(DeclarativeBase): + pass + + +class User(Base): + __tablename__ = "users" + __table_args__ = ( + CheckConstraint("username ~ '^[a-z0-9_]{3,32}$'"), + CheckConstraint( + "octet_length(display_name) BETWEEN 1 AND 400", name="users_display_name_bytes_check" + ), + ) + + id: Mapped[UUID] = mapped_column(primary_key=True) + username: Mapped[str] = mapped_column(String(32), unique=True) + display_name: Mapped[str] = mapped_column(Utf8Text()) + password_hash: Mapped[str] = mapped_column(Text) + is_admin: Mapped[bool] = mapped_column(Boolean, default=False, server_default=false()) + created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True)) + + +class Chat(Base): + __tablename__ = "chats" + __table_args__ = ( + CheckConstraint("octet_length(title) BETWEEN 1 AND 400", name="chats_title_bytes_check"), + ) + + id: Mapped[UUID] = mapped_column(primary_key=True) + title: Mapped[str] = mapped_column(Utf8Text()) + created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True)) + members: Mapped[list["ChatMember"]] = relationship(order_by="ChatMember.user_id") + + +class ChatMember(Base): + __tablename__ = "chat_members" + __table_args__ = (Index("chat_members_user_idx", "user_id", "chat_id"),) + + chat_id: Mapped[UUID] = mapped_column( + ForeignKey("chats.id", ondelete="CASCADE"), primary_key=True + ) + user_id: Mapped[UUID] = mapped_column(ForeignKey("users.id"), primary_key=True) + + +class Message(Base): + __tablename__ = "messages" + __table_args__ = ( + ForeignKeyConstraint( + ["chat_id", "sender_id"], ["chat_members.chat_id", "chat_members.user_id"] + ), + CheckConstraint("octet_length(text) BETWEEN 1 AND 16000", name="messages_text_bytes_check"), + Index("messages_history_idx", "chat_id", "created_at", "id"), + ) + + id: Mapped[UUID] = mapped_column(primary_key=True) + chat_id: Mapped[UUID] = mapped_column(ForeignKey("chats.id")) + sender_id: Mapped[UUID] = mapped_column(ForeignKey("users.id")) + text: Mapped[str] = mapped_column(Utf8Text()) + created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True)) + + +class MessageRequest(Base): + # Таблица обслуживает только POST /chats/{chat_id}/messages: метод и путь + # однозначно заданы таблицей и chat_id. Общая область ключа: sender/chat/key. + __tablename__ = "message_requests" + + sender_id: Mapped[UUID] = mapped_column(ForeignKey("users.id"), primary_key=True) + chat_id: Mapped[UUID] = mapped_column(ForeignKey("chats.id"), primary_key=True) + key: Mapped[str] = mapped_column(String(128), primary_key=True) + request_text: Mapped[str] = mapped_column(Utf8Text()) + message_id: Mapped[UUID | None] = mapped_column(ForeignKey("messages.id")) + expires_at: Mapped[datetime] = mapped_column(DateTime(timezone=True)) diff --git a/src/core/db/repo/__init__.py b/src/core/db/repo/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/core/db/repo/auth.py b/src/core/db/repo/auth.py new file mode 100644 index 00000000..2497013b --- /dev/null +++ b/src/core/db/repo/auth.py @@ -0,0 +1,16 @@ +from sqlalchemy import select +from sqlalchemy.ext.asyncio import AsyncSession + +from src.core.db.models import User +from src.core.db.repo.user import to_user +from src.service.dto import UserCredentialsDTO + + +async def fetch_user_credentials( + session: AsyncSession, + username: str, +) -> UserCredentialsDTO | None: + user = await session.scalar(select(User).where(User.username == username)) + if user is None: + return None + return UserCredentialsDTO(user=to_user(user), password_hash=user.password_hash) diff --git a/src/core/db/repo/chat.py b/src/core/db/repo/chat.py new file mode 100644 index 00000000..aa887703 --- /dev/null +++ b/src/core/db/repo/chat.py @@ -0,0 +1,59 @@ +from datetime import datetime +from uuid import UUID + +from sqlalchemy import select, tuple_ +from sqlalchemy.ext.asyncio import AsyncSession +from sqlalchemy.orm import selectinload + +from src.core.db.models import Chat, ChatMember +from src.service.dto import ChatDTO + + +def to_chat(chat: Chat) -> ChatDTO: + return ChatDTO( + chat.id, chat.title, tuple(member.user_id for member in chat.members), chat.created_at + ) + + +async def fetch_chat_by_id(session: AsyncSession, chat_id: UUID) -> ChatDTO | None: + chat = await session.scalar( + select(Chat).options(selectinload(Chat.members)).where(Chat.id == chat_id), + ) + return to_chat(chat) if chat else None + + +async def fetch_chats( + session: AsyncSession, + user_id: UUID, + limit: int, + after: tuple[datetime, UUID] | None = None, +) -> list[ChatDTO]: + query = ( + select(Chat) + .options(selectinload(Chat.members)) + .join(ChatMember) + .where(ChatMember.user_id == user_id) + ) + if after is not None: + query = query.where(tuple_(Chat.created_at, Chat.id) > after) + chats = await session.scalars(query.order_by(Chat.created_at, Chat.id).limit(limit)) + return [to_chat(chat) for chat in chats] + + +async def create_chat( + session: AsyncSession, + chat_id: UUID, + title: str, + member_ids: list[UUID], + created_at: datetime, +) -> ChatDTO: + chat = Chat( + id=chat_id, + title=title, + created_at=created_at, + members=[ChatMember(user_id=user_id) for user_id in member_ids], + ) + session.add(chat) + # ORM сохраняет чат и участников в транзакции текущего запроса. + await session.flush() + return to_chat(chat) diff --git a/src/core/db/repo/message.py b/src/core/db/repo/message.py new file mode 100644 index 00000000..3ece891c --- /dev/null +++ b/src/core/db/repo/message.py @@ -0,0 +1,106 @@ +from datetime import datetime +from uuid import UUID + +from sqlalchemy import select, tuple_ +from sqlalchemy.ext.asyncio import AsyncSession + +from src.core.db.models import Message +from src.service.dto import MessageDTO + + +def to_message(message: Message) -> MessageDTO: + return MessageDTO( + message.id, message.chat_id, message.sender_id, message.text, message.created_at + ) + + +def history_query(chat_id: UUID, limit: int, after: tuple[datetime, UUID] | None = None): + query = select(Message).where(Message.chat_id == chat_id) + if after is not None: + query = query.where(tuple_(Message.created_at, Message.id) > after) + return query.order_by(Message.created_at, Message.id).limit(limit) + + +async def fetch_messages_by_chat_id( + session: AsyncSession, + chat_id: UUID, + limit: int, + after: tuple[datetime, UUID] | None = None, +) -> list[MessageDTO]: + messages = await session.scalars(history_query(chat_id, limit, after)) + return [to_message(message) for message in messages] + + +async def create_message( + session: AsyncSession, + message_id: UUID, + chat_id: UUID, + sender_id: UUID, + text: str, + created_at: datetime, +) -> MessageDTO: + message = Message( + id=message_id, chat_id=chat_id, sender_id=sender_id, text=text, created_at=created_at + ) + session.add(message) + await session.flush() + return to_message(message) + + +async def create_idempotent_message( + session: AsyncSession, + message_id: UUID, + chat_id: UUID, + sender_id: UUID, + text: str, + created_at: datetime, + idempotency_key: str, +) -> MessageDTO: + from sqlalchemy import func, update + from sqlalchemy import text as sql_text + from sqlalchemy.dialects.postgresql import insert + + from src.core.db.models import MessageRequest + from src.service.exceptions import IdempotencyConflictException + + identity = ( + MessageRequest.sender_id == sender_id, + MessageRequest.chat_id == chat_id, + MessageRequest.key == idempotency_key, + ) + # UNIQUE/UPSERT сериализует конкурентные повторы даже на разных процессах. + # Проигравший ждёт COMMIT; при rollback он сам получает право на создание. + values = dict( + sender_id=sender_id, + chat_id=chat_id, + key=idempotency_key, + request_text=text, + message_id=None, + expires_at=func.clock_timestamp() + sql_text("interval '24 hours'"), + ) + claim = ( + insert(MessageRequest) + .values(**values) + .on_conflict_do_update( + index_elements=["sender_id", "chat_id", "key"], + set_={ + k: v for k, v in values.items() if k in {"request_text", "message_id", "expires_at"} + }, + where=MessageRequest.expires_at <= func.clock_timestamp(), + ) + .returning(MessageRequest.key) + ) + owned = await session.scalar(claim) + if owned is None: + existing = (await session.execute(select(MessageRequest).where(*identity))).scalar_one() + if existing.request_text != text: + raise IdempotencyConflictException + message = await session.get(Message, existing.message_id) + if message is None: + raise RuntimeError("Нарушена атомарность результата идемпотентности") + return to_message(message) + + message = await create_message(session, message_id, chat_id, sender_id, text, created_at) + await session.execute(update(MessageRequest).where(*identity).values(message_id=message.id)) + # COMMIT сообщения и ключа выполняется вместе в get_db_session до HTTP 201. + return message diff --git a/src/core/db/repo/user.py b/src/core/db/repo/user.py new file mode 100644 index 00000000..6f10eed6 --- /dev/null +++ b/src/core/db/repo/user.py @@ -0,0 +1,120 @@ +import json +import re +from dataclasses import asdict +from datetime import datetime, timezone +from uuid import UUID + +from sqlalchemy import func, select +from sqlalchemy.dialects.postgresql import insert +from sqlalchemy.ext.asyncio import AsyncSession + +from src.core import cache +from src.core.db.models import User +from src.service.dto import UserDTO + + +def to_user(user: User) -> UserDTO: + return UserDTO(user.id, user.username, user.display_name, user.created_at) + + +async def fetch_user_by_id(session: AsyncSession, user_id: UUID) -> UserDTO | None: + key = f"user:v1:{user_id}" + cached = await cache.get(key) + if cached is not None: + try: + data = json.loads(cached) + if ( + not isinstance(data, dict) + or set(data) != {"id", "username", "display_name", "created_at"} + or not all(isinstance(value, str) for value in data.values()) + ): + raise ValueError + created_at = datetime.fromisoformat(data["created_at"]) + if created_at.tzinfo is None: + raise ValueError + data["display_name"].encode("utf-8") + user = UserDTO( + UUID(data["id"]), + data["username"], + data["display_name"], + created_at.astimezone(timezone.utc), + ) + if ( + user.id != user_id + or re.fullmatch(r"[a-z0-9_]{3,32}", user.username) is None + or not 1 <= len(user.display_name) <= 100 + or not user.display_name.strip() + or user.created_at.tzinfo is None + ): + raise ValueError + return user + except (ValueError, KeyError, TypeError, OverflowError): + await cache.delete(key) + model = await session.get(User, user_id) + user = to_user(model) if model else None + if user: + await cache.set(key, json.dumps(asdict(user), default=str)) + return user + + +async def fetch_user_by_username(session: AsyncSession, username: str) -> UserDTO | None: + model = await session.scalar(select(User).where(User.username == username)) + return to_user(model) if model else None + + +async def create_user( + session: AsyncSession, + user_id: UUID, + username: str, + display_name: str, + created_at: datetime, + password_hash: str, +) -> UserDTO: + user = User( + id=user_id, + username=username, + display_name=display_name, + created_at=created_at, + password_hash=password_hash, + ) + session.add(user) + await session.flush() + return to_user(user) + + +async def users_exist(session: AsyncSession, user_ids: list[UUID]) -> bool: + count = await session.scalar( + select(func.count()).select_from(User).where(User.id.in_(user_ids)) + ) + return count == len(user_ids) + + +async def create_admin( + session: AsyncSession, + user_id: UUID, + username: str, + display_name: str, + password_hash: str, + created_at: datetime, +) -> UserDTO | None: + user = await session.scalar( + insert(User) + .values( + id=user_id, + username=username, + display_name=display_name, + password_hash=password_hash, + created_at=created_at, + is_admin=True, + ) + .on_conflict_do_nothing(index_elements=[User.username]) + .returning(User) + ) + return to_user(user) if user else None + + +async def admin_exists(session: AsyncSession, username: str) -> bool: + user_id = await session.scalar( + select(User.id).where(User.username == username, User.is_admin.is_(True)) + ) + return user_id is not None diff --git a/src/core/db/session.py b/src/core/db/session.py new file mode 100644 index 00000000..e4aaeb05 --- /dev/null +++ b/src/core/db/session.py @@ -0,0 +1,48 @@ +from contextlib import asynccontextmanager + +from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine + +from src.core.cache import close_cache, open_cache +from src.core.settings import settings + +session_factory: async_sessionmaker[AsyncSession] | None = None + + +def create_engine(): + return create_async_engine( + settings.sqlalchemy_database_url, + pool_size=settings.database_pool_size, + max_overflow=settings.database_max_overflow, + pool_timeout=settings.database_pool_timeout_seconds, + pool_pre_ping=settings.database_pool_pre_ping, + hide_parameters=True, + connect_args={ + "timeout": settings.database_connect_timeout_seconds, + "command_timeout": settings.database_command_timeout_seconds, + "server_settings": {"statement_timeout": str(settings.database_statement_timeout_ms)}, + }, + ) + + +@asynccontextmanager +async def database_lifespan(app): + global session_factory + engine = create_engine() + session_factory = async_sessionmaker(engine, expire_on_commit=False) + open_cache() + try: + yield + finally: + await close_cache() + await engine.dispose() + session_factory = None + + +async def get_db_session(): + if session_factory is None: + raise RuntimeError("Фабрика сессий не запущена") + async with session_factory() as session: + # Одна транзакция на запрос: аутентификация и бизнес-операция вместе. + # Depends(scope='function') завершает COMMIT до отправки ответа. + async with session.begin(): + yield session diff --git a/src/core/db/types.py b/src/core/db/types.py new file mode 100644 index 00000000..36501fdc --- /dev/null +++ b/src/core/db/types.py @@ -0,0 +1,15 @@ +"""Unicode-строки в UTF-8 bytea: PostgreSQL text не допускает U+0000.""" + +from sqlalchemy import LargeBinary +from sqlalchemy.types import TypeDecorator + + +class Utf8Text(TypeDecorator[str]): + impl = LargeBinary + cache_ok = True + + def process_bind_param(self, value: str | None, dialect) -> bytes | None: + return None if value is None else value.encode("utf-8") + + def process_result_value(self, value: bytes | None, dialect) -> str | None: + return None if value is None else value.decode("utf-8") diff --git a/src/core/errors.py b/src/core/errors.py new file mode 100644 index 00000000..70a62c9b --- /dev/null +++ b/src/core/errors.py @@ -0,0 +1,29 @@ +from fastapi import Request +from fastapi.responses import JSONResponse + + +class ApiError(Exception): + def __init__(self, status_code: int, code: str, message: str) -> None: + self.status_code = status_code + self.code = code + self.message = message + super().__init__(message) + + +def error_response( + request: Request, + status_code: int, + code: str, + message: str, +) -> JSONResponse: + request_id = getattr(request.state, "request_id", "неизвестен") + return JSONResponse( + status_code=status_code, + content={ + "error": { + "code": code, + "message": message, + "request_id": request_id, + } + }, + ) diff --git a/src/core/pagination.py b/src/core/pagination.py new file mode 100644 index 00000000..d49e7b7c --- /dev/null +++ b/src/core/pagination.py @@ -0,0 +1,43 @@ +import base64 +import json +from datetime import datetime, timezone +from uuid import UUID + +from src.core.errors import ApiError + + +def encode_cursor(kind: str, owner_id: UUID, created_at: datetime, item_id: UUID) -> str: + payload = { + "kind": kind, + "owner_id": str(owner_id), # id чата + "created_at": created_at.isoformat(), # его время + "item_id": str(item_id), # id сообщения + } + raw = json.dumps(payload, separators=(",", ":")).encode("utf-8") + return base64.urlsafe_b64encode(raw).decode("ascii").rstrip("=") + + +def decode_cursor( + cursor: str, expected_kind: str, expected_owner_id: UUID +) -> tuple[datetime, UUID]: + try: + padding = "=" * (-len(cursor) % 4) + raw = base64.b64decode(cursor + padding, altchars=b"-_", validate=True) + payload = json.loads(raw.decode("utf-8")) + if ( + not isinstance(payload, dict) + or set(payload) != {"kind", "owner_id", "created_at", "item_id"} + or not all(isinstance(value, str) for value in payload.values()) + ): + raise ValueError + if payload["kind"] != expected_kind: + raise ValueError + if UUID(payload["owner_id"]) != expected_owner_id: + raise ValueError + created_at = datetime.fromisoformat(payload["created_at"]) + item_id = UUID(payload["item_id"]) + if created_at.tzinfo is None: + raise ValueError + return created_at.astimezone(timezone.utc), item_id + except (KeyError, TypeError, ValueError, UnicodeError, OverflowError): + raise ApiError(400, "invalid_request", "Некорректный курсор") from None diff --git a/src/core/readiness.py b/src/core/readiness.py new file mode 100644 index 00000000..f627475a --- /dev/null +++ b/src/core/readiness.py @@ -0,0 +1,59 @@ +"""Ограниченная проверка обязательного пути, включая повреждение схемы. + +Отмена asyncpg может ждать ответа замороженного PostgreSQL. HTTP readiness +не должна ждать завершения такого rollback; незавершённая проба остаётся одной +на процесс и до её завершения сервер считается неготовым. +""" + +import asyncio + +from sqlalchemy import select + +from src.core import cache +from src.core.db import session as database +from src.core.db.models import Chat, ChatMember, Message, MessageRequest, User +from src.core.errors import ApiError +from src.core.settings import settings + +_pending: asyncio.Task[None] | None = None + + +async def _probe() -> None: + factory = database.session_factory + if factory is None: + raise ApiError(503, "unavailable", "Хранилище временно недоступно") + async with factory() as session: + for model in (User, Chat, ChatMember, Message, MessageRequest): + await session.execute(select(model).limit(0)) + await cache.get_client().ping() + + +def _consume_result(task: asyncio.Task[None]) -> None: + if not task.cancelled(): + task.exception() + + +async def check() -> None: + global _pending + if _pending is None or _pending.done(): + _pending = asyncio.create_task(_probe()) + _pending.add_done_callback(_consume_result) + task = _pending + # wait(), в отличие от wait_for(), не ждёт завершения отмены драйвером. + done, _ = await asyncio.wait({task}, timeout=settings.healthcheck_timeout_seconds) + if not done: + if not task.cancelling(): + task.cancel() + raise ApiError(503, "unavailable", "Проверка готовности превысила время ожидания") + if task.cancelled(): + raise ApiError(503, "unavailable", "Хранилище временно недоступно") + task.result() + + +async def close() -> None: + global _pending + if _pending is not None and not _pending.done(): + if not _pending.cancelling(): + _pending.cancel() + await asyncio.wait({_pending}, timeout=settings.healthcheck_timeout_seconds) + _pending = None diff --git a/src/core/request_limits.py b/src/core/request_limits.py new file mode 100644 index 00000000..8e72345e --- /dev/null +++ b/src/core/request_limits.py @@ -0,0 +1,122 @@ +"""Ограниченный приём тела до валидации FastAPI, включая chunked-запросы.""" + +import asyncio +import json + +from anyio import CapacityLimiter, WouldBlock +from starlette.requests import Request +from starlette.types import ASGIApp, Message, Receive, Scope, Send + +from src.core.errors import error_response +from src.core.settings import settings + + +def unique_object(pairs: list[tuple[str, object]]) -> dict[str, object]: + result = {} + for key, value in pairs: + if key in result: + raise ValueError("Повторяющийся ключ JSON") + result[key] = value + return result + + +def reject_constant(value: str) -> None: + raise ValueError("Недопустимое значение JSON") + + +class RequestLimitsMiddleware: + def __init__(self, app: ASGIApp) -> None: + self.app = app + self.limiter = CapacityLimiter(settings.http_concurrency_limit) + + async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: + if scope["type"] != "http" or not scope["path"].startswith("/api/v1/"): + await self.app(scope, receive, send) + return + try: + self.limiter.acquire_nowait() + except WouldBlock: + await error_response(Request(scope), 503, "unavailable", "Сервис перегружен")( + scope, receive, send + ) + return + try: + await self.handle_request(scope, receive, send) + finally: + self.limiter.release() + + async def handle_request(self, scope: Scope, receive: Receive, send: Send) -> None: + request = Request(scope) + if len(request.headers.getlist("content-type")) > 1 or any( + len(request.query_params.getlist(name)) > 1 for name in ("limit", "cursor") + ): + await error_response( + request, 400, "invalid_request", "Неоднозначные параметры запроса" + )(scope, receive, send) + return + content_type = request.headers.get("content-type", "").split(";", 1)[0].strip().lower() + json_body = ( + request.method == "POST" and scope["path"].rstrip("/") != "/api/v1/auth/sessions" + ) + if json_body and content_type != "application/json": + await error_response( + request, 415, "unsupported_media_type", "Требуется application/json" + )(scope, receive, send) + return + try: + length = int(request.headers.get("content-length", "0")) + if length < 0: + raise ValueError + except ValueError: + await error_response(request, 400, "invalid_request", "Неверная длина тела")( + scope, receive, send + ) + return + body = bytearray() + too_large = length > settings.http_max_body_bytes + if not too_large: + try: + async with asyncio.timeout(settings.http_body_timeout_seconds): + while True: + message = await receive() + if message["type"] == "http.disconnect": + return + chunk = message.get("body", b"") + if len(body) + len(chunk) > settings.http_max_body_bytes: + too_large = True + break + body.extend(chunk) + if not message.get("more_body", False): + break + except TimeoutError: + await error_response(request, 408, "invalid_request", "Истекло время приёма тела")( + scope, receive, send + ) + return + if too_large: + await error_response(request, 413, "payload_too_large", "Превышен размер тела запроса")( + scope, receive, send + ) + return + if json_body: + try: + json.loads( + body.decode("utf-8"), + object_pairs_hook=unique_object, + parse_constant=reject_constant, + ) + except (ValueError, UnicodeError, RecursionError): + await error_response(request, 400, "invalid_request", "Некорректный JSON UTF-8")( + scope, receive, send + ) + return + delivered = False + + async def buffered_receive() -> Message: + nonlocal delivered + if delivered: + return await receive() + delivered = True + return {"type": "http.request", "body": bytes(body), "more_body": False} + + await self.app(scope, buffered_receive, send) diff --git a/src/core/security.py b/src/core/security.py new file mode 100644 index 00000000..210710c5 --- /dev/null +++ b/src/core/security.py @@ -0,0 +1,42 @@ +"""Пароли: Argon2id. Токены: SHA-256 от случайного секрета.""" + +import hashlib + +from anyio import CapacityLimiter, to_thread +from argon2 import PasswordHasher, Type +from argon2.exceptions import InvalidHashError, VerificationError + +from src.core.settings import settings + +password_hasher = PasswordHasher( + time_cost=settings.argon2_time_cost, + memory_cost=settings.argon2_memory_cost, + parallelism=settings.argon2_parallelism, + salt_len=settings.argon2_salt_len, + hash_len=settings.argon2_hash_len, + type=Type.ID, +) +password_limiter = CapacityLimiter(settings.password_hash_concurrency) + + +async def hash_password_async(password: str) -> str: + return await to_thread.run_sync(hash_password, password, limiter=password_limiter) + + +async def verify_password_async(password: str, stored: str) -> bool: + return await to_thread.run_sync(verify_password, password, stored, limiter=password_limiter) + + +def hash_password(password: str) -> str: + return password_hasher.hash(password) + + +def verify_password(password: str, stored: str) -> bool: + try: + return password_hasher.verify(stored, password) + except (VerificationError, InvalidHashError): + return False + + +def hash_token(token: str) -> str: + return hashlib.sha256(token.encode("utf-8")).hexdigest() diff --git a/src/core/session_store.py b/src/core/session_store.py new file mode 100644 index 00000000..1d7083fa --- /dev/null +++ b/src/core/session_store.py @@ -0,0 +1,55 @@ +"""Сессии в Redis: абсолютный срок жизни, без продления при чтении.""" + +import json +from dataclasses import asdict +from datetime import datetime, timezone +from uuid import UUID + +from redis.exceptions import ResponseError + +from src.core import cache +from src.service.dto import StoredSessionDTO + + +def session_key(token_hash: str) -> str: + return f"session:v1:{token_hash}" + + +async def create_session(token_hash: str, session: StoredSessionDTO) -> None: + await cache.get_client().set( + session_key(token_hash), + json.dumps(asdict(session), default=str), + pxat=int(session.expires_at.timestamp() * 1000), + ) + + +async def fetch_session(token_hash: str) -> StoredSessionDTO | None: + key = session_key(token_hash) + try: + raw = await cache.get_client().get(key) + if raw is None: + return None + data = json.loads(raw) + if ( + not isinstance(data, dict) + or set(data) != {"user_id", "expires_at"} + or not all(isinstance(value, str) for value in data.values()) + ): + raise ValueError + session = StoredSessionDTO( + UUID(data["user_id"]), datetime.fromisoformat(data["expires_at"]) + ) + if session.expires_at.tzinfo is None or session.expires_at <= datetime.now(timezone.utc): + raise ValueError + return session + except ResponseError as error: + if not str(error).startswith("WRONGTYPE"): + raise + except (ValueError, KeyError, TypeError, UnicodeError): + pass + await cache.get_client().delete(key) + return None + + +async def delete_session(token_hash: str) -> None: + await cache.get_client().delete(session_key(token_hash)) diff --git a/src/core/settings.py b/src/core/settings.py new file mode 100644 index 00000000..ad47ea60 --- /dev/null +++ b/src/core/settings.py @@ -0,0 +1,95 @@ +from typing import Literal, Self + +from pydantic import Field, SecretStr, field_validator, model_validator +from pydantic_settings import BaseSettings, SettingsConfigDict + + +class AppSettings(BaseSettings): + model_config = SettingsConfigDict( + env_file=".env", + env_file_encoding="utf-8", + extra="ignore", + hide_input_in_errors=True, + ) + + app_host: str = "0.0.0.0" + app_port: int = Field(default=8080, ge=1, le=65535) + app_env: Literal["lab", "production"] = "lab" + app_workers: int = Field(default=1, ge=1) + shutdown_timeout_seconds: int = Field(default=10, gt=0) + healthcheck_timeout_seconds: float = Field(default=2, gt=0) + http_max_body_bytes: int = Field(default=65536, ge=65536) + http_body_timeout_seconds: float = Field(default=5, gt=0) + http_concurrency_limit: int = Field(default=64, gt=0) + authorization_max_length: int = Field(default=2048, ge=1024) + cursor_max_length: int = Field(default=1024, ge=512) + password_hash_concurrency: int = Field(default=2, gt=0) + + database_url: SecretStr + database_pool_size: int = Field(default=10, gt=0) + database_max_overflow: int = Field(default=0, ge=0) + database_pool_timeout_seconds: float = Field(default=5, gt=0) + database_connect_timeout_seconds: float = Field(default=5, gt=0) + database_command_timeout_seconds: float = Field(default=5, gt=0) + database_statement_timeout_ms: int = Field(default=5000, gt=0) + database_pool_pre_ping: bool = True + + redis_url: SecretStr + redis_max_connections: int = Field(default=10, gt=0) + redis_connect_timeout_seconds: float = Field(default=0.3, gt=0) + redis_read_timeout_seconds: float = Field(default=0.3, gt=0) + redis_retry_on_timeout: bool = False + profile_cache_ttl_seconds: int = Field(default=60, gt=0) + + admin_username: str = Field(default="admin", pattern=r"^[a-z0-9_]{3,32}$") + admin_password: SecretStr = Field( + default=SecretStr("admin-password-123"), + min_length=12, + max_length=128, + ) + admin_display_name: str = Field(default="Администратор", min_length=1, max_length=100) + + session_ttl_seconds: int = Field(default=3600, gt=0) + session_token_bytes: int = Field(default=32, ge=32) + argon2_time_cost: int = Field(default=3, gt=0) + argon2_memory_cost: int = Field(default=65536, ge=8192) + argon2_parallelism: int = Field(default=4, gt=0) + argon2_salt_len: int = Field(default=16, ge=16) + argon2_hash_len: int = Field(default=32, ge=32) + + log_level: Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] = "INFO" + log_format: str = "%(asctime)s %(levelname)s %(name)s: %(message)s" + + @field_validator("admin_password") + @classmethod + def admin_password_must_not_be_blank(cls, value: SecretStr) -> SecretStr: + if not value.get_secret_value().strip(): + raise ValueError("Пароль администратора не может быть пробельным") + value.get_secret_value().encode("utf-8") + return value + + @field_validator("admin_display_name") + @classmethod + def admin_display_name_must_be_valid(cls, value: str) -> str: + if not value.strip() or "\x00" in value: + raise ValueError("Некорректное имя администратора") + return value + + @model_validator(mode="after") + def production_must_use_custom_password(self) -> Self: + if self.app_env == "production" and self.admin_password.get_secret_value() == ( + "admin-password-123" + ): + raise ValueError("Для production требуется собственный ADMIN_PASSWORD") + return self + + @property + def sqlalchemy_database_url(self) -> str: + return self.database_url.get_secret_value().replace( + "postgresql://", + "postgresql+asyncpg://", + 1, + ) + + +settings = AppSettings() diff --git a/src/main.py b/src/main.py new file mode 100644 index 00000000..cb10fd7b --- /dev/null +++ b/src/main.py @@ -0,0 +1,114 @@ +import logging +import time +import uuid + +from fastapi import FastAPI, Request +from fastapi.exceptions import RequestValidationError +from fastapi.responses import JSONResponse +from redis.exceptions import RedisError +from sqlalchemy.exc import DBAPIError +from sqlalchemy.exc import TimeoutError as DatabaseTimeoutError +from starlette.exceptions import HTTPException as StarletteHTTPException + +from src.api.router import router as api_router +from src.core import readiness +from src.core.callback import lifespan +from src.core.errors import ApiError, error_response +from src.core.request_limits import RequestLimitsMiddleware +from src.core.settings import settings + +logging.basicConfig(level=settings.log_level, format=settings.log_format) + +INSTANCE_ID = str(uuid.uuid4()) + +app = FastAPI(lifespan=lifespan) +app.add_middleware(RequestLimitsMiddleware) +app.include_router(api_router) +logger = logging.getLogger(__name__) + + +@app.middleware("http") +async def add_request_id(request: Request, call_next): + request_id = str(uuid.uuid4()) + request.state.request_id = request_id + started_at = time.perf_counter() + + try: + response = await call_next(request) + except Exception: + logger.exception( + "Необработанная ошибка запроса", + extra={"request_id": request_id}, + ) + + response = JSONResponse( + status_code=500, + content={ + "error": { + "code": "internal_error", + "message": "Внутренняя ошибка сервера", + "request_id": request_id, + } + }, + ) + + response.headers["X-Request-Id"] = request_id + response.headers["X-Instance-Id"] = INSTANCE_ID + if request.url.path.startswith("/api/v1/"): + response.headers["Cache-Control"] = "no-store" + response.headers["X-Content-Type-Options"] = "nosniff" + logger.info( + "ид_запроса=%s метод=%s путь=%r статус=%s длительность_мс=%.3f", + request_id, + request.method, + request.url.path, + response.status_code, + (time.perf_counter() - started_at) * 1000, + ) + return response + + +@app.exception_handler(ApiError) +async def handle_api_error(request: Request, exc: ApiError) -> JSONResponse: + response = error_response(request, exc.status_code, exc.code, exc.message) + if exc.status_code == 401: + response.headers["WWW-Authenticate"] = ( + 'Basic realm="messenger", charset="UTF-8"' + if request.url.path == "/api/v1/auth/sessions" + else 'Bearer realm="messenger"' + ) + return response + + +@app.exception_handler(RequestValidationError) +async def handle_validation_error(request: Request, exc: RequestValidationError) -> JSONResponse: + return error_response(request, 400, "invalid_request", "Некорректные параметры запроса") + + +@app.exception_handler(StarletteHTTPException) +async def handle_http_error(request: Request, exc: StarletteHTTPException) -> JSONResponse: + code = "not_found" if exc.status_code == 404 else "invalid_request" + message = "Объект не найден" if exc.status_code == 404 else "Некорректный запрос" + return error_response(request, exc.status_code, code, message) + + +@app.get("/health/live") +async def get_health(): + return { + "status": "ok", + } + + +@app.get("/health/ready") +async def get_ready(): + await readiness.check() + return {"status": "ok"} + + +async def handle_database_error(request: Request, exc: Exception) -> JSONResponse: + logger.warning("Хранилище временно недоступно: тип_ошибки=%s", type(exc).__name__) + return error_response(request, 503, "unavailable", "Хранилище временно недоступно") + + +for error_type in (RedisError, DBAPIError, DatabaseTimeoutError, OSError, TimeoutError): + app.add_exception_handler(error_type, handle_database_error) diff --git a/src/service/__init__.py b/src/service/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/service/auth.py b/src/service/auth.py new file mode 100644 index 00000000..425f2856 --- /dev/null +++ b/src/service/auth.py @@ -0,0 +1,74 @@ +import logging +import secrets +from datetime import datetime, timedelta, timezone + +from sqlalchemy.ext.asyncio import AsyncSession + +from src.core import session_store +from src.core.db.repo import auth as auth_repo +from src.core.db.repo import user as user_repo +from src.core.security import hash_password, hash_token, verify_password_async +from src.core.settings import settings +from src.service.dto import AuthSessionDTO, StoredSessionDTO, UserDTO +from src.service.exceptions import InvalidCredentialsException, InvalidSessionException + +logger = logging.getLogger(__name__) +# Для неизвестного логина тоже выполняем Argon2, чтобы не отвечать заметно быстрее. +_DUMMY_PASSWORD_HASH = hash_password("dummy-password-for-timing") + + +class AuthService: + def __init__( + self, + db_session: AsyncSession, + *, + session_ttl_seconds: int, + ) -> None: + self._db_session = db_session + self._session_ttl = timedelta(seconds=session_ttl_seconds) + + async def login(self, *, username: str, password: str) -> AuthSessionDTO: + credentials = await auth_repo.fetch_user_credentials( + session=self._db_session, + username=username, + ) + password_hash = credentials.password_hash if credentials else _DUMMY_PASSWORD_HASH + password_valid = await verify_password_async(password, password_hash) + if credentials is None or not password_valid: + logger.warning("Вход отклонён: неверный логин или пароль") + raise InvalidCredentialsException("Неверный логин или пароль") + + user = credentials.user + token = secrets.token_urlsafe(settings.session_token_bytes) + expires_at = datetime.now(timezone.utc) + self._session_ttl + await session_store.create_session( + token_hash=hash_token(token), + session=StoredSessionDTO(user_id=user.id, expires_at=expires_at), + ) + logger.info("Сессия создана: пользователь=%s", user.id) + return AuthSessionDTO( + token=token, + expires_at=expires_at, + user=user, + ) + + async def get_user(self, *, token: str) -> UserDTO: + session = await session_store.fetch_session(token_hash=hash_token(token)) + if session is None: + logger.info("Доступ отклонён: сессия отсутствует или истекла") + raise InvalidSessionException("Нет действующей сессии") + + user = await user_repo.fetch_user_by_id( + session=self._db_session, + user_id=session.user_id, + ) + if user is None: + logger.warning("Доступ отклонён: пользователь сессии не найден") + raise InvalidSessionException("Нет действующей сессии") + + logger.debug("Сессия подтверждена: пользователь=%s", user.id) + return user + + async def logout(self, *, token: str) -> None: + await session_store.delete_session(token_hash=hash_token(token)) + logger.info("Сессия завершена") diff --git a/src/service/chat.py b/src/service/chat.py new file mode 100644 index 00000000..97ce519c --- /dev/null +++ b/src/service/chat.py @@ -0,0 +1,61 @@ +from datetime import datetime, timezone +from uuid import UUID, uuid4 + +from sqlalchemy.ext.asyncio import AsyncSession + +from src.core.db.repo import chat as chat_repo +from src.core.db.repo import user as user_repo +from src.service.dto import ChatDTO +from src.service.exceptions import ChatNotFoundException, InvalidChatMembersException + + +class ChatService: + def __init__(self, db_session: AsyncSession) -> None: + self._db_session = db_session + + async def create_chat( + self, + *, + title: str, + member_ids: list[UUID], + current_user_id: UUID, + ) -> ChatDTO: + if current_user_id not in member_ids: + raise InvalidChatMembersException("Создатель должен быть в списке member_ids") + if not await user_repo.users_exist( + session=self._db_session, + user_ids=member_ids, + ): + raise InvalidChatMembersException("Указан неизвестный пользователь") + + return await chat_repo.create_chat( + session=self._db_session, + chat_id=uuid4(), + title=title, + member_ids=member_ids, + created_at=datetime.now(timezone.utc), + ) + + async def get_chat(self, *, chat_id: UUID, current_user_id: UUID) -> ChatDTO: + chat = await chat_repo.fetch_chat_by_id( + session=self._db_session, + chat_id=chat_id, + ) + self._check_access(chat=chat, user_id=current_user_id) + return chat + + async def get_chats( + self, + *, + current_user_id: UUID, + limit: int, + after: tuple[datetime, UUID] | None = None, + ) -> list[ChatDTO]: + return await chat_repo.fetch_chats( + session=self._db_session, user_id=current_user_id, limit=limit, after=after + ) + + @staticmethod + def _check_access(*, chat: ChatDTO | None, user_id: UUID) -> None: + if chat is None or user_id not in chat.member_ids: + raise ChatNotFoundException("Чат не найден") diff --git a/src/service/dto.py b/src/service/dto.py new file mode 100644 index 00000000..1d6b0280 --- /dev/null +++ b/src/service/dto.py @@ -0,0 +1,49 @@ +from dataclasses import dataclass, field +from datetime import datetime +from typing import Literal +from uuid import UUID + + +@dataclass(frozen=True, slots=True) +class UserDTO: + id: UUID + username: str + display_name: str + created_at: datetime + + +@dataclass(frozen=True, slots=True) +class ChatDTO: + id: UUID + title: str + member_ids: tuple[UUID, ...] + created_at: datetime + + +@dataclass(frozen=True, slots=True) +class MessageDTO: + id: UUID + chat_id: UUID + sender_id: UUID + text: str + created_at: datetime + + +@dataclass(frozen=True, slots=True) +class AuthSessionDTO: + token: str = field(repr=False) + expires_at: datetime + user: UserDTO + token_type: Literal["Bearer"] = "Bearer" + + +@dataclass(frozen=True, slots=True) +class StoredSessionDTO: + user_id: UUID + expires_at: datetime + + +@dataclass(frozen=True, slots=True) +class UserCredentialsDTO: + user: UserDTO + password_hash: str = field(repr=False) diff --git a/src/service/exceptions.py b/src/service/exceptions.py new file mode 100644 index 00000000..4c682db7 --- /dev/null +++ b/src/service/exceptions.py @@ -0,0 +1,30 @@ +class IdempotencyConflictException(Exception): + pass + + +class ServiceException(Exception): + pass + + +class UserAlreadyExistsException(ServiceException): + pass + + +class UserNotFoundException(ServiceException): + pass + + +class InvalidChatMembersException(ServiceException): + pass + + +class ChatNotFoundException(ServiceException): + pass + + +class InvalidCredentialsException(ServiceException): + pass + + +class InvalidSessionException(ServiceException): + pass diff --git a/src/service/message.py b/src/service/message.py new file mode 100644 index 00000000..afe7ae9d --- /dev/null +++ b/src/service/message.py @@ -0,0 +1,62 @@ +from datetime import datetime, timezone +from uuid import UUID, uuid4 + +from sqlalchemy.ext.asyncio import AsyncSession + +from src.core.db.repo import chat as chat_repo +from src.core.db.repo import message as message_repo +from src.service.dto import ChatDTO, MessageDTO +from src.service.exceptions import ChatNotFoundException + + +class MessageService: + def __init__(self, db_session: AsyncSession) -> None: + self._db_session = db_session + + async def create_message( + self, + *, + chat_id: UUID, + sender_id: UUID, + text: str, + idempotency_key: str, + ) -> MessageDTO: + chat = await chat_repo.fetch_chat_by_id( + session=self._db_session, + chat_id=chat_id, + ) + self._check_access(chat=chat, user_id=sender_id) + return await message_repo.create_idempotent_message( + session=self._db_session, + message_id=uuid4(), + idempotency_key=idempotency_key, + chat_id=chat_id, + sender_id=sender_id, + text=text, + created_at=datetime.now(timezone.utc), + ) + + async def get_messages( + self, + *, + chat_id: UUID, + current_user_id: UUID, + limit: int, + after: tuple[datetime, UUID] | None = None, + ) -> list[MessageDTO]: + chat = await chat_repo.fetch_chat_by_id( + session=self._db_session, + chat_id=chat_id, + ) + self._check_access(chat=chat, user_id=current_user_id) + return await message_repo.fetch_messages_by_chat_id( + session=self._db_session, + chat_id=chat_id, + limit=limit, + after=after, + ) + + @staticmethod + def _check_access(*, chat: ChatDTO | None, user_id: UUID) -> None: + if chat is None or user_id not in chat.member_ids: + raise ChatNotFoundException("Чат не найден") diff --git a/src/service/user.py b/src/service/user.py new file mode 100644 index 00000000..05b6882e --- /dev/null +++ b/src/service/user.py @@ -0,0 +1,63 @@ +from datetime import datetime, timezone +from uuid import UUID, uuid4 + +from sqlalchemy.exc import IntegrityError +from sqlalchemy.ext.asyncio import AsyncSession + +from src.core.db.repo import user as user_repo +from src.core.security import hash_password_async +from src.service.dto import UserDTO +from src.service.exceptions import UserAlreadyExistsException, UserNotFoundException + + +class UserService: + def __init__(self, db_session: AsyncSession) -> None: + self._db_session = db_session + + async def create_user(self, *, username: str, display_name: str, password: str) -> UserDTO: + password_hash = await hash_password_async(password) + try: + return await user_repo.create_user( + session=self._db_session, + user_id=uuid4(), + username=username, + display_name=display_name, + created_at=datetime.now(timezone.utc), + password_hash=password_hash, + ) + except IntegrityError as error: + if getattr(error.orig, "sqlstate", None) != "23505": + raise + raise UserAlreadyExistsException("Пользователь с таким именем уже существует") from None + + async def create_admin( + self, + *, + username: str, + display_name: str, + password: str, + ) -> UserDTO | None: + password_hash = await hash_password_async(password) + user = await user_repo.create_admin( + session=self._db_session, + user_id=uuid4(), + username=username, + display_name=display_name, + password_hash=password_hash, + created_at=datetime.now(timezone.utc), + ) + if user is None and not await user_repo.admin_exists( + session=self._db_session, + username=username, + ): + raise UserAlreadyExistsException("Имя администратора занято обычным пользователем") + return user + + async def get_user_by_id(self, *, user_id: UUID) -> UserDTO: + user = await user_repo.fetch_user_by_id( + session=self._db_session, + user_id=user_id, + ) + if user is None: + raise UserNotFoundException("Пользователь не найден") + return user diff --git a/tests/auth_logging.py b/tests/auth_logging.py new file mode 100644 index 00000000..66160eaf --- /dev/null +++ b/tests/auth_logging.py @@ -0,0 +1,36 @@ +"""Проверка русских событий авторизации и отсутствия секретов в логах Compose.""" +import subprocess +import base64 +from datetime import datetime, timezone +from pathlib import Path + +from client import Client, arguments, check, run + + +def main(): + args = arguments('Проверка логов авторизации') + started = datetime.now(timezone.utc).isoformat().replace('+00:00', 'Z') + client = Client(args.base_url, args.ca_file) + actor = client.user('auth_logs') + username = actor['registration']['username'] + wrong_password = 'wrong-password-for-logging' + client.call('POST', '/api/v1/auth/sessions', 401, headers={'Authorization': 'Basic ' + base64.b64encode((username + ':' + wrong_password).encode()).decode()}) + missing_username = 'missing_' + actor['id'].replace('-', '')[:12] + client.call('POST', '/api/v1/auth/sessions', 401, headers={'Authorization': 'Basic ' + base64.b64encode((missing_username + ':' + wrong_password).encode()).decode()}) + client.call('DELETE', '/api/v1/auth/sessions/current', 204, actor=actor) + client.call('GET', '/api/v1/users/me', 401, actor=actor) + result = subprocess.run( + ['docker', 'compose', 'logs', '--no-color', '--since', started, 'api'], + cwd=Path(__file__).resolve().parents[1], check=True, capture_output=True, text=True, + ) + logs = result.stdout + result.stderr + check('src.service.auth' in logs, 'Не используется обычный логгер модуля') + for message in ('Сессия создана', 'Вход отклонён', 'Сессия завершена', 'Доступ отклонён'): + check(message in logs, 'В логах отсутствует событие авторизации') + for secret in (actor['token'], actor['registration']['password'], wrong_password): + check(secret not in logs, 'В логах обнаружены credentials') + print('PASS: русские события входа/отказа/logout; пароли и токены не попали в логи') + + +if __name__ == '__main__': + run(main) diff --git a/tests/callbacks.py b/tests/callbacks.py new file mode 100644 index 00000000..264ca119 --- /dev/null +++ b/tests/callbacks.py @@ -0,0 +1,107 @@ +"""docker compose exec -T api python < tests/callbacks.py.""" +import asyncio +import base64 +import json +from uuid import uuid4 +from urllib.error import HTTPError +from urllib.request import Request, urlopen +from unittest.mock import patch + +from pydantic import SecretStr + +from sqlalchemy import delete, func, select +from sqlalchemy.ext.asyncio import async_sessionmaker + +from src.api.v1.routers.auth.callback import create_admin +from src.core.db.models import User +from src.core.db.session import create_engine +from src.core.settings import settings +from src.service.exceptions import UserAlreadyExistsException +from src.service.user import UserService + + +def call(method, path, expected, headers=None, body=None): + data = None if body is None else json.dumps(body).encode() + request_headers = dict(headers or {}) + if body is not None: + request_headers['Content-Type'] = 'application/json' + request = Request(f'http://127.0.0.1:{settings.app_port}' + path, + method=method, headers=request_headers, data=data) + try: + response = urlopen(request, timeout=10) + except HTTPError as error: + response = error + with response: + assert response.status == expected, response.status + return json.load(response) if response.status != 204 else None + + +async def main(): + engine = create_engine() + factory = async_sessionmaker(engine, expire_on_commit=False) + try: + async with factory() as session: + admin = await session.scalar(select(User).where(User.username == settings.admin_username)) + assert admin is not None and admin.is_admin + identity = (admin.id, admin.password_hash, admin.created_at) + await asyncio.gather(create_admin(factory), create_admin(factory)) + async with factory() as session: + admin = await session.scalar(select(User).where(User.username == settings.admin_username)) + assert (admin.id, admin.password_hash, admin.created_at) == identity + assert await session.scalar(select(func.count()).select_from(User).where( + User.username == settings.admin_username, + )) == 1 + print('PASS: стартовый администратор создан; повторные callbacks не дублируют и не меняют пароль') + with patch.object(settings, 'app_env', 'production'), patch.object( + settings, 'admin_password', SecretStr('different-production-password-123') + ): + try: + await create_admin(factory) + except RuntimeError: + pass + else: + raise AssertionError('Production запущен с несовпадающим паролем в БД') + print('PASS: production не принимает старый пароль администратора при изменённой конфигурации') + + credential = base64.b64encode((settings.admin_username + ':' + settings.admin_password.get_secret_value()).encode()).decode() + result = call('POST', '/api/v1/auth/sessions', 201, headers={'Authorization': 'Basic ' + credential}) + bearer = {'Authorization': 'Bearer ' + result['token']} + me = call('GET', '/api/v1/users/me', 200, bearer) + assert me['id'] == str(identity[0]) + call('DELETE', '/api/v1/auth/sessions/current', 204, bearer) + print('PASS: администратор входит через Basic, читает профиль через Bearer и выходит') + + username = 'seed_test_' + uuid4().hex[:12] + password = 'valid-password-for-seed-test' + normal = call('POST', '/api/v1/users', 201, body={ + 'username': username, 'display_name': 'Обычный пользователь', 'password': password, + }) + try: + try: + async with factory.begin() as session: + await UserService(session).create_admin( + username=username, display_name='Администратор', password=password, + ) + except UserAlreadyExistsException: + pass + else: + raise AssertionError('Обычный пользователь стал администратором') + async with factory() as session: + assert not await session.scalar(select(User.is_admin).where(User.username == username)) + finally: + from uuid import UUID + async with factory.begin() as session: + await session.execute(delete(User).where(User.id == UUID(normal['id']))) + print('PASS: callback не повышает права обычного пользователя с совпавшим username') + + base = {'username': 'constraints_' + uuid4().hex[:12], 'display_name': 'Проверка', + 'password': password} + call('POST', '/api/v1/users', 400, body={**base, 'username': 'user@example.com'}) + call('POST', '/api/v1/users', 400, body={**base, 'password': 'admin'}) + call('POST', '/api/v1/users', 400, body={**base, 'is_admin': True}) + print('PASS: ограничения username/password сохранены; is_admin нельзя передать при регистрации') + finally: + await engine.dispose() + + +asyncio.run(main()) diff --git a/tests/database.py b/tests/database.py new file mode 100644 index 00000000..253fedf1 --- /dev/null +++ b/tests/database.py @@ -0,0 +1,87 @@ +"""docker compose exec -T api python < tests/database.py.""" +import asyncio +import subprocess +import sys +from datetime import datetime, timedelta, timezone +from uuid import uuid4 + +from sqlalchemy import Column, MetaData, String, Table, func, insert, select, text +from sqlalchemy.exc import IntegrityError +from sqlalchemy.ext.asyncio import async_sessionmaker + +from src.core.db.models import Chat, ChatMember, Message, User +from src.core.db.repo.chat import create_chat +from src.core.db.repo.message import history_query +from src.core.db.session import create_engine + + +async def main(): + engine = create_engine() + factory = async_sessionmaker(engine, expire_on_commit=False) + try: + async def counts(): + async with factory() as session: + return [await session.scalar(select(func.count()).select_from(model)) + for model in (User, Chat, ChatMember, Message)] + + before = await counts() + for _ in range(2): + subprocess.run([sys.executable, '-m', 'alembic', 'upgrade', 'head'], check=True) + assert before == await counts(), 'Повтор миграций изменил данные' + versions = Table('alembic_version', MetaData(), Column('version_num', String(32), primary_key=True)) + async with factory() as session: + assert (await session.scalars(select(versions.c.version_num))).all() == ['006'] + print('PASS: два повторных запуска миграций не изменили данные; версия 006 одна') + + user_id, chat_id = uuid4(), uuid4() + now = datetime.now(timezone.utc) + try: + async with factory.begin() as session: + await create_chat(session, chat_id, 'rollback', [user_id], now) + except IntegrityError as error: + assert getattr(error.orig, 'sqlstate', None) == '23503' + else: + raise AssertionError('Ожидался отказ внешнего ключа') + async with factory() as session: + assert await session.get(Chat, chat_id) is None + assert await session.scalar( + select(func.count()).select_from(ChatMember).where(ChatMember.chat_id == chat_id) + ) == 0 + print('PASS: ошибка участника откатила INSERT чата и участников') + + async with factory() as session: + try: + session.add(User(id=user_id, username='plan_' + uuid4().hex[:16], + display_name='EXPLAIN', password_hash='test-not-for-login', created_at=now)) + await session.flush() + await create_chat(session, chat_id, 'EXPLAIN', [user_id], now) + await session.execute(insert(Message), [ + dict(id=uuid4(), chat_id=chat_id, sender_id=user_id, text=f'message {n}', + created_at=now + timedelta(milliseconds=n)) for n in range(1, 10001) + ]) + # ANALYZE и EXPLAIN — диагностические команды PostgreSQL, не запросы репозитория. + await session.execute(text('ANALYZE messages')) + count = await session.scalar( + select(func.count()).select_from(Message).where(Message.chat_id == chat_id) + ) + print('Сообщений в исследуемом чате:', count) + after = (await session.execute( + select(Message.created_at, Message.id).where(Message.chat_id == chat_id) + .order_by(Message.created_at, Message.id).offset(8999).limit(1) + )).one() + # Исследуется именно выражение SQLAlchemy, используемое в репозитории. + compiled = history_query(chat_id, 51, tuple(after)).compile( + dialect=engine.dialect, compile_kwargs={'literal_binds': True}, + ) + rows = await session.execute(text('EXPLAIN (ANALYZE, BUFFERS) ' + str(compiled))) + plan = '\n'.join(row[0] for row in rows) + assert 'messages_history_idx' in plan, plan + print(plan) + print('PASS: индекс истории используется для глубокой страницы из 10000 сообщений') + finally: + await session.rollback() + finally: + await engine.dispose() + + +asyncio.run(main()) diff --git a/tests/dependencies.py b/tests/dependencies.py new file mode 100644 index 00000000..73df39ba --- /dev/null +++ b/tests/dependencies.py @@ -0,0 +1,160 @@ +"""Проверка отказов только локального Compose-стенда; сервисы восстанавливаются.""" + +import hashlib +import json +import subprocess +import time +from pathlib import Path + +from client import Client, Failure, arguments, run + +ROOT = Path(__file__).resolve().parents[1] + + +def compose(*args): + subprocess.run( + ["docker", "compose", *args], cwd=ROOT, check=True, stdout=subprocess.DEVNULL, timeout=60 + ) + + +def main(): + args = arguments("Отказы Redis и PostgreSQL") + c = Client(args.base_url, args.ca_file) + actor = c.user("outage") + c.call("GET", "/api/v1/users/me", actor=actor, schema="User") + key = "user:v1:" + actor["id"] + + def redis(*args): + return subprocess.check_output( + ["docker", "compose", "exec", "-T", "redis", "redis-cli", "--raw", *args], + cwd=ROOT, + text=True, + timeout=10, + ).strip() + + assert redis("EXISTS", key) == "1", "Профиль не попал в Redis" + assert 0 < int(redis("TTL", key)) <= 60 + + def hits(): + return int( + next( + line.split(":")[1] + for line in redis("INFO", "stats").splitlines() + if line.startswith("keyspace_hits:") + ) + ) + + before = hits() + c.call("GET", "/api/v1/users/me", actor=actor, schema="User") + assert hits() > before, "Повторное чтение не использовало Redis" + redis("DEL", key) + c.call("GET", "/api/v1/users/me", actor=actor, schema="User") + assert redis("EXISTS", key) == "1", "Кэш не восстановился из PostgreSQL" + token_key = "session:v1:" + hashlib.sha256(actor["token"].encode()).hexdigest() + assert redis("EXISTS", token_key) == "1", "Сессия отсутствует в Redis" + ttl_before = int(redis("PTTL", token_key)) + c.call("GET", "/api/v1/users/me", actor=actor, schema="User") + assert 0 < int(redis("PTTL", token_key)) <= ttl_before, "Чтение продлило сессию" + print("PASS: сессия хранится в Redis с TTL; чтение не продлевает срок") + print( + "PASS: профиль кэшируется с TTL<=60; повторный GET даёт cache hit; потеря ключа восполняется" + ) + lost = c.user("lost") + c.call("GET", "/api/v1/users/me", actor=lost, schema="User") + lost_key = "session:v1:" + hashlib.sha256(lost["token"].encode()).hexdigest() + redis("DEL", lost_key) + c.call("GET", "/api/v1/users/me", 401, actor=lost) + assert redis("EXISTS", lost_key) == "0", "Удалённая сессия воскресла" + print("PASS: отсутствующая сессия не восстанавливается из профиля/БД; Redis — источник истины") + # При общей неисправности LB исключает все API. Проверку отдельного + # процесса выполняем из контейнера; внешние API-порты не открываем. + container = subprocess.check_output( + ["docker", "compose", "ps", "-q", "api"], cwd=ROOT, text=True + ).split()[0] + + def probe(method, path, expected=200, actor=None, body=None, schema=None): + code = r""" +import json, sys, urllib.request, urllib.error +p=json.load(sys.stdin) +h={"Content-Type":"application/json"} +if p["actor"]: h["Authorization"]="Bearer "+p["actor"]["token"] +r=urllib.request.Request("http://127.0.0.1:8080"+p["path"], method=p["method"], headers=h, + data=json.dumps(p["body"]).encode() if p["body"] is not None else None) +try: response=urllib.request.urlopen(r, timeout=6) +except urllib.error.HTTPError as e: response=e +with response: + assert response.headers.get("X-Request-Id") and response.headers.get("X-Instance-Id") + print(response.status) +""" + result = subprocess.check_output( + ["docker", "exec", "-i", container, "python", "-c", code], + cwd=ROOT, + text=True, + input=json.dumps(dict(method=method, path=path, actor=actor, body=body)), + ) + assert int(result.strip()) == expected, (method, path, expected, result) + + def wait_lb(): + deadline = time.monotonic() + 30 + while True: + try: + c.call("GET", "/health/ready", schema="Health") + return + except Failure: + if time.monotonic() > deadline: + raise + time.sleep(0.25) + + try: + compose("stop", "redis") + probe("GET", "/health/live", schema="Health") + probe("GET", "/api/v1/users/me", 503, actor=actor) + probe("DELETE", "/api/v1/auth/sessions/current", 503, actor=actor) + probe("GET", "/health/ready", 503) + probe("GET", "/api/v1/users/me", 503, actor={"token": "invalid-token"}) + probe("GET", "/api/v1/users/me", 401) + print( + "PASS: Redis выключен; live=200, ready=503; проверка сессий недоступна, доступ не выдаётся" + ) + finally: + compose("up", "-d", "--wait", "redis") + wait_lb() + probe("GET", "/api/v1/users/me", actor=actor, schema="User") + print("PASS: сессия сохранилась после перезапуска Redis") + revoked = c.user("revoked") + probe("GET", "/api/v1/users/me", actor=revoked, schema="User") + probe("DELETE", "/api/v1/auth/sessions/current", 204, actor=revoked) + compose("restart", "redis") + compose("up", "-d", "--wait", "redis") + probe("GET", "/api/v1/users/me", 401, actor=revoked) + probe( + "POST", + "/api/v1/chats", + 401, + actor=revoked, + body={"title": "Нет доступа", "member_ids": [revoked["id"]]}, + ) + print( + "PASS: logout при отказе Redis возвращает 503; успешный отзыв переживает AOF-рестарт и не даёт доступ" + ) + try: + compose("stop", "postgres") + probe("GET", "/health/live", schema="Health") + probe("GET", "/health/ready", 503) + probe("GET", "/api/v1/chats", 503, actor=actor) + probe("GET", "/api/v1/users/me", 401) + probe("GET", "/api/v1/users/me", 401, actor={"token": "invalid-token"}) + probe("GET", "/api/v1/users/me", actor=actor, schema="User") + print( + "PASS: PostgreSQL выключен; live=200, ready=503, чаты=503; действующая сессия и прогретый профиль доступны в Redis" + ) + finally: + compose("up", "-d", "--wait", "postgres") + probe("GET", "/api/v1/users/me", actor=actor, schema="User") + wait_lb() + c.call("GET", "/api/v1/users/me", actor=actor, schema="User") + print("PASS: после восстановления БД прежняя сессия снова работает через HAProxy") + + +if __name__ == "__main__": + run(main) diff --git a/tests/error_headers.py b/tests/error_headers.py new file mode 100644 index 00000000..025d2366 --- /dev/null +++ b/tests/error_headers.py @@ -0,0 +1,53 @@ +"""Неожиданное исключение не раскрывает детали и сохраняет обязательные headers. +Маршрут добавлен только в этот изолированный процесс, не в работающий API. +""" + +import asyncio +import json + +from src.main import INSTANCE_ID, app + + +@app.get("/_audit_unexpected_error") +async def unexpected(): + raise RuntimeError("audit-internal-detail") + + +async def main(): + messages = [] + + async def receive(): + await asyncio.Event().wait() + + async def send(message): + messages.append(message) + + scope = { + "type": "http", + "asgi": {"version": "3.0", "spec_version": "2.4"}, + "http_version": "1.1", + "method": "GET", + "scheme": "http", + "path": "/_audit_unexpected_error", + "raw_path": b"/_audit_unexpected_error", + "query_string": b"", + "root_path": "", + "headers": [], + "server": ("localhost", 80), + "client": ("127.0.0.1", 1), + } + await app(scope, receive, send) + start = next(m for m in messages if m["type"] == "http.response.start") + payload = json.loads( + b"".join(m.get("body", b"") for m in messages if m["type"] == "http.response.body") + ) + headers = dict(start["headers"]) + assert start["status"] == 500 + assert headers[b"x-instance-id"].decode() == INSTANCE_ID + assert payload["error"]["request_id"] == headers[b"x-request-id"].decode() + assert payload["error"]["code"] == "internal_error" + assert "audit-internal-detail" not in json.dumps(payload) + print("PASS: 500 has X-Request-Id/X-Instance-Id and hides internal exception details") + + +asyncio.run(main()) diff --git a/tests/expiry.py b/tests/expiry.py new file mode 100644 index 00000000..c5bc8b09 --- /dev/null +++ b/tests/expiry.py @@ -0,0 +1,17 @@ +"""Отдельный стенд/запуск с SESSION_TTL_SECONDS=2, не обычный smoke.""" +import time +from client import Client, arguments, run + + +def main(): + args = arguments('Истечение короткой сессии') + c = Client(args.base_url, args.ca_file) + actor = c.user('expiry') + c.call('GET', '/api/v1/users/me', actor=actor, schema='User') + time.sleep(3) + c.call('GET', '/api/v1/users/me', 401, actor=actor) + print('PASS: действующая сессия стала 401 через 3 секунды при TTL=2') + + +if __name__ == '__main__': + run(main) diff --git a/tests/extra.py b/tests/extra.py new file mode 100644 index 00000000..bce67089 --- /dev/null +++ b/tests/extra.py @@ -0,0 +1,111 @@ +from concurrent.futures import ThreadPoolExecutor +import json +import base64 +import uuid +from urllib.parse import quote + +from client import Client, arguments, check, run + + +def main(): + args = arguments("Собственные тесты мессенджера") + client = Client(args.base_url, args.ca_file) + alice, bob, eve, chat = client.bootstrap() + chat_path = "/api/v1/chats/" + chat["id"] + + client.call( + "POST", + "/api/v1/users", + 400, + raw=b'{"username":', + headers={"Content-Type": "application/json"}, + ) + client.call("POST", "/api/v1/users", 409, body=alice["registration"]) + client.call( + "POST", + chat_path + "/messages", + 400, + actor=alice, + body={"text": " "}, + ) + client.call("GET", chat_path, 404, actor=eve) + + # Уникальность защищена ограничением БД, в том числе при гонке. + registration = { + 'username': 'race_' + uuid.uuid4().hex[:16], + 'display_name': 'Гонка регистрации', + 'password': 'Пароль:с-двоеточием-123', + } + def register(_): + local = Client(args.base_url, args.ca_file) + return local.call('POST', '/api/v1/users', [201, 409], body=registration)['status'] + with ThreadPoolExecutor(max_workers=6) as pool: + statuses = list(pool.map(register, range(6))) + check(statuses.count(201) == 1 and statuses.count(409) == 5, 'гонка регистрации не защищена') + session = client.call('POST', '/api/v1/auth/sessions', 201, + headers={'Authorization': 'Basic ' + base64.b64encode((registration['username'] + ':' + registration['password']).encode()).decode()}, schema='Session')['json'] + actor = {'token': session['token']} + client.call('GET', '/api/v1/users/me', actor=actor, schema='User') + client.call('DELETE', '/api/v1/auth/sessions/current', 204, actor=actor) + # Даже прогретый Redis не должен разрешать отозванную сессию. + client.call('GET', '/api/v1/users/me', 401, actor=actor) + + def send_batch(worker_id): + local = Client(args.base_url, args.ca_file) + result = [] + for index in range(10): + response = local.message( + alice, + chat, + "параллельное-%d-%d" % (worker_id, index), + )["json"] + result.append(response["id"]) + return result + + with ThreadPoolExecutor(max_workers=10) as pool: + created_ids = [ + message_id + for batch in pool.map(send_batch, range(10)) + for message_id in batch + ] + + check(len(created_ids) == 100, "не все параллельные запросы вернули ответ") + check(len(set(created_ids)) == 100, "параллельные запросы вернули повторяющиеся ID") + + received = [] + cursor = None + while True: + path = chat_path + "/messages?limit=17" + if cursor is not None: + path += "&cursor=" + quote(cursor, safe="") + page = client.call("GET", path, actor=bob, schema="MessagePage")["json"] + received.extend(page["items"]) + cursor = page["next_cursor"] + if cursor is None: + break + + concurrent_messages = [ + message for message in received if message["text"].startswith("параллельное-") + ] + received_ids = [message["id"] for message in concurrent_messages] + check(len(received_ids) == 100, "в истории нет ровно 100 параллельно созданных сообщений") + check(len(set(received_ids)) == 100, "в истории есть повторяющиеся сообщения") + check(set(received_ids) == set(created_ids), "ID созданных и прочитанных сообщений не совпадают") + + print( + json.dumps( + { + "результат": "ПРОЙДЕНО", + "гонка_регистрации": "1 создан, 5 конфликтов", + "unicode_пароль_и_logout_с_кэшем": "ПРОЙДЕНО", + "параллельных_клиентов": 10, + "создано_сообщений": len(created_ids), + "уникальных_сообщений": len(set(received_ids)), + }, + ensure_ascii=False, + ) + ) + + +if __name__ == "__main__": + run(main) diff --git a/tests/idempotency_db.py b/tests/idempotency_db.py new file mode 100644 index 00000000..2d0d6d00 --- /dev/null +++ b/tests/idempotency_db.py @@ -0,0 +1,79 @@ +"""Запуск внутри API: rollback и 24h expiry без ожидания суток.""" + +import asyncio +from datetime import datetime, timezone +from uuid import uuid4 + +from sqlalchemy import delete, select, text, update +from sqlalchemy.ext.asyncio import async_sessionmaker + +from src.core.db.models import Chat, ChatMember, Message, MessageRequest, User +from src.core.db.repo.message import create_idempotent_message +from src.core.db.session import create_engine + + +async def main(): + engine = create_engine() + factory = async_sessionmaker(engine, expire_on_commit=False) + user_id, chat_id = uuid4(), uuid4() + now = datetime.now(timezone.utc) + async with factory.begin() as s: + s.add( + User( + id=user_id, + username="idem_" + user_id.hex[:20], + display_name="Fixture", + password_hash="not-for-login", + created_at=now, + ) + ) + await s.flush() + s.add(Chat(id=chat_id, title="Idempotency fixture", created_at=now)) + await s.flush() + s.add(ChatMember(chat_id=chat_id, user_id=user_id)) + try: + try: + async with factory.begin() as s: + await create_idempotent_message( + s, uuid4(), chat_id, user_id, "rollback", now, "same" + ) + raise RuntimeError("simulated failure before COMMIT") + except RuntimeError: + pass + async with factory() as s: + assert not list(await s.scalars(select(Message).where(Message.chat_id == chat_id))) + assert not list( + await s.scalars(select(MessageRequest).where(MessageRequest.chat_id == chat_id)) + ) + async with factory.begin() as s: + first = await create_idempotent_message( + s, uuid4(), chat_id, user_id, "committed", now, "same" + ) + async with factory.begin() as s: + replay = await create_idempotent_message( + s, uuid4(), chat_id, user_id, "committed", now, "same" + ) + assert replay == first + await s.execute( + update(MessageRequest) + .where(MessageRequest.chat_id == chat_id) + .values(expires_at=text("clock_timestamp() - interval '1 second'")) + ) + async with factory.begin() as s: + fresh = await create_idempotent_message( + s, uuid4(), chat_id, user_id, "new after expiry", now, "same" + ) + assert fresh.id != first.id + print( + "PASS: rollback removes both message/key; committed result replays; expired key can be reused" + ) + finally: + async with factory.begin() as s: + await s.execute(delete(MessageRequest).where(MessageRequest.chat_id == chat_id)) + await s.execute(delete(Message).where(Message.chat_id == chat_id)) + await s.execute(delete(Chat).where(Chat.id == chat_id)) + await s.execute(delete(User).where(User.id == user_id)) + await engine.dispose() + + +asyncio.run(main()) diff --git a/tests/lab3.py b/tests/lab3.py new file mode 100644 index 00000000..7e456994 --- /dev/null +++ b/tests/lab3.py @@ -0,0 +1,116 @@ +#!/usr/bin/env python3 +"""Конкурентная идемпотентность, область ключей и повторная авторизация.""" + +import json +import threading +import uuid +from concurrent.futures import ThreadPoolExecutor + +from client import Client, arguments, check, run + + +def main(): + args = arguments("Lab3 concurrency and idempotency") + c = Client(args.base_url, args.ca_file) + alice, bob, eve, chat = c.bootstrap() + path = "/api/v1/chats/" + chat["id"] + "/messages" + key = uuid.uuid4().hex + clients = [Client(args.base_url, args.ca_file) for _ in range(16)] + barrier = threading.Barrier(len(clients)) + + def send(local): + barrier.wait() + return local.message(alice, chat, "Одна отправка 👋", key=key) + + with ThreadPoolExecutor(max_workers=len(clients)) as pool: + responses = list(pool.map(send, clients)) + instances = {r["headers"]["X-Instance-Id"] for r in responses} + check(len(instances) >= 2, "Parallel repeats did not reach >=2 replicas") + original = responses[0]["json"] + check(all(r["json"] == original for r in responses), "Concurrent results differ") + messages = c.call("GET", path, actor=bob, schema="MessagePage")["json"]["items"] + check(messages == [original], "Concurrent retries duplicated message") + # Missing attachment_ids and [] are semantically equal; raw JSON ordering too. + replay = c.call( + "POST", + path, + 201, + actor=alice, + raw=b'{"attachment_ids":[],"text":"' + "Одна отправка 👋".encode() + b'"}', + headers={"Idempotency-Key": key, "Content-Type": "application/json"}, + schema="Message", + ) + check(replay["json"] == original, "Equivalent JSON did not replay") + c.call( + "POST", + path, + 409, + actor=alice, + body={"text": "Другой текст"}, + headers={"Idempotency-Key": key}, + ) + other = c.message(bob, chat, "Другой отправитель", key=key)["json"] + check(other["id"] != original["id"], "Key incorrectly shared across users") + chat2 = c.call( + "POST", + "/api/v1/chats", + 201, + actor=alice, + body={"title": "Другой чат", "member_ids": [alice["id"]]}, + schema="Chat", + )["json"] + check( + c.message(alice, chat2, "Другой чат", key=key)["json"]["id"] != original["id"], + "Key scope includes wrong chat", + ) + for invalid in [None, "", "bad key", "x" * 129, "bad/key"]: + c.call( + "POST", + path, + 400, + actor=alice, + body={"text": "invalid"}, + headers={} if invalid is None else {"Idempotency-Key": invalid}, + ) + # Validation/access failures must not consume a key. + retry_key = uuid.uuid4().hex + c.call( + "POST", path, 400, actor=alice, body={"text": ""}, headers={"Idempotency-Key": retry_key} + ) + c.message(alice, chat, "После 400", key=retry_key) + c.call( + "POST", + path, + 404, + actor=eve, + body={"text": original["text"]}, + headers={"Idempotency-Key": key}, + ) + c.call("DELETE", "/api/v1/auth/sessions/current", 204, actor=alice) + c.call( + "POST", + path, + 401, + actor=alice, + body={"text": original["text"]}, + headers={"Idempotency-Key": key}, + ) + for route in ["/health/live", "/health/ready", "/missing"]: + c.call("GET", route, 404 if route == "/missing" else 200) + print( + json.dumps( + { + "parallel_repeats": len(responses), + "instances": sorted(instances), + "messages_created": 1, + "checks": "normalization, conflict, key scope, invalid keys, access, logout, headers", + "result": "PASS", + }, + ensure_ascii=False, + indent=2, + ) + ) + + +if __name__ == "__main__": + run(main) diff --git a/tests/passwords.py b/tests/passwords.py new file mode 100644 index 00000000..3e7fe8d3 --- /dev/null +++ b/tests/passwords.py @@ -0,0 +1,68 @@ +"""docker compose exec -T api python < tests/passwords.py.""" +import asyncio +import base64 +import json +from datetime import datetime, timezone +from uuid import uuid4 +from urllib.error import HTTPError +from urllib.request import Request, urlopen + +from sqlalchemy import delete, select +from sqlalchemy.ext.asyncio import async_sessionmaker + +from src.core import cache, session_store +from src.core.db.models import User +from src.core.db.session import create_engine +from src.core.security import hash_password, hash_token, verify_password + + +def login(username, password, expected): + credential = base64.b64encode((username + ':' + password).encode()).decode() + request = Request('http://127.0.0.1:8080/api/v1/auth/sessions', method='POST', + headers={'Authorization': 'Basic ' + credential}) + try: + response = urlopen(request, timeout=10) + except HTTPError as error: + response = error + with response: + assert response.status == expected, response.status + return json.load(response) + + +async def main(): + password = 'Я:' + 'ю' * 126 + hashed = hash_password(password) + assert hashed.startswith('$argon2id$') + assert hash_password(password) != hashed + assert verify_password(password, hashed) + assert not verify_password('неверный-пароль', hashed) + assert not verify_password(password, 'unsupported$hash') + print('PASS: только Argon2id, случайная соль, Unicode 128 символов, неверный пароль') + engine = create_engine() + factory = async_sessionmaker(engine, expire_on_commit=False) + user_id, username = uuid4(), 'password_' + uuid4().hex[:16] + tokens = [] + cache.open_cache() + try: + async with factory.begin() as session: + session.add(User(id=user_id, username=username, display_name='Password test', + password_hash=hashed, created_at=datetime.now(timezone.utc))) + login(username, 'неверный-пароль', 401) + for _ in range(2): + result = login(username, password, 201) + tokens.append(result['token']) + stored = await session_store.fetch_session(hash_token(result['token'])) + assert stored is not None and stored.user_id == user_id + async with factory() as session: + assert await session.scalar(select(User.password_hash).where(User.id == user_id)) == hashed + print('PASS: повторный вход с Argon2id; сессии находятся в Redis; хеш пароля не изменяется') + finally: + for token in tokens: + await session_store.delete_session(hash_token(token)) + await cache.close_cache() + async with factory.begin() as session: + await session.execute(delete(User).where(User.id == user_id)) + await engine.dispose() + + +asyncio.run(main()) diff --git a/tests/production.py b/tests/production.py new file mode 100644 index 00000000..7176b1d3 --- /dev/null +++ b/tests/production.py @@ -0,0 +1,187 @@ +"""Негативные HTTP/Redis проверки для production-аудита; только локальный Compose.""" +import base64 +from concurrent.futures import ThreadPoolExecutor +import hashlib +import http.client +import json +from pathlib import Path +import subprocess +import threading +import uuid +from urllib.parse import urlsplit, quote + +from client import Client, arguments, check, run + +ROOT = Path(__file__).resolve().parents[1] + + +def redis(*args, raw=None): + command = ['docker', 'compose', 'exec', '-T', 'redis', 'redis-cli', '--raw'] + if raw is not None: + command += ['-x'] + return subprocess.check_output(command + list(args), cwd=ROOT, input=raw, timeout=10).rstrip(b'\n') + + +def main(): + args = arguments('Production-аудит входных данных, Redis и изоляции сессий') + c = Client(args.base_url, args.ca_file) + alice, bob, _, chat = c.bootstrap() + path = '/api/v1/chats/' + chat['id'] + '/messages' + failures = [] + def expect(label, method, path, status, **kwargs): + response = c.call(method, path, [200, 201, 400, 401, 413, 415, 500, 503], **kwargs) + if response['status'] != status: + failures.append(f'{label}: ожидался {status}, получен {response["status"]}') + return response + + payload = {'kind': 'messages', 'owner_id': chat['id'], + 'created_at': '2026-01-01T00:00:00+00:00', 'item_id': str(uuid.uuid4())} + for field, value in [('owner_id', 123), ('item_id', 123), ('owner_id', []), + ('created_at', '9999-12-31T23:59:59-23:59')]: + cursor = base64.urlsafe_b64encode(json.dumps({**payload, field: value}).encode()).decode() + expect('Типы/диапазон курсора ' + field, 'GET', path + '?cursor=' + cursor, 400, actor=alice) + expect('Длина курсора', 'GET', path + '?cursor=' + 'a' * 5000, 400, actor=alice) + for text in ('\ud800', '\udfff'): + expect('Непредставимый текст PostgreSQL', 'POST', path, 400, actor=alice, + raw=json.dumps({'text': 'valid' + text}).encode(), headers={'Content-Type': 'application/json'}) + registration = {'username': 'unicode_' + uuid.uuid4().hex[:16], + 'password': 'valid-password-123', 'display_name': 'Valid'} + for field, value in [('display_name', '\ud800'), + ('password', 'secret-audit-\ud800')]: + expect('Непредставимая строка ' + field, 'POST', '/api/v1/users', 400, + raw=json.dumps({**registration, field: value}).encode(), headers={'Content-Type': 'application/json'}) + expect('Большое тело с допустимым коротким текстом', 'POST', path, 413, actor=alice, + raw=b'{"text":"valid"}' + b' ' * 70000, headers={'Content-Type': 'application/json'}) + expect('Повторяющиеся ключи JSON', 'POST', path, 400, actor=alice, + raw=b'{"text":"first","text":"second"}', headers={'Content-Type': 'application/json'}) + expect('JSON не в UTF-8', 'POST', path, 400, actor=alice, + raw='{"text":"valid"}'.encode('utf-16'), headers={'Content-Type': 'application/json'}) + expect('Нестандартный NaN', 'POST', path, 400, actor=alice, + raw=b'{"text":"valid","extra":NaN}', headers={'Content-Type': 'application/json'}) + expect('Глубокий JSON', 'POST', path, 400, actor=alice, + raw=b'[' * 1200 + b'0' + b']' * 1200, headers={'Content-Type': 'application/json'}) + + # Максимально допустимый текст остаётся допустимым и в escaped JSON. + emoji = '😀' * 4000 + maximum = c.call('POST', path, 201, actor=alice, schema='Message', + raw=json.dumps({'text': emoji}, ensure_ascii=True).encode(), + headers={'Content-Type': 'application/json', 'Idempotency-Key':uuid.uuid4().hex}) + check(maximum['json']['text'] == emoji, 'Лимит тела отверг/исказил 4000 Unicode-символов') + check(maximum['headers'].get('Cache-Control') == 'no-store', 'Ответ API может попасть в кэш') + check(maximum['headers'].get('X-Content-Type-Options') == 'nosniff', 'Нет nosniff') + + parsed = urlsplit(c.base) + check(parsed.scheme == 'http', 'Сетевые проверки этого Compose-сценария рассчитаны на localhost HTTP') + def wire(duplicate=False, chunked=False, slow=False, started=None): + connection = http.client.HTTPConnection(parsed.hostname, parsed.port, timeout=10) + try: + if chunked: + connection.request('POST', path, body=iter([b'{"text":"valid"}', b' ' * 40000, b' ' * 40000]), + headers={'Authorization': 'Bearer ' + alice['token'], + 'Content-Type': 'application/json'}, encode_chunked=True) + elif slow: + connection.putrequest('POST', path) + connection.putheader('Authorization', 'Bearer ' + alice['token']) + connection.putheader('Content-Type', 'application/json') + connection.putheader('Content-Length', '100') + connection.endheaders(b'{\"text\":') + started.set() + else: + connection.putrequest('GET', '/api/v1/users/me') + connection.putheader('Authorization', 'Bearer ' + alice['token']) + if duplicate: + connection.putheader('Authorization', 'Bearer ' + bob['token']) + connection.endheaders() + response = connection.getresponse() + data = json.loads(response.read()) + check(data['error']['request_id'] == response.getheader('X-Request-Id'), 'Сетевой запрос потерял request_id') + return response.status + finally: + connection.close() + check(wire(chunked=True) == 413, 'Chunked обходит лимит размера тела') + check(wire(duplicate=True) == 401, 'Два Authorization принимаются неоднозначно') + print('PASS: реальный chunked=413, два Authorization=401, no-store; 4000 emoji в escaped JSON допустимы') + started = threading.Event() + with ThreadPoolExecutor(max_workers=1) as pool: + pending = pool.submit(wire, slow=True, started=started) + check(started.wait(2), 'Не началась медленная передача') + health = c.call('GET', '/health/live', schema='Health') + check(health['elapsed'] < 2, 'Медленная передача заблокировала event loop') + check(pending.result(timeout=10) == 408, 'У медленной передачи нет deadline') + print('PASS: реальное незавершённое тело получает 408; health работает во время ожидания') + + + created = [chat] + for index in range(12): + created.append(c.call('POST', '/api/v1/chats', 201, actor=alice, schema='Chat', + body={'title': 'SQL-page-' + str(index), 'member_ids': [alice['id']]})['json']) + chats, cursor = [], None + while True: + url = '/api/v1/chats?limit=3' + ('&cursor=' + quote(cursor, safe='') if cursor else '') + page = c.call('GET', url, actor=alice, schema='ChatPage')['json'] + chats.extend(item['id'] for item in page['items']) + cursor = page['next_cursor'] + if cursor is None: + break + c.call('GET', '/api/v1/chats?cursor=' + quote(cursor, safe=''), 400, actor=bob) + check(len(chats) <= len(created), 'Зациклилась пагинация чатов') + check(chats == [item['id'] for item in sorted(created, key=lambda x: (x['created_at'], uuid.UUID(x['id']).int))], + 'SQL-пагинация чатов потеряла/повторила объекты') + bob_chats = c.call('GET', '/api/v1/chats', actor=bob, schema='ChatPage')['json'] + check([item['id'] for item in bob_chats['items']] == [chat['id']], 'В список попали чужие чаты') + print('PASS: SQL-пагинация 13 чатов по 3; курсор принадлежит пользователю, чужие чаты скрыты') + + profile_key = 'user:v1:' + alice['id'] + for raw in (b'\xff\xfe', b'null', b'{"id":123}'): + redis('SET', profile_key, raw=raw) + expect('Повреждённый профиль Redis', 'GET', '/api/v1/users/me', 200, actor=alice) + session_key = 'session:v1:' + hashlib.sha256(alice['token'].encode()).hexdigest() + saved = redis('GET', session_key) + ttl = int(redis('PTTL', session_key)) + for raw in (b'\xff', json.dumps({'user_id': 123, 'expires_at': '2099-01-01T00:00:00+00:00'}).encode(), + b'[]', b'null', json.dumps({'user_id': alice['id'], 'expires_at': '2020-01-01T00:00:00+00:00'}).encode()): + try: + redis('SET', session_key, raw=raw) + redis('PEXPIRE', session_key, str(ttl)) + expect('Повреждённая/истёкшая сессия Redis', 'GET', '/api/v1/users/me', 401, actor=alice) + finally: + redis('SET', session_key, raw=saved) + redis('PEXPIRE', session_key, str(ttl)) + c.call('GET', '/api/v1/users/me', actor=alice, schema='User') + + # NUL недопустим в PostgreSQL text, но пароль хранится как Argon2-хеш. + special = {**registration, 'username': 'nulpass_' + uuid.uuid4().hex[:16], + 'password': ' пароль:\x00с пробелами '} + c.call('POST', '/api/v1/users', 201, body=special, schema='User') + special_basic = 'Basic ' + base64.b64encode((special['username'] + ':' + special['password']).encode()).decode() + special_session = c.call('POST', '/api/v1/auth/sessions', 201, + headers={'Authorization': special_basic}, schema='Session')['json'] + c.call('DELETE', '/api/v1/auth/sessions/current', 204, actor={'token': special_session['token']}) + print('PASS: пароль с Unicode, пробелами, двоеточием и NUL не усекается') + + basic = 'Basic ' + base64.b64encode((alice['registration']['username'] + ':' + alice['registration']['password']).encode()).decode() + another = c.call('POST', '/api/v1/auth/sessions', 201, headers={'Authorization': basic}, schema='Session')['json'] + check(another['token'] != alice['token'], 'Повторный вход вернул старый токен') + def get_profile(_): + return Client(args.base_url, args.ca_file).call('GET', '/api/v1/users/me', actor=alice, schema='User') + with ThreadPoolExecutor(max_workers=8) as pool: + profiles = list(pool.map(get_profile, range(24))) + check(all(p['json']['id'] == alice['id'] for p in profiles), 'Смешаны пользователи конкурентных запросов') + check(len({p['headers']['X-Request-Id'] for p in profiles}) == 24, 'Повторяется request_id') + with ThreadPoolExecutor(max_workers=4) as pool: + list(pool.map(lambda _: Client(args.base_url, args.ca_file).call( + 'DELETE', '/api/v1/auth/sessions/current', [204, 401], actor=alice), range(4))) + c.call('GET', '/api/v1/users/me', 401, actor=alice) + c.call('GET', '/api/v1/users/me', actor={'token': another['token']}, schema='User') + c.call('GET', '/api/v1/users/me', actor=bob, schema='User') + c.call('DELETE', '/api/v1/auth/sessions/current', 204, actor={'token': another['token']}) + print('PASS: независимые токены, конкурентные logout/GET, уникальные request_id') + if failures: + for failure in failures: + print('FAIL:', failure) + check(False, 'Production-аудит нашёл ошибки: ' + str(len(failures))) + print('PASS: типы/диапазон курсора, Unicode, размер/формат JSON и повреждённый Redis') + + +if __name__ == '__main__': + run(main) diff --git a/tests/production_limits.py b/tests/production_limits.py new file mode 100644 index 00000000..94e9cdec --- /dev/null +++ b/tests/production_limits.py @@ -0,0 +1,137 @@ +"""Изолированные проверки ASGI-лимитов и реального пула Argon2 в образе API.""" +import asyncio +import errno +import json +import os +from pathlib import Path +from tempfile import TemporaryDirectory +import threading +import time +from unittest.mock import patch + +from src.core import security +from src.core.request_limits import RequestLimitsMiddleware +from src.core.settings import settings + + +def scope(path='/api/v1/users', headers=()): + return {'type': 'http', 'asgi': {'version': '3.0'}, 'http_version': '1.1', + 'method': 'POST', 'scheme': 'http', 'path': path, 'raw_path': path.encode(), + 'query_string': b'', 'headers': [(b'content-type', b'application/json'), *headers], + 'state': {'request_id': 'limit-test'}, 'server': ('localhost', 80), 'client': ('localhost', 1)} + + +async def invoke(app, messages=(), path='/api/v1/users', headers=(), delay=0): + sent = [] + pending = iter(messages or [{'type': 'http.request', 'body': b'{}', 'more_body': False}]) + async def receive(): + if delay: + await asyncio.sleep(delay) + return next(pending) + async def send(message): + sent.append(message) + await app(scope(path, headers), receive, send) + if not sent: + return None + status = next(m['status'] for m in sent if m['type'] == 'http.response.start') + data = json.loads(b''.join(m.get('body', b'') for m in sent if m['type'] == 'http.response.body')) + if status >= 400: + assert data['error']['request_id'] == 'limit-test' + return status, data + + +async def main(): + assert os.geteuid() != 0, 'API работает от root' + status = Path('/proc/self/status').read_text() + assert 'NoNewPrivs:\t1' in status + assert 'CapEff:\t0000000000000000' in status + probe = Path('/app/.production-write-probe') + try: + probe.write_text('probe') + except OSError as error: + assert error.errno == errno.EROFS, error.errno + else: + probe.unlink() + raise AssertionError('Корневая файловая система API доступна для записи') + with TemporaryDirectory() as directory: + Path(directory, 'probe').write_text('temporary') + print('PASS: non-root, read-only rootfs, пустые capabilities, no-new-privileges; /tmp доступен') + called = 0 + async def endpoint(scope, receive, send): + nonlocal called + called += 1 + message = await receive() + await send({'type': 'http.response.start', 'status': 200, 'headers': []}) + await send({'type': 'http.response.body', 'body': json.dumps({'bytes': len(message['body'])}).encode()}) + app = RequestLimitsMiddleware(endpoint) + maximum = settings.http_max_body_bytes + assert (await invoke(app, headers=[(b'content-length', str(maximum+1).encode())]))[0] == 413 + assert called == 0 + chunks = [{'type': 'http.request', 'body': b' ' * 40000, 'more_body': True}, + {'type': 'http.request', 'body': b' ' * 40000, 'more_body': False}] + assert (await invoke(app, messages=chunks))[0] == 413 + assert (await invoke(app, messages=chunks, headers=[(b'content-length', b'1')]))[0] == 413 + assert (await invoke(app, headers=[(b'content-length', b'-1')]))[0] == 400 + with patch.object(settings, 'http_body_timeout_seconds', 0.02): + assert (await invoke(app, delay=0.1))[0] == 408 + assert await invoke(app, messages=[{'type': 'http.disconnect'}]) is None + assert called == 0 + assert (await invoke(app))[0] == 200 + assert app.limiter.borrowed_tokens == 0 + print('PASS: Content-Length/chunked/ложный размер, timeout, disconnect; слот всегда освобождается') + + gate = asyncio.Event() + entered = asyncio.Event() + active = 0 + async def blocked(scope, receive, send): + nonlocal active + if scope['path'].startswith('/api/'): + active += 1 + if active == 2: + entered.set() + await gate.wait() + await endpoint(scope, receive, send) + with patch.object(settings, 'http_concurrency_limit', 2): + limited = RequestLimitsMiddleware(blocked) + tasks = [asyncio.create_task(invoke(limited)) for _ in range(2)] + try: + await asyncio.wait_for(entered.wait(), 1) + assert (await invoke(limited))[0] == 503 + assert (await invoke(limited, path='/health/live'))[0] == 200 + tasks[0].cancel() + await asyncio.gather(tasks[0], return_exceptions=True) + assert limited.limiter.borrowed_tokens == 1 + gate.set() + assert (await tasks[1])[0] == 200 + assert (await invoke(limited))[0] == 200 + finally: + gate.set() + for task in tasks: + task.cancel() + await asyncio.gather(*tasks, return_exceptions=True) + assert limited.limiter.borrowed_tokens == 0 + print('PASS: перегрузка=503 в общем JSON, health доступен, отмена запроса не теряет слот') + + lock = threading.Lock() + active = peak = 0 + def slow_hash(password): + nonlocal active, peak + with lock: + active += 1 + peak = max(peak, active) + try: + time.sleep(0.03) + return 'hashed-' + password + finally: + with lock: + active -= 1 + count = settings.password_hash_concurrency * 4 + with patch.object(security, 'hash_password', slow_hash): + result = await asyncio.gather(*(security.hash_password_async(str(i)) for i in range(count))) + assert result == ['hashed-' + str(i) for i in range(count)] + assert peak == settings.password_hash_concurrency, peak + assert security.password_limiter.borrowed_tokens == 0 + print('PASS: очередь Argon2 соблюдает лимит параллелизма; результаты не смешиваются') + + +asyncio.run(main()) diff --git a/tests/readiness.py b/tests/readiness.py new file mode 100644 index 00000000..177efc06 --- /dev/null +++ b/tests/readiness.py @@ -0,0 +1,53 @@ +"""Изолированная проверка HTTP-бюджета readiness при медленной отмене драйвера.""" + +import asyncio +import time +from unittest.mock import patch + +from src.core import readiness +from src.core.errors import ApiError +from src.core.settings import settings + + +async def main(): + cancelled = asyncio.Event() + release = asyncio.Event() + calls = 0 + + async def stalled_driver(): + nonlocal calls + calls += 1 + try: + await asyncio.Event().wait() + except asyncio.CancelledError: + cancelled.set() + await release.wait() + + with ( + patch.object(settings, "healthcheck_timeout_seconds", 0.03), + patch.object(readiness, "_probe", stalled_driver), + ): + for _ in range(3): + began = time.monotonic() + try: + await readiness.check() + except ApiError as error: + assert error.status_code == 503 + else: + raise AssertionError("Stalled dependency was declared ready") + assert time.monotonic() - began < 0.15, "HTTP waited for slow driver cancellation" + assert cancelled.is_set() and calls == 1, "Readiness spawned accumulating probes" + release.set() + await asyncio.sleep(0) + await readiness.close() + + async def healthy(): + pass + + with patch.object(readiness, "_probe", healthy): + await readiness.check() + await readiness.close() + print("PASS: bounded readiness response, one pending probe, recovery after cancellation") + + +asyncio.run(main()) diff --git a/tests/regressions.py b/tests/regressions.py new file mode 100644 index 00000000..d336a637 --- /dev/null +++ b/tests/regressions.py @@ -0,0 +1,163 @@ +"""Проверки замечаний преподавателя: HTTP, повреждённый Redis и точный курсор.""" +import base64 +import json +import subprocess +import uuid +from pathlib import Path +from urllib.parse import quote + +from client import Client, arguments, check, run + +ROOT = Path(__file__).resolve().parents[1] + + +def database(code): + container = subprocess.check_output(['docker', 'compose', 'ps', '-q', 'api'], cwd=ROOT, text=True).split()[0] + result = subprocess.run(['docker', 'exec', '-i', container, 'python'], + input=code, cwd=ROOT, text=True, capture_output=True, timeout=30) + check(result.returncode == 0, 'Ошибка подготовки/удаления ORM-фикстуры') + return json.loads(result.stdout) if result.stdout.strip() else None + + +def main(): + args = arguments('Регрессии по замечаниям преподавателя') + c = Client(args.base_url, args.ca_file) + alice, bob, eve, chat = c.bootstrap() + path = '/api/v1/chats/' + chat['id'] + '/messages' + registration = {**alice['registration'], 'username': 'blank_' + uuid.uuid4().hex[:16]} + for field, value in [('password', ' ' * 12), ('password', '\t\n' * 6), + ('display_name', ' \t\n')]: + c.call('POST', '/api/v1/users', 400, body={**registration, field: value}) + for body in ({'title': ' \t\n', 'member_ids': [alice['id']]}, + {'title': 'Duplicate', 'member_ids': [alice['id'], alice['id']]}, + {'title': 'Unknown', 'member_ids': [alice['id'], str(uuid.uuid4())]}, + {'title': 'Missing actor', 'member_ids': [bob['id']]}): + c.call('POST', '/api/v1/chats', 400, actor=alice, body=body) + basic = {'Authorization': 'Basic ' + base64.b64encode(( + alice['registration']['username'] + ':' + alice['registration']['password'] + ).encode()).decode()} + for raw in (b'{"extra":"forbidden"}', b'{}', b'null', b' ', b'{'): + c.call('POST', '/api/v1/auth/sessions', 400, headers=basic, raw=raw) + c.call('POST', '/api/v1/auth/sessions', 401) + for credential in ('Basic !!!', 'Basic /w==', 'Bearer something', + 'Basic ' + base64.b64encode(b'no-colon').decode()): + c.call('POST', '/api/v1/auth/sessions', 401, headers={'Authorization': credential}) + for payload in ('null', '[]', '{}', '123', '{broken'): + cursor = base64.urlsafe_b64encode(payload.encode()).decode().rstrip('=') + c.call('GET', path + '?cursor=' + quote(cursor, safe=''), 400, actor=alice) + for endpoint, body, actor in ( + ('/api/v1/users', registration, None), + ('/api/v1/chats', {'title': 'MIME', 'member_ids': [alice['id']]}, alice), + (path, {'text': 'valid'}, alice), + ): + response = c.call('POST', endpoint, 415, actor=actor, body=body, + headers={'Content-Type': 'text/plain'}) + check(response['json']['error']['code'] == 'unsupported_media_type', 'Неверный код MIME-ошибки') + for raw in (b'{"text":"valid"}}', b'{"text":"valid"}]', b'{"text":"valid"}{}'): + c.call('POST', path, 400, actor=alice, raw=raw, headers={'Content-Type': 'application/json'}) + for body in ({'text': ' ' * 12}, {'text': ' ' + 'a' * 4000}, {'text': 123}, + {'text': 'valid', 'sender_id': eve['id']}): + c.call('POST', path, 400, actor=alice, body=body) + check(c.call('GET', path, actor=alice, schema='MessagePage')['json']['items'] == [], + 'Отклонённый запрос сохранил сообщение') + print('PASS: обязательные пробельные строки, malformed JSON, типы/лишние поля, MIME 415, Basic без тела') + + # Создаём только синтетические строки через SQLAlchemy; пароли/токены в команды не передаются. + fixture = database(f''' +import asyncio, json +from datetime import datetime, timezone +from uuid import UUID, uuid4 +from sqlalchemy.ext.asyncio import async_sessionmaker +from src.core.db.session import create_engine +from src.core.db.models import User, Message +async def main(): + engine = create_engine() + ids = [uuid4() for _ in range(100)] + base = uuid4().int & ~65535 + message_ids = [UUID(int=base+4), UUID(int=base+3), UUID(int=base+2), UUID(int=base+1)] + times = [100000, 200000, 200000, 200000] + async with async_sessionmaker(engine).begin() as session: + session.add_all([User(id=i, username='fixture_' + i.hex[:20], display_name='Fixture', + password_hash='not-for-login', created_at=datetime.now(timezone.utc)) for i in ids]) + session.add_all([Message(id=i, chat_id=UUID('{chat['id']}'), sender_id=UUID('{alice['id']}'), + text='precision', created_at=datetime(2026, 1, 1, 0, 0, 0, us, timezone.utc)) + for i, us in zip(message_ids, times)]) + await engine.dispose() + print(json.dumps({{'users': [str(i) for i in ids], 'messages': [str(i) for i in message_ids]}})) +asyncio.run(main()) +''') + try: + c.call('POST', '/api/v1/chats', 400, actor=alice, + body={'title': '101 участников', 'member_ids': [alice['id'], *fixture['users']]}) + hundred = c.call('POST', '/api/v1/chats', 201, actor=alice, schema='Chat', + body={'title': '100 участников', + 'member_ids': [alice['id'], *fixture['users'][:99]]})['json'] + check(len(hundred['member_ids']) == 100, 'Допустимые 100 участников не сохранены') + received = [] + cursor = None + while True: + url = path + '?limit=1' + ('&cursor=' + quote(cursor, safe='') if cursor else '') + page = c.call('GET', url, actor=bob, schema='MessagePage')['json'] + received.extend(item['id'] for item in page['items']) + if cursor is None: + first_cursor = page['next_cursor'] + cursor = page['next_cursor'] + if cursor is None: + break + check(len(received) <= 4, 'Курсор зациклился') + expected = [fixture['messages'][0], *reversed(fixture['messages'][1:])] + check(received == expected, 'Потеря/повтор сообщений при микросекундах или равном времени') + other = c.call('POST', '/api/v1/chats', 201, actor=alice, + body={'title': 'Other', 'member_ids': [alice['id']]}, schema='Chat')['json'] + c.call('GET', '/api/v1/chats/' + other['id'] + '/messages?cursor=' + quote(first_cursor, safe=''), + 400, actor=alice) + print('PASS: 101 существующий участник отклонён; курсор сохраняет микросекунды и UUID-порядок, привязан к чату') + finally: + database(f''' +import asyncio +from uuid import UUID +from sqlalchemy import delete, select +from sqlalchemy.ext.asyncio import async_sessionmaker +from src.core.db.session import create_engine +from src.core.db.models import User, Chat, ChatMember, Message +async def main(): + engine = create_engine() + ids = [UUID(i) for i in {fixture['users']!r}] + async with async_sessionmaker(engine).begin() as session: + chats = list(await session.scalars(select(ChatMember.chat_id).where(ChatMember.user_id.in_(ids)))) + await session.execute(delete(Message).where(Message.chat_id.in_(chats))) + await session.execute(delete(Chat).where(Chat.id.in_(chats))) + await session.execute(delete(User).where(User.id.in_(ids))) + await engine.dispose() +asyncio.run(main()) +''') + text = ' строка\nс пробелами ' + saved = c.message(alice, chat, text)['json'] + check(saved['text'] == text, 'Текст обрезан до сохранения') + history = c.call('GET', path, actor=alice, schema='MessagePage')['json'] + check(next(m for m in history['items'] if m['id'] == saved['id'])['text'] == text, + 'Сохранённый текст изменён') + print('PASS: исходный текст и его длина сохраняются без strip') + + key = 'user:v1:' + alice['id'] + def redis(*args): + return subprocess.check_output(['docker', 'compose', 'exec', '-T', 'redis', + 'redis-cli', '--raw', *args], cwd=ROOT, text=True, timeout=10).strip() + for corrupted in ('null', '[]', '{}', '{broken', '"text"', '{"id":123}', + json.dumps({**alice['user'], 'id': bob['id']})): + redis('SET', key, corrupted) + me = c.call('GET', '/api/v1/users/me', actor=alice, schema='User')['json'] + check(me == alice['user'], 'Повреждённый профиль отвергает сессию или меняет пользователя') + check(json.loads(redis('GET', key))['id'] == alice['id'], 'Повреждённый кэш не заменён') + check(0 < int(redis('TTL', key)) <= 60, 'Восстановленному профилю не назначен TTL') + print('PASS: null/повреждённый/чужой профиль заменяется из PostgreSQL с TTL; сессия работает') + + spec = json.loads(c.call('GET', '/openapi.json')['bytes']) + login = spec['paths']['/api/v1/auth/sessions']['post'] + check('requestBody' not in login and {'basicAuth': []} in login['security'], 'Swagger вход не Basic') + check({'bearerAuth': []} in spec['paths']['/api/v1/users/me']['get']['security'], 'Swagger не передаёт Bearer') + print('PASS: Swagger объявляет Basic для входа и Bearer для защищённых методов') + + +if __name__ == '__main__': + run(main) diff --git a/tests/settings.py b/tests/settings.py new file mode 100644 index 00000000..fbe60761 --- /dev/null +++ b/tests/settings.py @@ -0,0 +1,53 @@ +"""docker compose exec -T api python < tests/settings.py.""" +import os +from pathlib import Path +from tempfile import TemporaryDirectory +from unittest.mock import patch + +from pydantic import ValidationError + +from src.core.settings import AppSettings + +# Только искусственные значения, соединения с этими адресами не открываются. +with patch.dict(os.environ, { + 'DATABASE_URL': 'postgresql://settings_user:settings_test_password@postgres/settings_db', + 'REDIS_URL': 'redis://redis:6379/0', +}, clear=True): + with TemporaryDirectory() as directory: + path = Path(directory) / '.env' + path.write_text('SESSION_TTL_SECONDS=2\nDATABASE_POOL_SIZE=3\n', encoding='utf-8') + config = AppSettings(_env_file=path) + assert config.session_ttl_seconds == 2 + assert config.database_pool_size == 3 + assert config.sqlalchemy_database_url.startswith('postgresql+asyncpg://') + assert 'settings_test_password' not in repr(config) + with patch.dict(os.environ, {'SESSION_TTL_SECONDS': '4'}): + assert AppSettings(_env_file=path).session_ttl_seconds == 4 + print('PASS: AppSettings читает .env, окружение имеет приоритет, URL скрыт в repr') + + for values, expected_field in ( + ({'session_ttl_seconds': 0}, 'session_ttl_seconds'), + ({'session_ttl_seconds': 'invalid'}, 'session_ttl_seconds'), + ({'database_pool_size': 0}, 'database_pool_size'), + ({'redis_read_timeout_seconds': -1}, 'redis_read_timeout_seconds'), + ({'session_token_bytes': 16}, 'session_token_bytes'), + ): + try: + AppSettings(_env_file=None, **values) + except ValidationError as error: + assert any(item['loc'] == (expected_field,) for item in error.errors()) + else: + raise AssertionError('Некорректная настройка принята: ' + expected_field) + print('PASS: Pydantic отклоняет неверные TTL, pool, timeout и недостаточную длину токена') + for values in ({'app_env': 'production'}, {'admin_password': ' ' * 12}, + {'admin_display_name': 'bad\x00'}): + try: + AppSettings(_env_file=None, **values) + except ValidationError as error: + assert 'settings_test_password' not in str(error) + assert 'input_value' not in str(error) + else: + raise AssertionError('Небезопасная конфигурация принята') + assert AppSettings(_env_file=None, app_env='production', + admin_password='custom-production-password-123').app_env == 'production' + print('PASS: production отвергает учебный пароль; ошибки конфигурации скрывают входные значения')