-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load Balancer not refreshing newly added nodes. #716
Comments
@OlegDokuka Please add this feature of adding new endpoint at Runtime to the LoadBalancer Feature. |
I'm not quite understand what is the exacted behavior. |
Sure @OlegDokuka. Once I start a LoadBalancer with Suppliers, based on load if I bring up a new node to participate with this LoadBalancer; there is no way to add to the LoadBalancer. Even if I add to the underlying Flux it is not refreshing. So I have to always create a new LoadBalancedRSocketMono inorder to use the new node to load balance. |
Yeah. This is a bug. So it is not a future but rather a bug so it should be fixed |
Hey @pckeyan! We have a reworked loadbalancer and now you can choose between strategies used for loadbalancing. To try the new Loadbalance API please see the following example For more information about Weighted Loadbalancing, please see the following talk |
@OlegDokuka I am testing this example, I observe that load is not going to Server 1 and I lost a message in the sequence. Can you please comment?
|
@pckeyan is it the same test? Do you use the new loadbalance API? What strategy do you use? If the one you use is a weighted strategy - then it is fine, the weighted loadbalance strategy does not guarantee fairness it may use 2 instances from the 100 if the latency fits into the lowest (25%) highest (75%) quantiles. If you want to have requests landed fairly - there is a RoundRobinLoadbalanceStrategy for that purpose. Also, be aware that if you got a request getting into the inactive RSocket (e.g. you got connection lost but because of racing nature of events it may happen that these sockets may not be removed on time) your call may end up with an error, thus be prepared to use |
@OlegDokuka Thank You. I used the same example mentioned above only by changing the count to 10 instead of 10000 in the for loop to verify the distribution and loss. First message is lost always lost and the load is not sent to the first server. |
@OlegDokuka And Can you please comment on how I can pass the List of LoadBalanceTarget as reference so that when I add new node or remove a node, it automatically gets updated within |
@OlegDokuka retry fixed the message but it was processed by another server. First server in the list is unreachable it seems, I will test with my sample and comment here. |
Please make sure you use the latest rsocket version ( we have just released the 1.1.0 today, which has a few more improvements)
Please be sure that the builder uses
if you send |
@pckeyan feel free to open a new issue if you spot any other problems related to the new implementation |
I am working on a use case to bring up server nodes that gets added to
LoadBalancedRSocketMono
. Server nodes when they come up or goes down will register itself to a collection which is streamed toLoadBalancedRSocketMono
. ButLoadBalancedRSocketMono
works only on the first registered server node when thecreate
method was called. Below is the sample snippet. I was raising this question in community.netifi.com till last week and site is down for now. Can you please help me understand what I am doing wrong or is this a bug?Below lines have to be called
again
in order for the new server node to service the calls:The text was updated successfully, but these errors were encountered: