Files
traefik-llmgateway/shared_state_wire.go
T
lukaszraczylo a46058694b feat(failover): share the request breaker through Redis
The request breaker now also reads and writes the fleet breaker when redis.sharedState is on. A pod that sees enough failures opens the breaker for every pod after one refresh. A success on any pod closes it again. With the switch off, the tracker runs its local code only and makes no store call.
2026-11-26 03:26:39 +00:00

14 lines
498 B
Go

package traefikllmgateway
// wireSharedState layers fleet-wide state over the local trackers. It is a no-op without a shared-state loop.
func (g *Gateway) wireSharedState(cfg *Config) {
if g.sharedState == nil {
return
}
ids := sharedStateIDs(cfg)
if g.failoverHealth != nil {
g.failoverHealth.share(newSharedBreaker(g.sharedState, sharedKindRequest, ids,
requestBreakerFailureThreshold, requestBreakerOpenDuration, requestBreakerMaxOpenDuration, 2*requestBreakerMaxOpenDuration))
}
}