feat(cluster): add swim gossip protocol - #32
Merged
Merged
Conversation
implements binary encoding/decoding for SWIM gossip protocol messages: - GossipMessage enum: Ping, PingReq, Ack, Join, Welcome - NodeUpdate enum: Alive, Suspect, Dead, Left (piggybacked state) - MemberInfo struct for cluster membership data - compact binary format with little-endian integers - supports both ipv4 and ipv6 addresses includes roundtrip tests for all message types.
implements the core gossip protocol for failure detection: - GossipConfig: protocol timing and tuning parameters - GossipEngine: manages membership and failure detection - MemberState/MemberStatus: per-node health tracking - GossipEvent: events for member join/suspect/fail/leave protocol features: - periodic random probing (tick) - probe timeout -> suspect transition - suspicion timeout -> dead transition - incarnation numbers for refuting false suspicions - piggyback state updates on all messages includes tests for engine lifecycle and message handling.
kacy
force-pushed
the
feat/cluster-gossip
branch
from
February 6, 2026 13:04
4c224b5 to
13bc2fa
Compare
kacy
added a commit
that referenced
this pull request
Feb 11, 2026
feat(cluster): add swim gossip protocol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
implements the swim gossip protocol for cluster membership and failure detection (phase 4, week 11):
message.rs: binary wire format for gossip messages
gossip.rs: swim protocol engine
what was tested
cargo clippy -- -D warningspassescargo test --workspaceall 216 tests passdesign considerations