In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
What is the routing gateway Zuul? How to configure it? In view of these problems, today the editor summarizes this article about Zuul, hoping to help more friends who want to solve this problem to find a more simple and easy way.
In Spring Cloud micro-service system, a common load balancing method is that the request from the client first goes through load balancing (zuul, Ngnix) to the service gateway (zuul cluster), and then to the specific service. The service is uniformly registered with the highly available service registry cluster. All the configuration files of the service are managed by the configuration service, and the configuration files of the configuration service are placed in the git repository to facilitate developers to change the configuration at any time.
Zuul includes two main functions: routing and filtering of requests: the routing function is responsible for forwarding external requests to specific micro-service instances, which is the basis for realizing a unified entry for external access, while the filter function is responsible for intervening the processing process of requests, and is the basis for implementing request verification, service aggregation and other functions.
Zuul and Eureka are integrated to register Zuul itself as an application under the governance of Eureka services, and to get messages about other micro-services from Eureka, that is, future access to micro-services is obtained through Zuul jump.
Note: the Zuul service will eventually register into Eureka to provide three functions: proxy + routing + filtering.
Reference configuration jar required by Zuul
Org.springframework.cloud spring-cloud-starter-eureka org.springframework.cloud spring-cloud-starter-zuul
Pom configuration for Zuul:
Server: port: 9527spring: application: name: microservicecloud-zuul-gatewayeureka: client: service-url: defaultZone: http://localhost:7001/eureka instance: instance-id: gateway-9527 # Custom service name prefer-ip-address: true # access path can display ip
The access address of zuul:
Enable zuul access address: http://localhost:9527/microservicecloud-dept/dept/list-is the port of the zuul service, and microservicecloud-dept is the registered name of the microservice
Do not enable zuul access address: http://localhost:8001/dept/list-8001 is the port provided by microservice
On the routing gateway Zuul to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you like this article, you might as well share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.