当前位置:网站首页>The biggest pain point of traffic management - the resource utilization rate cannot go up
The biggest pain point of traffic management - the resource utilization rate cannot go up
2022-07-06 21:00:00 【pythonxxoo】
Python Wechat ordering applet course video
https://edu.csdn.net/course/detail/36074
Python Actual quantitative transaction financial management system
https://edu.csdn.net/course/detail/35475
Hello everyone , I'm a ferry , This is the third in the traffic management series 9 Original articles , If there is harvest , Please share it with more friends .
I was once asked , Is there any pain in current limiting ? My answer at the time was : The current limiting threshold is not easy to evaluate and reduces the user experience , This is what I think is the pain point .
How to evaluate the current limiting threshold is still subject to the action of pressure measurement , Especially the current e-commerce platform , The full link voltage test will be carried out before the promotion , Expose the problem , See how much traffic you can handle . Then according to the business expectation , I know whether to expand the capacity , And the indicators of flow control , It's not hard to say , It needs a variety of means to prove .
Reducing the user experience is a must for current limiting , The user is placing an order , Then you will be prompted that the server is currently too crowded , Network anomalies , Please try again and wait , To put it simply, it reduces the user experience , Because the user needs to operate repeatedly . The serious point is that it affects the conversion rate of orders , Therefore, this is also the reason why pressure measurement is required before the promotion of e-commerce platform . It doesn't mean limiting the flow directly to a very low water level , User experience and system complexity must be weighed .
In fact, there is another more painful point is : Resource utilization is not going up .
When we go through the pressure test , When evaluating the maximum performance of a single node , The flow control threshold is 70% It's a safer approach . For example, you press a single machine to 1000 QPS, then CPU And memory 50% about , Then direct flow control 1000 that will do .
this 1000 It may also subdivide interfaces , The current limiting values of different interfaces are also different . For example, you have an interface configured 500 Current limiting , As long as the number of requests for this interface exceeds 500 Then the current must be limited , However, it is possible that only this interface has a large number of visits at this time , The others have little traffic , Mechanical CPU, Memory or something is still very low , The response, including the database, is also fast . At this time, it seems that it doesn't matter to limit the current , However, the current limit is configured with a fixed value , Can only limit .
In the face of this situation , A new current limiting method was born , Namely Adaptive current limiting . Adaptive current limiting means that there is no fixed current limiting threshold , The current limiting threshold will change , The factor of change is whether the dependent resources are sufficient , such as CPU, Memory and other resources .
Adaptive current limiting is still complex , The complexity lies in the need to collect all kinds of data in real time , Then through a lot of calculations , Then extract the decision , This decision is whether to limit the current , And the calculation speed is fast .
The general structure is as follows :
Of course, this calculation is a separate service , Embedded or embedded can be used in the current application , Depends on performance impact and whether cluster flow control .
With adaptive current limiting , The utilization of resources will be greatly improved . Because there is no need to set a more stable fixed value , Instead, it determines whether to limit the flow according to the use of resources , Maximum program utilization resources .
In the open source framework Sentinel It also has such an adaptive current limiting function , Those who are interested can learn :https://github.com/alibaba/Sentinel/wiki/%E7%B3%BB%E7%BB%9F%E8%87%AA%E9%80%82%E5%BA%94%E9%99%90%E6%B5%81
One of the advantages of adaptive current limiting is that it can improve the utilization of resources , There is also the ability to adapt to the impact of uncertain factors . Compared with the static current limiting configuration , We must configure it based on the results of pressure measurement , Even after pressure measurement , It's time for a really big traffic attack , No guarantee as like as two peas. . In case of an emergency , One slow Sql Put the database CPU It's full , Your current limit threshold is still so much QPS, slow SQL Increase hundreds of times , This current limiting is now inoperative .
Through adaptive current limiting , Decide whether to use flow control according to the results of real-time calculation , Ensure system stability . At the same time, it also avoids the cumbersome manual configuration process , The system automatically adjusts .
Another example : The current limit of single interface is 1000, Order details are 500. If the current is limited according to a fixed value , More than 1000 Will be limited , If the requested quantity of the order is greater than the quantity of the order details , Can adaptive current limiting first meet the traffic with higher business value , Let this part of the flow pass through , If there is other flow at this time, can it be automatically limited first . I don't need to say more about the value of this part , You know .
So adaptive current limiting can do a lot of things , Mainly intelligent , Intelligent algorithm level , It means a little artificial intelligence .
边栏推荐
- Web开发小妙招:巧用ThreadLocal规避层层传值
- Recyclerview GridLayout bisects the middle blank area
- The most comprehensive new database in the whole network, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, flying Book Multidimensional table, heipayun, Zhix
- [DIY]如何制作一款个性的收音机
- 3D人脸重建:从基础知识到识别/重建方法!
- #yyds干货盘点#重新梳理箭头函数的this
- SSO single sign on
- Reinforcement learning - learning notes 5 | alphago
- Huawei device command
- 7. Data permission annotation
猜你喜欢
Kubernetes learning summary (20) -- what is the relationship between kubernetes and microservices and containers?
1500萬員工輕松管理,雲原生數據庫GaussDB讓HR辦公更高效
基于深度学习的参考帧生成
拼多多败诉,砍价始终差0.9%一案宣判;微信内测同一手机号可注册两个账号功能;2022年度菲尔兹奖公布|极客头条
[weekly pit] positive integer factorization prime factor + [solution] calculate the sum of prime numbers within 100
2022 Guangdong Provincial Safety Officer C certificate third batch (full-time safety production management personnel) simulation examination and Guangdong Provincial Safety Officer C certificate third
Statistical inference: maximum likelihood estimation, Bayesian estimation and variance deviation decomposition
【每周一坑】计算100以内质数之和 +【解答】输出三角形
[weekly pit] output triangle
[DSP] [Part 1] start DSP learning
随机推荐
Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
【DSP】【第一篇】开始DSP学习
性能测试过程和计划
Value of APS application in food industry
1500万员工轻松管理,云原生数据库GaussDB让HR办公更高效
【微信小程序】運行機制和更新機制
3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
2022 portal crane driver registration examination and portal crane driver examination materials
C language operators
PHP saves session data to MySQL database
1500萬員工輕松管理,雲原生數據庫GaussDB讓HR辦公更高效
The most comprehensive new database in the whole network, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, flying Book Multidimensional table, heipayun, Zhix
Deployment of external server area and dual machine hot standby of firewall Foundation
R语言可视化两个以上的分类(类别)变量之间的关系、使用vcd包中的Mosaic函数创建马赛克图( Mosaic plots)、分别可视化两个、三个、四个分类变量的关系的马赛克图
use. Net drives the OLED display of Jetson nano
15million employees are easy to manage, and the cloud native database gaussdb makes HR office more efficient
过程化sql在定义变量上与c语言中的变量定义有什么区别
c#使用oracle存储过程获取结果集实例
Reference frame generation based on deep learning
OLED屏幕的使用