Agent-Hellboy / Agent-Hellboy/mcp-runtime

fix(mcp-gateway): add jitter to policy reload ticker to prevent thundering herd

Ouverte
#304 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
6
Forks
1
Merge moyen
11 h 33 min
PR mergées (30 j)
13

Description

## Problem
All gateway replicas start a `time.NewTicker(5 * time.Second)` at process start. With many MCPServer pods they all hit the Kubernetes ConfigMap API at the same wall-clock tick, creating a thundering herd every 5 seconds.

## Fix
Add up to 2s of random jitter to the ticker interval in `policy_cache.go`:

```go
jitter := time.Duration(rand.N(2000)) * time.Millisecond
ticker := time.NewTicker(5*time.Second + jitter)
```

## Files
- `services/mcp-gateway/policy_cache.go`

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.