libring icon indicating copy to clipboard operation
libring copied to clipboard

enable configurable default node weight instead of hardcoded 128

Open velimir opened this issue 4 months ago • 0 comments

Previously, managed hash rings always used a hardcoded weight of 128 for all nodes, preventing operators from tuning the ring's distribution characteristics. The number of virtual nodes (weight) affects distribution smoothness - higher weights create smoother distribution, while lower weights may create less uniform distribution.

This change allows operators to configure a custom default weight via node_weight, enabling them to optimize for their specific requirement.

The configured node_weight applies consistently to all nodes added without explicit weights: initial configuration nodes, automatically monitored nodes, and nodes added via the API without specifying a weight.

Backward compatibility is maintained - node_weight defaults to 128 when not specified.

velimir avatar Aug 28 '25 16:08 velimir