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:
@@ -38,8 +38,9 @@ change `replicas-lb` ещё нет:
|
||||
Худшее обнаружение зависшей реплики — 6,5 с вместо 8 с, вернувшаяся
|
||||
реплика включается быстрее;
|
||||
- uvicorn: `timeout_keep_alive` из новой настройки
|
||||
`[app] keep_alive_seconds` (60 с) вместо неявных 5 с. Простаивающее
|
||||
соединение LB → реплика закрывает LB, а не реплика;
|
||||
`[app] keep_alive_seconds` (60 с) вместо неявных 5 с, HAProxy:
|
||||
`http-reuse never`. Простаивающее соединение LB → реплика живёт не
|
||||
дольше сеанса клиента (10 с) и закрывает его LB, а не реплика;
|
||||
- PostgreSQL: `idle_in_transaction_session_timeout` на соединениях
|
||||
приложения из новой настройки `[database]
|
||||
idle_in_transaction_timeout_ms` (10 с). Транзакция замороженной
|
||||
|
||||
Reference in New Issue
Block a user