Open aakashkarira opened 2 years ago
I believe if you set it in eureka metadata, it will be set in gateway. https://github.com/spring-cloud/spring-cloud-gateway/blob/9d60f165868126a1dfd8ebbf94dda2619934e5a3/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/discovery/DiscoveryClientRouteDefinitionLocator.java#L138
Yes agreed, it can be achieved by updating metadata. But when we have N number of services registering on Eureka, updating timeouts in metadata of each service in respective configuration becomes cumbersome. Handling this timeout configuration in gateway will provide flexibility for those services which all want timeouts different from default configured.
Right now, we can configure timeout (connect, response) for individual routes configured in our application.yml, but there is no provision to set timeouts for route configured via Eureka. When we enable the discovery client we can route to other services registered on same eureka server. In our usecase, we want to configure individual timeouts for different services. Tried overriding route by passing same routeid : ReactiveCompositeDiscoveryClient but doesn't seems to work.
Simple hack we are doing right now is explicitly defining route for services for which we need different timeout and setting order with higher precedence with a downside of having multiple entries for same route (obviously with different precedence)
We were able to configure timeout with ribbon easily in zuul, however in spring cloud gateway & loadbalancer this doesn't seems to be possible.
Is there any plan around this?