Zuul implementation of API gateway and request filtering in spring cloud introductory tutorial

brief introduction

Zuul is Netflix's JVM based router and server-side load balancer. The most common scenario is to replace the nginx reverse proxy background micro service for front-end UI access.

Zuul uses the ribbon to locate an instance forwarded through discovery. All requests are executed with the hystrix command, so the fault will be displayed in the hystrix index.

Note: zuul does not include the discovery client. Therefore, for the route based on service ID, you need to provide one of the routes in the classpath

Zuul is an API gateway and filtering component provided by spring cloud. It provides the following functions:

In this tutorial, we will use zuul to forward the web request / product to the corresponding product service, and define a pre filter to verify whether it has been forwarded by zuul.

Basic environment

Project source code

click here

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>