We are planning using Zuul in production as an API gateway. I am not sure the behavior of Zuul in this specific scenario.
Suppose there are two back-end services A and B sitting behind Zuul. Service A is a slow one but with a lot of traffic. What will happen to the clients visiting Service B through Zuul?
On the clients' side, Service B will be unavailable because Service A slow down the Zuul so there is no resource to handle the request for Service B. I'm not sure about this, and any advice or experience will be much appreciated.
At the end of the day, yes if Zuul runs out of threads to handle incoming requests because a service downstream is behaving badly, yes you wont be able to proxy any other requests to other services. However that is what we integrate Hystrix with Zuul so that you can protect Zuul from a situation like this. You could also do things like adjust timeout values to make sure that slow requests timeout after an appropriate amount of time.
I think Hystrix only works with Eureka, right?
We are using a hostname to access our downstream service, so I think we need to tweak the timeout parameter.
Hystrix will work when Zuul is using Ribbon, that happens automatically when using service discovery (Eureka). Are you configuring your Zuul routes using URLs?
yes, We are using URLs right now. Any plan to support Hystrix with URLs? Or any advice about this topic?
In some former projects, we have custom thread pool working for multi-tenants/services. But I have no idea to do this in Spring-Cloud with Undertow or Tomcat.
Not really. You can use ribbon with static urls' which will get you the same benefit.
For an example see http://cloud.spring.io/spring-cloud-static/Edgware.SR1/single/spring-cloud.html#spring-cloud-ribbon-without-eureka
Thank you, I will try that and update the result.
Hi @jadetang
Have you got any update for this case.
I'm also facing to this problem, and investigating more,
Closing due to age of the question. If you would like us to look at this issue, please comment and we will look at re-opening the issue.