hashicorp / hashicorp/memberlist
Could it broadcast messages to every node?
- Dominant language
- Go
- Stars
- 4.1k
- Forks
- 478
- Avg merge
- 15h 58m
- Merged PRs (30d)
- 3
Description
From the code of [0] and [1]. The memberlist broadcast mechanism can't definitely guarantee that a message could be sent to every node of the cluster even set [3] greater than the number of nodes. From the comments of the util `kRandomNodes`, eventually `len(kNodes)` could be less than `k` nodes even k is (much )less than n, owe to choosing random node every loop without excluding chosen ones.
So if I'm right, is there any method to broadcast messages to every node in the cluster?
[0] https://github.com/hashicorp/memberlist/blob/3d8438da9589e7b608a83ffac1ef8211486bcb7c/state.go#L485-L500
[1] https://github.com/hashicorp/memberlist/blob/3d8438da9589e7b608a83ffac1ef8211486bcb7c/util.go#L126-L154
[2] https://github.com/hashicorp/memberlist/blob/3d8438da9589e7b608a83ffac1ef8211486bcb7c/config.go#L141
Contributor guide
Research direction
Start with the linked sections of state.go and util.go, then review the related configuration in config.go, including kRandomNodes. Determine whether the current broadcast mechanism can guarantee delivery to every cluster node and what change or documented method the issue would require. Done means the approach and its delivery guarantees are clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100