1,git地址 https://github.com/alibaba/Sentinel/wiki/%E4%B8%BB%E9%A1%B5
2,Sentinel 是什么:
阿里巴巴的一个 面向分布式服务架构的轻量级流量控制组建
3,基本概念:
资源(ResourceWrapper): 希望被控制管理的服务或者代码等,这段代码会被 程序(请求)多次执行,需要被监控。
只要通过 Sentinel API 定义的代码(块),就是资源,能够被 Sentinel 保护起来。
具体表示资源的类是:ResourceWrapper
有两个实现类分别是:StringResourceWrapper 和 MethodResourceWrapper。
StringResourceWrapper 是通过对一串字符串进行包装,是一个通用的资源包装类,
MethodResourceWrapper 是对方法调用的包装
规则(Rule)
规则,可以包括流量控制规则、熔断降级规则以及系统保护规则。所有规则可以动态实时调整。
4,核心功能
- 流量控制
- 熔断降级
- 系统负载保护(自适应 防止系统雪崩)