问题
Since Spring Cloud team has abandoned development of Zuul module, we are moving to Spring Cloud Gateway or Zuul2 but I believe Zuul2 needs a lot of changes in the architecture and needs big changes in the microservices(correct me if i'm wrong), can anyone gives a recommendation on zuul2 or Spring-Cloud-Gateway, has anyone or you know any big player in tech using Spring-Cloud-Gateway?
回答1:
Zuul1 is blocking whereas Zuul2 and spring cloud gateway are non-blocking and this is a major performance factor for a gateway, as a non-blocking model requires less resources to serve the same amount of requests as compared to a blocking gateway.
Now, coming to spring cloud gateway and Zuul2 - Spring Cloud does not provide any out of the box integration with Zuul2. Gateway has many features that are not available in the public version of Zuul2 such as Rate limiting, etc. Also, with the gateway you can have custom filters defined per route and there are tons of built-in filters defined as well, which helps a lot to get started.
Actually, there are many things which are not possible to explain here. You can follow the gateway documentation here - https://cloud.spring.io/spring-cloud-static/spring-cloud-gateway/2.0.2.RELEASE/single/spring-cloud-gateway.html
回答2:
I think SCG is the way to go due to the agreements between Netflix and Pivotal, with the former leaning more toward the spring boot/cloud ecosystem as stated in https://medium.com/netflix-techblog/netflix-oss-and-spring-boot-coming-full-circle-4855947713a0
Performance-wise it also seems like a good bet: https://www.bytesville.com/zuul-spring-cloud-gateway-comparison-benchmarks-loadtesting/
回答3:
They both are replacements, but Spring Cloud will only support Gateway, not zuul 2
来源:https://stackoverflow.com/questions/56529083/spring-cloud-gateway-or-zuul2-which-one-is-the-right-replacement-for-zuul1