From 85626b154405a2849d60393c9f85e56300f59466 Mon Sep 17 00:00:00 2001 From: Santiago Botto Date: Tue, 17 Mar 2026 14:23:09 -0300 Subject: [PATCH] fix: skip health checks for rate-limited endpoints --- internal/health/checker.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/health/checker.go b/internal/health/checker.go index 95709af..bbd29bc 100644 --- a/internal/health/checker.go +++ b/internal/health/checker.go @@ -350,6 +350,13 @@ func (c *Checker) checkAllEndpointsAndWait(ctx context.Context, isInitial bool) // checkEndpoint checks the health of a single endpoint func (c *Checker) checkEndpoint(ctx context.Context, chain, endpointID string, endpoint config.Endpoint) { + // Skip health checks for rate-limited endpoints to avoid burning their quota + rateLimitState, err := c.valkeyClient.GetRateLimitState(ctx, chain, endpointID) + if err == nil && rateLimitState.RateLimited { + log.Debug().Str("chain", chain).Str("endpoint_id", endpointID).Msg("Skipping health check for rate-limited endpoint") + return + } + status := store.NewEndpointStatus() status.LastHealthCheck = time.Now()