Sentinel流控 — QPS、线程数直接失败
Sentinel
alibaba/Sentinel: Sentinel 是阿里巴巴开源的一款面向分布式服务架构的流量控制、熔断降级组件,提供实时监控、限流、降级和系统保护功能,适用于微服务治理场景。
项目地址:https://gitcode.com/gh_mirrors/sentine/Sentinel
·
Sentinel 流控 — QPS直接失败
说明:表示每秒内查询1次就是OK,若次数超过1次,就直接—快速失败,报默认错误;
资源名:就是Controller 中的请求处理方法;

一秒钟请求超过流控配置的单机阈值1,就会报错; 报流量限制错误信息;

Sentinel流控—线程数直接失败
1)阈值类型选择线程数后,就没有流控效果一栏,这个是要注意的;
2)线程数和QPS是不同的;例如办理银行业务,线程数就是银行每个窗口的工作人员;
线程数为1,可以理解为银行办理业务的窗口只有一个,只有一个工作人员在窗口办理业务; 而QPS就是每秒请求数,可以理解为每秒来银行办理业务的客户;
3)阈值类型为“线程数”,单机阈值为“1”,可以理解为每秒只有一个工作人员在办理业务;
4)请求处理方法 /testB 每次请求时,休眠 0.8s,那么每秒不断的请求 /testB,一个线程处理一个请求需要 0.8s ,线程数也只有一个,每秒内不断的请求,线程处理不过来,就会触发流控规则,对此请求的api进行限流。


alibaba/Sentinel: Sentinel 是阿里巴巴开源的一款面向分布式服务架构的流量控制、熔断降级组件,提供实时监控、限流、降级和系统保护功能,适用于微服务治理场景。
最近提交(Master分支:2 个月前 )
a08dc695
* Fix the bugs mentioned in issue #3562 and #3563.
Fix the issue in the spring-webmvc-v6x-adapter where, after configuring http-method-specify:true, the prefixes for different request methods were not concatenated.
Fix incorrect time unit in the tooltip when adding a new circuit breaker rule with statistical window duration.
* Fix the bugs mentioned in issue #3562 and #3563.
Fix the issue in the spring-webmvc-v6x-adapter where, after configuring http-method-specify:true, the prefixes for different request methods were not concatenated.
Fix incorrect time unit in the tooltip when adding a new circuit breaker rule with statistical window duration.
* Fixed the issue where the original test class was affected by the concatenation of resource names after adding the logic for the HTTP prefix concatenation.
* remove mseHttpMethodSpecify field and update the unit test as suggested.
* retrigger CI 19 天前
e60f0d0e
* Simple rules should have higher priority than regular expression rules
* Add optional switch to skip regex matching when simple rules already match, default: false, keeps backward compatibility.
* fix RuleManagerTest unit test failure 19 天前
新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。
更多推荐


所有评论(0)