一、zuul简介
1、作用
zuul使用一系列的filter实现以下功能
认证和安全 - 对每一个resource进行身份认证
追踪和监控 - 实时观察后端微服务的TPS、响应时间,失败数量等准确的信息
日志 - 记录所有请求的访问日志数据,可以为日志分析和查询提供统一支持
动态路由 - 动态的将request路由到后端的服务上去
压力测试 - 逐渐的增加访问集群的压力,来测试集群的性能
限流 - allocating capacity for each type of request and dropping requests that go over the limit
静态响应 - 直接在网关返回一些响应,而不是通过内部的服务返回响应
2、组件:
zuul-core :library which contains the core functionality of compiling and executing Filters
zuul-netflix :library which adds other NetflixOSS components to Zuul - using Ribbon for routing requests, for example.
3、例子:
zuul-simple-webapp :webapp which shows a simple example of how to build an application with zuul-core
zuul-netflix-webapp :webapp which packages zuul-core and zuul-netflix together into an easy to use package
github地址:
https://github.com/