Ribbon 负载均衡

1、负载均衡整体流程

2、负载均衡流程逐级跟踪运行

(1) @LoadBlanced 注解可以使LoadBalancerInterceptor拦截到;

(2)LoadBalancerInterceptor 实现了ClientHttpRequestInterceptor接口;

(3)ClientHttpRequestInterceptor接口释义如下;

(4)intercept方法中定义了主要执行流程;

(5) 进入execute;

(6) 进入getServer;

(7) 进入chooseServer;

(8) 进入父类的chooseServer;

(9) IRule基于规则选择某个服务,其中选择的规则就是其中定义的轮询与随机算法,完成后一步步逐级返回,就完成了这个负载均衡操作;

3、详解图

相关推荐
亦舒.1 天前
宝塔面板Nginx手动配置负载均衡实战指南
运维·nginx·负载均衡
deming_su1 天前
轻松上手:使用Nginx实现高效负载均衡
运维·nginx·负载均衡
白仑色1 天前
Spring Cloud 微服务(统一网关设计)
spring cloud·微服务·服务治理·统一配置管理·分布式配置中心
述雾学java1 天前
Spring Cloud 服务追踪实战:使用 Zipkin 构建分布式链路追踪
分布式·spring·spring cloud·zipkin
被困者11 天前
Linux部署Sonic前后端(详细版)(腾讯云)
spring cloud·云原生·eureka
Hellyc11 天前
springcloud/springmvc协调作用传递验证信息
后端·spring·spring cloud
星融元asterfusion11 天前
动态WCMP+Flowlet ALB:双引擎驱动智算网络负载均衡
网络·人工智能·负载均衡
Ken_111511 天前
SpringCloud系列(32)--使用Hystrix进行全局服务降级
spring cloud·hystrix
Ken_111511 天前
SpringCloud系列(33)--使用Hystrix进行通配服务降级
spring cloud·hystrix
微信公众号:AI创造财富11 天前
Docker 安装 ModelScope(推荐流程)
spring cloud·docker·eureka