Distributed Heartbeat Monitor
A zero-dependency distributed node failure detector implemented over UDP with probabilistic ping-req gossip.
Status: wip
GoUDPGossip ProtocolDocker
Motivation
In distributed clusters, node failure detection via centralized polling introduces single points of failure and quadratic network overhead $O(N^2)$. This experiment implements a SWIM-inspired gossip failure detector in Go.Protocol Mechanics
- Direct Ping: A node randomly selects a peer and sends a
PINGover UDP every $T$ interval. - Indirect Ping-Req: If no
ACKis received within timeout, the node requests $k$ random peers to ping the target. - Suspicion Period: Nodes enter a suspicious state before being marked dead, giving transient network partitions time to recover.
type Member struct {
Addr net.UDPAddr
State NodeState
Incarnation uint32
}