This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# spring cloud中的zull已经有了负载均衡的能力,为什么还要搭配ribbon使用呢?
Spring Cloud Zuul 和 Ribbon 都是 Spring Cloud 生态系统中的组件,它们各自有不同的功能和特点。
虽然 Zuul 已经具备了负载均衡的能力,但是将它们一起使用可以带来以下好处:
- 分离关注点
Zuul 主要是一个 API 网关,负责路由、过滤、认证等功能,而 Ribbon 则专注于客户端负载均衡。将负载均衡功能从 Zuul 中分离出来,可以使得 Zuul 更加专注于其作为网关的职责。