From ea80a6153c5ca5e5fa7025e45846bff0dd6a7f26 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Thu, 13 Nov 2025 15:42:26 +0000 Subject: [PATCH] Increase rate limiting for startup bursts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increased default rate limits to handle Pulse startup polling: - Per-peer burst: 5 → 10 requests (handles multi-node clusters with retries) - Per-peer interval: 1s → 500ms (1 QPS → 2 QPS, 60/min → 120/min) This prevents the proxy from being disabled during Pulse startup when it polls all nodes simultaneously. The previous limits were too restrictive for clusters with 3+ nodes. --- cmd/pulse-sensor-proxy/throttle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/pulse-sensor-proxy/throttle.go b/cmd/pulse-sensor-proxy/throttle.go index 11c6912..8d39d73 100644 --- a/cmd/pulse-sensor-proxy/throttle.go +++ b/cmd/pulse-sensor-proxy/throttle.go @@ -50,13 +50,13 @@ type rateLimiter struct { } const ( - defaultPerPeerBurst = 5 // Allow burst of 5 requests for multi-node polling + defaultPerPeerBurst = 10 // Allow burst of 10 requests for multi-node polling with retries defaultPerPeerConcurrency = 2 defaultGlobalConcurrency = 8 ) var ( - defaultPerPeerRateInterval = 1 * time.Second // 1 qps (60/min) - supports 5-10 node deployments + defaultPerPeerRateInterval = 500 * time.Millisecond // 2 qps (120/min) - supports larger deployments defaultPenaltyDuration = 2 * time.Second defaultPerPeerLimit = rate.Every(defaultPerPeerRateInterval) )