mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-10-11 05:27:47 +00:00
fix(api): report the real keepalive interval in pool health
The /api/connection-pool/health endpoint hardcoded a keepalive interval of 15s while the pool actually uses 45s, so it reported a false value. The endpoint now reads the live keepAliveInterval field. A startup backoff comment that claimed jitter is also corrected; the backoff has no jitter.
This commit is contained in:
@@ -573,7 +573,7 @@ func apiConnectionPoolHealth(c fiber.Ctx) error {
|
||||
"connection_failures": connectionFailures,
|
||||
"last_recovery_attempt": stats["last_recovery_attempt"],
|
||||
"cleanup_interval": "30s",
|
||||
"keepalive_interval": "15s",
|
||||
"keepalive_interval": poolMgr.keepAliveInterval.String(),
|
||||
"recovery_check_interval": "60s",
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ func (bhm *BackendHealthManager) WaitForBackendReady(timeout time.Duration) erro
|
||||
})
|
||||
}
|
||||
|
||||
// Exponential backoff with jitter
|
||||
// Exponential backoff (1.5x growth, capped at maxDelay), no jitter
|
||||
time.Sleep(currentDelay)
|
||||
currentDelay = time.Duration(float64(currentDelay) * 1.5)
|
||||
if currentDelay > maxDelay {
|
||||
|
||||
Reference in New Issue
Block a user