Comments (7)
An option (maybe not clean) would be to have the SpringLBClientFactory
take care of resetting the retry handlers.
@Override
public LBClient create(String clientName) {
IClientConfig config = factory.getClientConfig(clientName);
ILoadBalancer lb = factory.getLoadBalancer(clientName);
LBClient client = LBClient.create(lb, config);
client.setRetryHandler(new DefaultLoadBalancerRetryHandler(config));
return client;
}
from spring-cloud-openfeign.
@marcolenzo I wouldn't do new DefaultLoadBalancerRetryHandler(config)
, but use factory.getInstance(clientName, RetryHandler.class)
and have the default be a DefaultLoadBalancerRetryHandler
. You could then customize via the normal ribbon customization methods. WDYT?
from spring-cloud-openfeign.
@marcolenzo @spencergibb Hi! I just found this issue that kind of describes what is happening to me. I was expecting that when there's a failure FeignClients would retry calling another instance of the same microservice in the next available server instead of just failing.
What actually happens is that it responds with an error 500. The following requests will be executed by the non-failing server, which is cool. However, it would be even better that it never failed and retried the operation in the next server. Is it supposed to work that way?
EDIT: I just realized my problem had to do with HystrixFeign configuration: my client had a 1 second timeout that didn't allow the load balancer to have enough time to call the next service. I increased its value and now it works as expected.
hystrix:
command:
getImage:
execution:
isolation:
thread:
timeoutInMilliseconds: 5000
I am still wondering what the role of Feign's Retryer is, though. Since we have Ribbons retry configuration, it's kind of useless, isn't it?
from spring-cloud-openfeign.
Seems that it's fixed in 1.1.x branches, see CachingSpringLoadBalancerFactory
from spring-cloud-openfeign.
Can you please try with the latest Spring Cloud release? The retry functionality has been completely rewritten since this issue was opened?
from spring-cloud-openfeign.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
from spring-cloud-openfeign.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
from spring-cloud-openfeign.
Related Issues (20)
- Default request header headers overwriten with specific client configuration and shared by all clients HOT 1
- PlaytikaOSS feign-reactive does not support spring boot 3.2.x HOT 1
- @PatchMapping and @DeleteMapping insert unwanted slash when using url and specific value HOT 3
- FeignClientFactoryBean dismiss404 default config overrides client-specific config HOT 1
- Multiple implementations of ResponseInterceptor fail to trigger HOT 10
- Want to understand , is Spring Openfeign is in Deprecated path HOT 2
- Maintain the span from HTTP calls using feign clients with micrometer HOT 1
- Micrometer tracing propagation not working when using Spring FactoryBean and Feign HOT 1
- Custom HTTP codes are not supported HOT 1
- B3 span and parentId headers not propagated with spring-cloud-openfeign and brave HOT 1
- Remove unused spring-boot-starter-aop dependency HOT 1
- [sentinel] openfeign+sentinel Error HOT 2
- Spring Boot 3.2.4 (Cloud 2023.0.1) Cannot deserialize "pageable": "INSTANCE" HOT 5
- Issue with registering method parameter hints HOT 3
- Headers annotation not sending headers HOT 2
- Upgrade to fileupload2 HOT 6
- IllegalArgumentException due to null servletRequest for Oauth2AccessTokenInterceptor after Spring Cloud Update HOT 3
- Fallback functionality should be selectively enabled depending on the actual presense of fallback implementation HOT 1
- provide ignore annotation to programmatically ignore method parameter HOT 1
- Support customization of JDK 11+ HttpClient
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-cloud-openfeign.