For Mod based Stateful load balancing we Load balancer use formula **ReqID % [number of Machines] ** to figure out the machine
Drawback of this approach is If we have change in number of machines(Addition or removal of machine). We have to change the** number of machines **in formula. To overcome this, we are using Consistent hashing based Load Balancing Algo.
My Question is : Can we solve this problem to make some way reading [number of Machines] dynamically. I mean if any machine is being added or removed, Can we automatically set value of [number of Machines] on number of machine change event.
I did not see any where this approach discussed
I want to know whether we can automatically set value of [number of Machines] on number of machine change event or we have further challenges or tradeoff in doing that..