Questions tagged [spring-cloud-loadbalancer]
50 questions
1
vote
1 answer
Why is the bean 'reactorServiceInstanceLoadBalancer' instantiated just when the method 'getInstance' is called?
Im trying to define a custom LoadBalancer by implementation the interface ReactorServiceInstanceLoadBalancer to replace the default load balancer defined by RoundRobinLoadBalancer.
But it doesn't work.
I found that the original bean defined in class…

pigman
- 86
- 7
0
votes
0 answers
How do I use property-based urls in OpenFeign in Native/AOT mode without LoadBalancers?
I'm trying to use Spring Cloud OpenFeign (v4.0.2) to create a @FeignClient that uses an url set by a property given in runtime or through Spring Cloud Config.
@FeignClient(name = "my-client")
public interface MyClient {
…

Diego Pedraza
- 1
- 2
- 1
0
votes
1 answer
Spring Cloud Load Balancer Sending Requests to Unavailable Services when Using Eureka
I'm using Spring Boot 3.0.5 and Spring Cloud Release Train 2022.0.2.
My current architecture is in the picture below: I am attempting to use a load balanced discovery service to route incoming external requests to an internal service.
I've been…

Lawrence Beutlich
- 41
- 1
- 3
0
votes
0 answers
Spring cloud load-balancer drops instances after cache refresh
I have a need to save Spring Cloud Gateway routes within a database and to do this we send a web request using the WebClient to another microservice.
I'm using Eureka for service discovery and want the WebClient to use discovery instance names…

Mike at Savient
- 250
- 2
- 12
0
votes
0 answers
Failed to resolve service with Spring Cloud LoadBalancer
I followed this guide to implement a simple client-side load balancer in a Spring Boot application. Below is the code:
@RestController
class MyController(
val loadBalancedWebClientBuilder: WebClient.Builder
) {
private fun makeRequest() {
…

Vlad
- 844
- 1
- 12
- 22
0
votes
0 answers
WebClient configuration with Spring Cloud LoadBalancer considering zone preference
I am configuring a WebClient Bean using Spring Cloud Load Balancer with Multi-AZ configurations (e.g. A and B Zone), and I want to request A Zone first, and if I cannot connect to A Zone, I want to request it to B Zone.
What form should it be in at…

user19350171
- 19
- 2
0
votes
0 answers
Issue after updating spring cloud version to 2021.0.4 No Feign Client for load Balancing defined
I am using spring-cloud-openfeign-core version '2.2.6.RELEASE' I am getting below error " No Feign Client for load Balancing defined. Did you forget to include spring-cloud-starter-netflix-ribbon?" This is happening after updating…

Madhuri
- 1
- 1
0
votes
0 answers
Spring Cloud: Using REST template gives HttpRequestLoadBalancerRequest not found exception
I am using Spring Boot and want to use load balancer aware REST template. For this I created a Bean as follows
@LoadBalanced
@Bean
public RestTemplate getRestTemplate(){
return new RestTemplate();
}
And created a REST client as…

GenZ Dev
- 210
- 4
- 16
0
votes
0 answers
What is the timeout and retry config in Spring Loadbalancer 、CircuitBreak (resilience4j)?
I`m migrating and upgrading the project, from Spring Cloud Netflix to New Spring Cloud(Spring loadbalancer…

zy_sun
- 175
- 1
- 11
0
votes
1 answer
Spring Boot SimpleDiscoveryClient YAML configuration
I have a microservice serviceA that uses feign client to access another microservice.
During development, I want to rely on SimpleDiscoveryClient to get an instance of the service running in my docker daemon. If I configure…

Flavio Oliva
- 401
- 4
- 15
0
votes
1 answer
Spring cloud gateway with discoveryclient and static routes
I'm currently replacing an api gateway using Netflix Zuul with spring cloud gateway. The setup uses discovery client (Eureka) for most of the routes, but we also have a solr instance running which requires manually defined routes (as solr doesn't…

mlidal
- 1,111
- 14
- 27
0
votes
0 answers
How is LoadBalancerClientFactory.PROPERTY_NAME set?
I'm trying to develop a custom DiscoveryClient but when it uses lb:// it doesn't work correctly. I have instatiated a DiscoveryClientServiceInstanceListSupplier using @Import(LoadBalancerClientConfiguration.class) in the application class.
Looking…

Archimedes Trajano
- 35,625
- 19
- 175
- 265
0
votes
1 answer
Spring Cloud Load Balancer - Is there a way to see which instance is choosen?
We're switching from Ribbon to Spring Cloud Load Balancer, and thus far things seem to work. However I want to be able to see which instance is chosen on each request to verify the behavior.
Is there a debug flag or some other way to see which…

CoffeeCupDeveloper
- 31
- 3
0
votes
2 answers
Handling custom error code in spring cloud load balancer
In my current project, one of our microservices calls a REST Api of an another microservice and in an error scenario it returns a custom(469) error code.
I'm using a load balanced rest template in the calling service and its throwing an…

Curfew
- 3
- 1
0
votes
1 answer
Request-based Sticky Session configuration with Spring Cloud LoadBalancer
I have the following configuration for request-based sticky session using Spring Cloud LoadBalancer
spring:
cloud:
discovery.client.simple.instances:
say-hello:
- instanceId: say-hello1
uri: http://localhost:8080
…

Zoltan Altfatter
- 802
- 2
- 11
- 25