Details
-
Task
-
Resolution: Done
-
Major
-
None
-
None
Description
Discovery.max_rank was originally meant to reduce traffic in the discovery phase: rather than 100 members replying to a discovery request, only the coordinators (max_rank=1) would reply and this would be enough for a joiner to find the coordinator and send it a JOIN request.
However, discovery responses also contain additional information, such as the logical name (if set) and the physical address of a member. This is needed by all members of a cluster, and so everyone should return this information to a new joiner.
Therefore, when we set a max_rank, we also need to set return_entire_cache=true (this is done automatically by ergonomics) !
Seen under this aspect, max_rank is useless and even conter-productive !
If we have 100 members:
- max_rank=0: we get 100 discovery responses (1 response from each member)
- max_rank=1 (sets return_entire_cache to true): the coordinator returns the entire cache to the joiner (1 unicast / cache entry: 100 unicasts)
- max_rank=2: the coordinator plus the next in line return the entire cache: 200 unicasts
- and so on
The current problem is that ergonomics sets return_entire_cache which - in conjunction with max_rank > 0 - generates even more discovery responses than is max_rank is 0 !