Agent-Hellboy / Agent-Hellboy/mcp-runtime

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

Abierto
#304 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
6
Forks
1
Merge medio
11 h 33 min
PR fusionados (30 d)
13

Descripción

## 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`

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.