Repository navigation
Conversation
…ected REDIS_POOL_ON_EMPTY_BEHAVIOR=ERROR and the Redis pool metrics landed separately; count commands rejected because the pool has no connection in cmd_rejected, as is done for REDIS_MAX_INFLIGHT. Also check in the end-to-end outage test that no rate limit call is left in flight. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ignasi Barrera <ignasi@tetrate.io>
Document how ratelimit behaves when Redis fails over or stops answering, the layers that bound the impact (request deadline, I/O timeout, TCP_USER_TIMEOUT, health probe), recommended settings for a Redis with failover, how to size the I/O timeout against the client's own timeout, and which metrics to alert on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Ignasi Barrera <ignasi@tetrate.io>
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.
This PR has two commits.
1. Count
REDIS_POOL_ON_EMPTY_BEHAVIOR=ERRORrejections incmd_rejectedREDIS_POOL_ON_EMPTY_BEHAVIOR=ERRORand the Redis pool metrics were added separately. As a result,cmd_rejectedcounts commands rejected byREDIS_MAX_INFLIGHT, but not commands rejected because the pool has no connection. Those are counted incmd_errorinstead. This commit counts both incmd_rejectedand updates its README entry.It also extends the end-to-end outage test to check that no rate limit call is left in flight (
call.should_rate_limit.inflightreturns to 0).2. Docs: Redis failover and unresponsive Redis
A new README section, "Redis failover and unresponsive Redis", describes how ratelimit behaves when Redis stops answering without closing its connections, for example after a failover that keeps the server's IP:
TCP_USER_TIMEOUT, and readiness via the Redis health probe on/ready, with liveness staying on/healthcheck.timeout).Testing
go test -race ./...passes.🤖 Generated with Claude Code