feat: coordinate timeout chain and add failover load profile
HAProxy checks get fastinter 500ms and timeout check 2.5s (hung replica detected within 6.5 s), http-reuse never with uvicorn keep-alive 60 s so the LB closes idle replica connections, and app connections set idle_in_transaction_session_timeout so a frozen replica releases its idempotency key. The bench stand runs behind HAProxy with N replicas and gains the failover profile (make bench_failover / bench_failover_quick): constant-rate writes with a key and reads while each replica is stopped, killed or paused, with per-second timeline, detection and recovery time and write reconciliation. Driver commands idle-conns and hang-key check the keep-alive and hung-transaction decisions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -222,6 +222,22 @@ bench_restore:
|
||||
bench_restore_quick:
|
||||
$(KEEP_AWAKE) uv run python bench/run.py --profile restore_quick --label quick-restore-$(shell date -u +%Y%m%dT%H%M%SZ)
|
||||
|
||||
FAILOVER_LABEL ?= baseline
|
||||
|
||||
# уровень 4: отказ реплик под нагрузкой на стенде mtusi-bench (HAProxy, две
|
||||
# реплики с лимитами рабочего стенда): 100 записей с ключом и 100 чтений в
|
||||
# секунду, каждая реплика в режимах stop, kill и pause с возвратом,
|
||||
# посекундная шкала, время обнаружения и восстановления, сверка записей;
|
||||
# ~10 мин; результат — evidence/failover/$(FAILOVER_LABEL)/
|
||||
.PHONY: bench_failover
|
||||
bench_failover:
|
||||
$(KEEP_AWAKE) uv run python bench/run.py --profile failover --label $(FAILOVER_LABEL)
|
||||
|
||||
# то же короче, режимы stop и kill (самопроверка), ~3 мин; в git не идёт
|
||||
.PHONY: bench_failover_quick
|
||||
bench_failover_quick:
|
||||
$(KEEP_AWAKE) uv run python bench/run.py --profile failover_quick --label quick-failover-$(shell date -u +%Y%m%dT%H%M%SZ)
|
||||
|
||||
# дельта двух меток по ячейкам матрицы: BEFORE и AFTER обязательны, AA —
|
||||
# метка того же кода, что BEFORE, для уровня шума; результат —
|
||||
# evidence/compare/$(BEFORE)__$(AFTER).md
|
||||
|
||||
Reference in New Issue
Block a user