feat: periodic polling of cluster status instead of every nodes heartbeat

This commit is contained in:
2025-10-26 11:58:09 +01:00
parent 8aa8b908e6
commit c4b1a2d853
2 changed files with 112 additions and 26 deletions

View File

@@ -57,7 +57,7 @@ func NewNodeDiscovery(udpPort string) *NodeDiscovery {
return &NodeDiscovery{
udpPort: udpPort,
discoveredNodes: make(map[string]*NodeInfo),
staleThreshold: 10 * time.Second, // TODO make configurable
staleThreshold: 10 * time.Second, // Heartbeat timeout - mark nodes inactive after 10 seconds
logger: log.New(),
}
}