当前位置:网站首页>[micro service sentinel] degradation rules slow call proportion abnormal proportion abnormal constant
[micro service sentinel] degradation rules slow call proportion abnormal proportion abnormal constant
2022-06-27 02:19:00 【Bulst】
List of articles
Fusing degradation rules (DegradeRule) It contains the following important properties :

Slow call ratio
Slow call ratio (SLOW_REQUEST_RATIO): Select slow call ratio as the threshold , You need to set the slow call allowed RT( The maximum response time ), If the response time of the request is greater than this value, it is counted as a slow call . When the unit counts time (statIntervalMs) The number of internal requests is greater than the set minimum number of requests , And the proportion of slow calls is greater than the threshold , Then the next request will be automatically fused within the duration of fusing . After fusing for a long time, the fuse will enter the detection recovery state (HALF-OPEN state ), If the next request response time is less than the set slow call RT Then it ends , If it is greater than the set slow call RT It will be fused again .
- Maximum RT: Slow call critical RT, Exceeding this value counts as a slow call . Unit millisecond
- Scale threshold :RT Threshold value of slow request ratio in mode . Default 1.0
- Duration of fusing : Recovery timeout when circuit breaker is open ( In seconds ). After a timeout , The circuit breaker will switch to the half open state to try some requests . Unit second , The figure shows that after triggering fusing , Next 10 The request will be automatically blown within seconds , after 10S After, the fuse will enter the detection recovery state (HALF-OPEN state ), If the next request response time is less than the set slow call RT Then it ends , If it is greater than the set slow call RT It will be fused again .
- Minimum number of requests : The minimum number of requests that can trigger a fusing interrupt ( Within the valid statistical time range ). The default value is 5
- StatIntervalMs: Statistics duration ( Unit is ms), Such as 601000 Represents the minute level (1.8.0 introduce ), Default 1000.
- Use Jmeter The pressure measuring tool accesses the test interface , Check the current limiting effect drawing , The specific current limiting process is about :
(1) Request to enter the background ,sentinel According to the set statistical duration ( Default 1S) Count the total number of requests in the time period
(2) First, judge whether the total number of requests counted is less than the minimum number of requests set by the user ( Default 5), If it is less than, it will not fuse , Instead, go to the next step
(3) Then, according to the maximum value set by the user RT, Judge whether the request in the statistics is a slow call , If it is greater than the setting value, it is a slow call request
(4) Calculate the slow call request again / Percentage of total statistical requests , Whether the set proportional threshold is exceeded .
(5) When the number of requests and slow call proportion threshold in the statistical time exceed the set threshold , The request will be automatically blown in the next fusing duration
(6) At the end of the fusing period , The fuse will enter the detection recovery state (HALF-OPEN state ), If the next request response time is less than the set slow call RT Then it ends , If it is greater than the set slow call RT It will be fused again .
Abnormal proportion
Abnormal proportion (ERROR_RATIO): When the unit counts time (statIntervalMs) The number of internal requests is greater than the set minimum number of requests , And the proportion of anomalies is greater than the threshold , Then the next request will be automatically fused within the duration of fusing . After fusing for a long time, the fuse will enter the detection recovery state (HALF-OPEN state ), If the next request is successful ( There is no mistake ) Then it ends , Otherwise, it will be fused again . The threshold range for the exception ratio is [0.0, 1.0], representative 0% - 100%.
Number of abnormal
Number of abnormal (ERROR_COUNT): When the number of exceptions in the unit statistics time exceeds the threshold, it will automatically fuse . After fusing for a long time, the fuse will enter the detection recovery state (HALF-OPEN state ), If the next request is successful ( There is no mistake ) Then it ends , Otherwise, it will be fused again .
边栏推荐
- 热议:月薪1.8万却毫无意义的工作,你干吗?
- C # check whether the date is in the correct format
- 【微服务|Sentinel】降级规则|慢调用比例|异常比例|异常数
- Learn Tai Chi Maker - mqtt Chapter 2 (3) reserved messages
- 别被洗脑了,这才是90%中国人的工资真相
- STM32入门介绍
- Paddlepaddle 20 implementation and use of exponentialmovingaverage (EMA) (support static graph and dynamic graph)
- Leetcode 785: judgment bipartite graph
- “所有专业都在劝退”,对大学生最友好的竟然是它?
- C# Tcp服务器如何限制同一个IP的连接数量?
猜你喜欢
Parameter estimation -- Chapter 7 study report of probability theory and mathematical statistics (point estimation)
Detailed explanation of ThreadLocal
P5.js death planet
DAMA、DCMM等数据管理框架各个能力域的划分是否合理?有内在逻辑吗?
Flink learning 1: Introduction
pytorch 22 8种Dropout方法的简介 及 基于Dropout用4行代码快速实现DropBlock
Sample development of WiFi IOT Hongmeng development kit
学习太极创客 — MQTT(七)MQTT 主题进阶
Learn Tai Chi Maker - mqtt Chapter 2 (3) reserved messages
Flink學習2:應用場景
随机推荐
Canvas particles: mouse following JS effect
Don't be brainwashed. This is the truth about the wages of 90% of Chinese people
Oracle/PLSQL: Rtrim Function
Calculation of average wind direction and speed (unit vector method)
memcached基础10
Learn Tai Chi Maker - mqtt (VI) esp8266 releases mqtt message
h5液体动画js特效代码
Oracle/PLSQL: NumToYMInterval Function
Oracle/PLSQL: From_Tz function
Dameng database installation
C language -- Design of employee information management system
达梦数据库安装
正则表达式:语法
解决cherry pick提交报错问题
LeetCode 785:判断二分图
Memcached foundation 10
Memcached basics 15
D's appendto packaging
Oracle/PLSQL: Soundex Function
Microsoft365 developer request