Prove per-replica failover and rolling replacement under load

This commit is contained in:
Самохвалов Андрей Ремович
2026-10-02 13:03:54 +03:00
parent a2021b4e25
commit 23ed63f593
11 changed files with 429 additions and 4 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ cd "$(dirname "$0")/.."
for container in $(docker compose --env-file .env ps -q api); do
instance=$(docker exec "$container" python -c "import urllib.request; print(urllib.request.urlopen('http://127.0.0.1:8080/health/live', timeout=2).headers['X-Instance-Id'])")
if [ "$instance" = "$TARGET_INSTANCE_ID" ]; then
docker stop -t 5 "$container" >/dev/null
docker stop -t 10 "$container" >/dev/null
exit 0
fi
done