forked from mtusi2026/mtusi2026lab3
ЛР 3: HAProxy + 2 реплики, общая идемпотентность, rolling update
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0ab3a341aa
commit
a71c582195
@@ -0,0 +1,28 @@
|
||||
Container mtusi-lab3-redis-1 Stopping
|
||||
Container mtusi-lab3-redis-1 Stopped
|
||||
Container mtusi-lab3-redis-1 Starting
|
||||
Container mtusi-lab3-redis-1 Started
|
||||
Container mtusi-lab3-postgres-1 Stopping
|
||||
Container mtusi-lab3-postgres-1 Stopped
|
||||
Container mtusi-lab3-postgres-1 Starting
|
||||
Container mtusi-lab3-postgres-1 Started
|
||||
== 1. Redis недоступен ==
|
||||
$ docker compose --env-file .env stop redis
|
||||
ok - valid token still works without Redis (cache bypassed)
|
||||
ok - writes still work without Redis
|
||||
ok - login works without Redis
|
||||
ok - forged token still rejected without Redis
|
||||
$ docker compose --env-file .env start redis
|
||||
== 2. PostgreSQL недоступен ==
|
||||
$ docker compose --env-file .env stop postgres
|
||||
ok - history without DB -> 503, not a hang (got 503)
|
||||
ok - unknown token is never trusted without DB (got 503)
|
||||
ok - anonymous request -> 401
|
||||
ok - /health/ready -> 503
|
||||
ok - /health/live -> 200 (process is alive)
|
||||
$ docker compose --env-file .env start postgres
|
||||
== 3. восстановление ==
|
||||
ok - /health/ready back to 200
|
||||
ok - same token reads the same history after DB is back
|
||||
|
||||
11 passed, 0 failed
|
||||
Reference in New Issue
Block a user