sentinel原理源码分析系列(二)-动态规则和transport

本文是sentinel原理源码分析系列第二篇,分析两个组件,动态配置和transport

动态规则

Sentinel提供动态规则机制,依赖配置中心,如nacos,zookeeper,组件支持动态配置,模板类型为规则,支持动态规则

上图是动态配置模型

PropertyListener 用户(sentinel的插槽)实现,监听规则变更通知,变更是全量DynamicSentinelProperty 持有PropertyListener,支持多个,规则数据源实现利用自身的发现机制,当规则配置变更,调用DynamicSentinelProperty的updateValue,后者通知监听器

下图是zookeeper规则数据源实现,使用curator监听规则znode的变更

transport

transport是一个嵌入到保护资源内的组件,dashboard通过该组件拉取资源的metrics

server 内置远程服务,有3个实现,netty,socket,web mvc

dispatcher负责识别和分发请求到command处理器,后者实际处理请求,支持用户可实现自身的处理器

心跳功能,通过该功能注册到dashboard,构建机器/app资料库(discovery)

Sentinel提供SentinelApiClient访问transport

NEXT 下一篇介绍sentinel的启动和初始化

相关推荐
sniper_fandc1 天前
Spring Cloud系列—Alibaba Sentinel授权与规则管理及推送
spring cloud·sentinel
xiao-xiang2 天前
redis-sentinel基础概念及部署
数据库·redis·sentinel
Armyyyyy丶9 天前
Sentinel原理之责任链详解
java·sentinel·熔断限流
超人也会哭️呀10 天前
Redis(八):Redis高并发高可用(哨兵Sentinel)
redis·bootstrap·sentinel·哨兵·哨兵模式·高并发高可用
转身後 默落13 天前
14.Redis 哨兵 Sentinel
redis·bootstrap·sentinel
CHARLIIE17 天前
sentinel
sentinel
曹朋羽19 天前
spring cloud sentinel 动态规则配置
spring·spring cloud·sentinel
java叶新东老师21 天前
四、搭建springCloudAlibaba2021.1版本分布式微服务-加入openFeign远程调用和sentinel流量控制
分布式·微服务·sentinel
曹朋羽24 天前
Spring Cloud Alibaba Sentinel 基本工作原理源码阅读
sentinel
Zfox_1 个月前
Redis:哨兵(Sentinel)
服务器·数据库·redis·缓存·sentinel