forked from mtusi2026/mtusi2026lab3
1.0 KiB
1.0 KiB
Readiness gate and Compose limits — 2026-11-05
Command:
python -B student_tests/readiness_gate.py --base-url http://localhost:8080
Observed result:
PASS: 2 unhealthy API containers refused business traffic with 503 and recovered after schema restoration
table_state=true|false
The test temporarily renamed message_idempotency, waited until both Docker
API health states became unhealthy, and verified JSON 503 from both
/health/ready and authenticated /api/v1/users/me through Nginx. Its
finally block restored the table. Both API containers then became healthy,
and readiness/business requests returned 200.
Applied docker inspect values:
| Service | NanoCpus | Memory bytes |
|---|---|---|
| PostgreSQL | 1,000,000,000 | 805,306,368 |
| Redis | 250,000,000 | 268,435,456 |
| API (each) | 750,000,000 | 805,306,368 |
| Nginx | 250,000,000 | 134,217,728 |
The one-shot Compose migration service is configured with 0.75 CPU and 768 MiB. The Swarm migration job uses the same explicit limits.