Increase rate limiting for startup bursts

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.
This commit is contained in:
rcourtman 2025-11-13 15:42:26 +00:00
parent cd9d63d464
commit ea80a6153c

View file

@ -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)
)