{"id":1740,"date":"2023-03-26T21:14:29","date_gmt":"2023-03-26T13:14:29","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1740"},"modified":"2023-04-23T21:30:12","modified_gmt":"2023-04-23T13:30:12","slug":"comparison-between-spring-cloud-gateway-and-zuul","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/26\/comparison-between-spring-cloud-gateway-and-zuul\/","title":{"rendered":"Spring Cloud Gateway \u4e0e Zuul \u6bd4\u8f83"},"content":{"rendered":"<p><code>Spring Cloud Gateway<\/code>\u662f<code>Spring Cloud Finchley<\/code>\u7248\u63a8\u51fa\u6765\u7684\u65b0\u7ec4\u4ef6\uff0c\u7528\u6765\u4ee3\u66ff\u670d\u52a1\u7f51\u5173\uff1a<code>Zuul<\/code><\/p>\n<h2>\u4e24\u8005\u533a\u522b<\/h2>\n<h3>\u5f00\u6e90\u7ec4\u7ec7<\/h3>\n<p><!-- more --><\/p>\n<p><code>Spring Cloud Gateway<\/code>\u662f<code>Spring Cloud<\/code>\u5fae\u670d\u52a1\u5e73\u53f0\u7684\u4e00\u4e2a\u5b50\u9879\u76ee\uff0c\u5c5e\u4e8e<code>Spring<\/code>\u5f00\u6e90\u793e\u533a\uff0c\u4f9d\u8d56\u540d\u53eb\uff1a<code>spring-cloud-starter-gateway<\/code><\/p>\n<p>\u53c2\u8003\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/spring.io\/projects\/spring-cloud-gateway\">https:\/\/spring.io\/projects\/spring-cloud-gateway<\/a><\/p>\n<pre><code>\n`Zuul`\u662f`Netflix`\u516c\u53f8\u7684\u5f00\u6e90\u9879\u76ee\uff0c`Spring Cloud`\u5728`Netflix`\u9879\u76ee\u4e2d\u4e5f\u5df2\u7ecf\u96c6\u6210\u4e86`Zuul`\uff0c\u4f9d\u8d56\u540d\u53eb\uff1a`spring-cloud-starter-netflix-zuul`\n\n\u53c2\u8003\uff1ahttps:\/\/github.com\/Netflix\/zuul<\/code><\/pre>\n<h3>\u5e95\u5c42\u5b9e\u73b0<\/h3>\n<p>\u53c2\u8003\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/stackoverflow.com\/questions\/47092048\/how-is-spring-cloud-gateway-different-from-zuul\">https:\/\/stackoverflow.com\/questions\/47092048\/how-is-spring-cloud-gateway-different-from-zuul<\/a><\/p>\n<p>\u636e<code>Spring Cloud Gateway<\/code>\u539f\u4f5c\u8005\u7684\u89e3\u91ca\uff1a<\/p>\n<p><code>Zuul<\/code>\u6784\u5efa\u4e8e<code>Servlet 2.5<\/code>\uff0c\u517c\u5bb9<code>3.x<\/code>\uff0c\u4f7f\u7528\u7684\u662f\u963b\u585e\u5f0f\u7684<code>API<\/code>\uff0c\u4e0d\u652f\u6301\u957f\u8fde\u63a5\uff0c\u6bd4\u5982<code>websockets<\/code>\u3002\u53e6\u5916<\/p>\n<p><code>Spring Cloud Gateway<\/code>\u6784\u5efa\u4e8e<code>Spring 5+<\/code>\uff0c\u57fa\u4e8e<code>Spring Boot 2.x<\/code>\u54cd\u5e94\u5f0f\u7684\u3001\u975e\u963b\u585e\u5f0f\u7684<code>API<\/code>\u3002\u540c\u65f6\uff0c\u5b83\u652f\u6301<code>websockets<\/code>\uff0c\u548c<code>Spring<\/code>\u6846\u67b6\u7d27\u5bc6\u96c6\u6210\uff0c\u5f00\u53d1\u4f53\u9a8c\u76f8\u5bf9\u6765\u8bf4\u5341\u5206\u4e0d\u9519\u3002<\/p>\n<h3>\u6027\u80fd\u8868\u73b0<\/h3>\n<p>\u8fd9\u4e2a\u6ca1\u4ec0\u4e48\u597d\u6bd4\u7684\uff0c\u8981\u6bd4\u5c31\u548c<code>Zuul 2.x<\/code>\u6bd4\uff0c<code>Zuul 2.x<\/code>\u5728\u5e95\u5c42\u4e0a\u6709\u4e86\u5f88\u5927\u7684\u6539\u53d8\uff0c\u4f7f\u7528\u4e86\u5f02\u6b65\u65e0\u963b\u585e\u5f0f\u7684<code>API<\/code>\uff0c\u6027\u80fd\u6539\u5584\u660e\u663e\uff0c\u4e0d\u8fc7\u73b0\u5728<code>Spring Cloud<\/code>\u4e5f\u6ca1\u96c6\u6210<code>Zuul 2.x<\/code>\uff0c\u6240\u4ee5\u5c31\u6ca1\u4ec0\u4e48\u597d\u6bd4\u7684\u3002<\/p>\n<h2>\u5982\u4f55\u9009\u62e9<\/h2>\n<p>\u672c\u6587\u8bf4\u7684<code>Zuul<\/code>\u6307<code>Zuul 1.x<\/code>\uff0cNetflix\u65e9\u5c31\u53d1\u5e03\u4e86\u6700\u65b0\u7684<code>Zuul 2.x<\/code>\uff0c\u4f46<code>Spring Cloud<\/code>\u8c8c\u4f3c\u6ca1\u6709\u6574\u5408\u8ba1\u5212\uff0c\u770b\u4e86\u4e0b\u76ee\u524d\u6700\u65b0\u7684\u5305\uff0c\u6574\u5408\u7684\u8fd8\u662f<code>Zuul 1.x<\/code>\u3002<\/p>\n<p>\u636e\u4e86\u89e3\uff0c\u6b63\u662f\u56e0\u4e3a<code>Zuul 2.x<\/code>\u7684\u4e0d\u65ad\u8df3\u7968\uff0c<code>Spring Cloud<\/code>\u624d\u91dc\u5e95\u62bd\u85aa\u63a8\u51fa\u4e86\u81ea\u5df1\u7684\u670d\u52a1\u7f51\u5173\uff1a<code>Spring Cloud Gateway<\/code>\uff0c\u4f7f\u7528\u8d77\u6765\u6bd4 Zuul \u66f4\u7b80\u5355\uff0c\u914d\u7f6e\u66f4\u65b9\u4fbf\uff0c\u6240\u4ee5\u8bf4\u9009<code>Spring Cloud Gateway<\/code>\u6ca1\u9519\uff0c\u6bd5\u7adf\u662f<code>Spring Cloud<\/code>\u4eb2\u513f\u5b50\uff0c\u4e0d\u4f1a\u59cb\u4e71\u7ec8\u5f03\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spring Cloud Gateway\u662fSpring Cloud Finchley\u7248\u63a8\u51fa\u6765\u7684\u65b0\u7ec4\u4ef6\uff0c\u7528\u6765\u4ee3\u66ff [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[439,250],"class_list":["post-1740","post","type-post","status-publish","format-standard","hentry","category-spring-cloud","tag-spring-cloud-gateway","tag-zuul"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1740"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1740\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}