110

I have been using Zuul as the edge service and API Gateway. Recently I have noticed that Spring Cloud Platform release Spring Cloud Gateway. What is the difference between the two gateways? Why is the Zuul not extended to support the functionalities in S-C-Gateway? What was the driving factor for a new library altogether? When should it be used?

1
  • Could you share the Spring [Boot] version you're refering to? May 31, 2018 at 12:58

2 Answers 2

228

I am the author of spring cloud gateway. Zuul is built on servlet 2.5 (works with 3.x), using blocking APIs. It doesn't support any long lived connections, like websockets.

Gateway is built on Spring Framework 5, Project Reactor and Spring Boot 2 using non-blocking APIs. Websockets are supported and it's a much better developer experience since it's tightly integrated with Spring.

9
  • 35
    On Sept/Oct 2016, Netflix released Zuul 2. It is a non-blocking and asynchronous solution. The major architectural difference between Zuul 2 and Zuul 1 is that Zuul 2 is running on an asynchronous and non-blocking framework, using Netty.
    – alltej
    Dec 22, 2017 at 22:04
  • 5
    They have not released zuul 2, they announced it. The current development is being done on the 2.1 branch. Dec 22, 2017 at 22:06
  • 5
    @spencergibb Is the performance problems of spring-cloud-gateway mentioned in this comparison solved? 229ms (scg) compared to 29ms (Zuul1) on 8core-16gb machine is not really useful. Feb 19, 2018 at 5:48
  • 22
    Zuul 2.1.1 has been released on April 13, 2018. It is asynchronous and non-blocking.
    – bedrin
    Apr 19, 2018 at 14:04
  • 8
    Is there any difference in performance between Cloud Gateway vs. Netflix Zuul 2?
    – Kevin
    Jul 19, 2019 at 3:10
-1

--- This notes for spring 5 ---

Spring cloud gateway is replacement of zuul for the following reasons and advantages,

  • Spring Cloud Gateway is the preferred API Gateway implementation from the Spring Cloud team. It's built on Spring 5, Reactor, and Spring Web Flux. Not only that, but it also includes circuit breaker and Eureka service discovery.
  • Spring Cloud Gateway is non-blocking in nature. Through later Zuul 2 also support it, but still Spring Cloud Gateway has an edge here.
  • Spring Cloud Gateway has a superior performance compared to that of Zull.

Not the answer you're looking for? Browse other questions tagged or ask your own question.