ЛР5 БВТ2304 Запорожец на 5

RabbitMQ (quorum queue, publisher confirms, manual ack, DLX) + отдельный worker:
staging в S3 + вложение/job/outbox одной транзакцией -> 202 queued; relay outbox,
lease с heartbeat и fencing (worker_id, attempt), retry с backoff+jitter, failed-реестр,
безопасный replay с audit; thumbnail/crop/WebP в изолированном процессе с лимитами.
Тесты окон отказа (fault injection), трек 1 «Очередь под перегрузкой» с backpressure.
Перенесено исправление замечания lab3 PR #99 (U+0000 в тексте).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 18:33:52 +03:00
co-authored by Claude Opus 5.5
parent 276dbdad8a
commit 0a221b0675
100 changed files with 12431 additions and 17 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env python3
"""Один вход (одна сессия) -> 10 запросов через LB: какие реплики обслужили. Токен не печатается."""
import os
import sys
from collections import Counter
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests'))
from client import Client # noqa: E402
c = Client(os.environ.get('BASE_URL', 'http://lb:8080'))
alice = c.user('instances')
served = [c.call('GET', '/api/v1/users/me', actor=alice, schema='User')['headers']['X-Instance-Id'] for _ in range(10)]
print('X-Instance-Id sequence:', ' '.join(served))
print('distinct replicas for one session without re-login:', dict(Counter(served)))