Fixes for mandatory level 3: 1. Reduce nginx proxy_connect_timeout to 1s for faster failover detection - Prevents 499 errors during failover (client timeout < connect timeout) 2. Set executable permissions on scripts (git update-index --chmod=+x) - restart.sh, stop-one.sh now 100755 3. Fix REPORT.md errors: - Correct test command: make test-failover (not py -3 tests\failover.py) - Fix health check explanation (nginx uses timeouts, not Docker healthcheck) - Fix line numbers: INSTANCE_ID=39, X-Instance-Id=88, message()=321 - Add note about nginx warmup period (~10s after startup) Additions for level 4: 4. Add scripts/measure-failover.sh - measure RPS, errors, recovery time - Sequential testing of api-1 and api-2 stops - Baseline, failover, and recovery measurements 5. Add scripts/rolling-update.sh - demonstrate rolling update under load - Generates load for 60s while updating replicas sequentially - Measures errors during rolling update 6. Update REPORT.md with sections 10-11 for level 4 requirements All changes address reviewer feedback and ensure tests pass consistently. Co-Authored-By: Claude <noreply@anthropic.com>
22 lines
636 B
Bash
Executable File
22 lines
636 B
Bash
Executable File
#!/bin/bash
|
|
# Скрипт перезапуска всего стенда с сохранением volumes.
|
|
|
|
set -e
|
|
|
|
echo "Останавливаем все контейнеры стенда..."
|
|
docker compose down
|
|
|
|
echo "Запускаем стенд заново..."
|
|
docker compose up -d --build
|
|
|
|
echo "Ожидаем готовности сервисов..."
|
|
sleep 10
|
|
|
|
echo "Проверяем статус контейнеров..."
|
|
docker compose ps
|
|
|
|
echo "Проверяем health check..."
|
|
curl -f http://localhost:8080/health/ready || echo "API ещё не готов"
|
|
|
|
echo "Стенд успешно перезапущен"
|