spring-cloud / spring-cloud-netflix

Integration with Netflix OSS components
http://cloud.spring.io/spring-cloud-netflix/
Apache License 2.0
4.87k stars 2.44k forks source link

"Route specific" Hystrix config in Zuul Proxy? #389

Closed abaculus closed 5 years ago

abaculus commented 9 years ago

As I understand the Hystrix commands in Zuul Proxy are named:

hystrix.HystrixCommand.RibbonCommand.<service-name>RibbonCommand

This Hystrix config would apply to all requests to the specific service.

The issue is that in the same service we got several URLs in need of different Hystrix config (thread pool size, timeouts etc).

Is this possible to configure in Spring Cloud Netflix and if so how can I do it?

If not maybe one could accomplish this by prefixing below with the when creating the HystrixCommand?

Template config:

zuul.routes.<route-name>.path=/my/url zuul.routes.<route-name>.serviceId=<service-id>

Example:

zuul.routes.abrakadabra.path=/my/url zuul.routes.abrakadabra.serviceId=MyService

created the following command name:

hystrix.HystrixCommand.RibbonCommand.abrakadabraMyServiceRibbonCommand

Maybe this relates somewhat to #250

spencergibb commented 9 years ago

Seems like a simple fix. Maybe a configuration option like zuul.prefixHystrixWithRoute or something.

abaculus commented 9 years ago

Sounds nice! :+1:

spencergibb commented 5 years ago

This module has entered maintenance mode. This means that the Spring Cloud team will no longer be adding new features to the module. We will fix blocker bugs and security issues, and we will also consider and review small pull requests from the community.