Repository navigation
redis: optional health probe that reflects whether Redis answers - #1300
Merged
Merged
Conversation
nacx
force-pushed
the
pr/i-redis-health-probe
branch
2 times, most recently
from
November 9, 2026 22:05
0d50672 to
3416648
Compare
psbrar99
previously approved these changes
Nov 9, 2026
The health check does not touch Redis after startup. REDIS_HEALTH_CHECK_ACTIVE_CONNECTION only fails once every pooled connection has been closed, so while every connection is stuck on a Redis that stopped answering, pods stay healthy and keep receiving traffic. Add REDIS_HEALTH_CHECK_PING_INTERVAL (off by default): each Redis client PINGs Redis at that interval through the same path as rate limit calls, bounded by the I/O timeout capped to the interval, and fails a new health component (redis_ping / redis_per_second_ping) after REDIS_HEALTH_CHECK_FAILURE_THRESHOLD (default 3) consecutive failures, recovering after one success. The components are separate from "redis" so they do not interfere with REDIS_HEALTH_CHECK_ACTIVE_CONNECTION. HealthChecker gets AddComponent to register them. The README recommends using it for readiness only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ignasi Barrera <ignasi@tetrate.io>
The Redis health probe failed /healthcheck, which deployments commonly use for liveness as well as readiness: Envoy Gateway points its startup, readiness and liveness probes at /healthcheck, and lets users set the rate limit container's environment. Enabling the probe there would restart every replica during a Redis outage, which cannot fix Redis and, through CrashLoopBackOff, delays recovery once Redis is back. Register the probe's components as readiness components, which only affect a new /ready endpoint. /ready is healthy when everything /healthcheck covers is healthy and the Redis probes pass. /healthcheck and the gRPC health service are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ignasi Barrera <ignasi@tetrate.io>
nacx
force-pushed
the
pr/i-redis-health-probe
branch
from
November 9, 2026 22:23
3416648 to
280259b
Compare
psbrar99
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The health check does not touch Redis after startup. REDIS_HEALTH_CHECK_ACTIVE_CONNECTION only fails once every pooled connection has been closed, so while every connection is stuck on a Redis that stopped answering, pods stay healthy and keep receiving traffic.
Add REDIS_HEALTH_CHECK_PING_INTERVAL (off by default): each Redis client PINGs Redis at that interval through the same path as rate limit calls, bounded by the I/O timeout capped to the interval, and fails a new health component (redis_ping / redis_per_second_ping) after REDIS_HEALTH_CHECK_FAILURE_THRESHOLD (default 3) consecutive failures, recovering after one success. The components are separate from "redis" so they do not interfere with REDIS_HEALTH_CHECK_ACTIVE_CONNECTION. HealthChecker gets AddComponent to register them.
The README recommends using it for readiness only.