-
Notifications
You must be signed in to change notification settings - Fork 705
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
Make DelegatingServiceInstanceListSupplier implement SelectedInstanceCallback #1221
Comments
Removing
|
Further debugging revealed a second issue. My
However, with Spring retry on the classpath my
I suspect that every implementation of |
@OlgaMaciaszek any feedback appreciated as I'm stuck here. What I need to achieve is that my own |
@spencergibb Can you please have a look and give me hint if this is considered a bug or if any configuration possibility exists as a workaround? I've tried using |
Hello, @HJK181. This is happening as for retrying failed requests, |
I’d like to use the retry functionality, but in conjunction with my custom instance list supplier. |
That property does not disable retry. It only disables the |
Yeah but that’s a good thing I would prefer to not turn off. Particularly for all other load balancer clients in my spring cloud gateway (route based). What I actually need is wrapping the |
@HJK181, that makes sense, however, the way this hierarchy has been designed is that the supplier provided by the user in a custom config (or our default one) is used as the delegate of the Alternatively, |
@OlgaMaciaszek Thank you for looking into it. Let me propose a solution that from my POV should fit into the current design while improving the overall functionality. The design allows one to create a custom configuration for an LB client and provide a custom implementation of To solve this the abstract
What do you think? |
@HJK181 That looks reasonable; we could put it in |
I can check tomorrow if I find the time to setup my IDE for contributing to the project. Is there any chance that it will be backported to 3.1.x? |
Unfortunately, not really. We mostly only backport bugfixes. This would be a new feature. |
respect SelectedInstanceCallback on its delegate. Motivation behind is that some load balancer implementations like the RoundRobinLoadBalancer to call selectedServiceInstance on the ServiceInstanceListSupplier after choosing the next instance. However, when a ServiceInstanceListSupplier in wrapped by the DelegatingServiceInstanceListSupplier this functionality breaks, as DelegatingServiceInstanceListSupplier is not implementing SelectedInstanceCallback and therfore does ignoring that its delegate might also do. This might break the functionality of the delegate. Fixes spring-cloudgh-1221.
@OlgaMaciaszek #1226 FYI |
I've tried to setup a custom load balancer as described in this post. However, with spring-cloud-starter-loadbalancer:3.1.4 I'm experiencing
When deploying the application to Kubernetes along
spring-cloud-kubernetes-facric8-loadbalancer:2.1.4
and activatingspring.cloud.kubernetes.loadbalancer.mode=SERVICE
it's even getting worseAm I doing something wrong, or is the example from the post wrong?
The text was updated successfully, but these errors were encountered: