当前位置:网站首页>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 .
边栏推荐
- @PathVariable
- New database, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, Feishu multidimensional table, heipayun, Zhixin information, YuQue
- 自定义限流注解
- 防火墙基础之外网服务器区部署和双机热备
- Why do novices often fail to answer questions in the programming community, and even get ridiculed?
- 【每周一坑】正整数分解质因数 +【解答】计算100以内质数之和
- [weekly pit] positive integer factorization prime factor + [solution] calculate the sum of prime numbers within 100
- Leetcode hot topic Hot 100 day 32: "minimum coverage substring"
- 2022 nurse (primary) examination questions and new nurse (primary) examination questions
- Utilisation de l'écran OLED
猜你喜欢

Spark SQL chasing Wife Series (initial understanding)

3D人脸重建:从基础知识到识别/重建方法!

看过很多教程,却依然写不好一个程序,怎么破?

基于深度学习的参考帧生成

Design your security architecture OKR

PHP saves session data to MySQL database

2022 refrigeration and air conditioning equipment installation and repair examination contents and new version of refrigeration and air conditioning equipment installation and repair examination quest

Implementation of packaging video into MP4 format and storing it in TF Card

15 millions d'employés sont faciles à gérer et la base de données native du cloud gaussdb rend le Bureau des RH plus efficace

新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
随机推荐
[DSP] [Part 2] understand c6678 and create project
[DIY]如何制作一款个性的收音机
Intel 48 core new Xeon run point exposure: unexpected results against AMD zen3 in 3D cache
Variable star --- article module (1)
SSO single sign on
OLED屏幕的使用
Laravel notes - add the function of locking accounts after 5 login failures in user-defined login (improve system security)
Reference frame generation based on deep learning
[asp.net core] set the format of Web API response data -- formatfilter feature
##无yum源安装spug监控
正则表达式收集
Is it safe to open an account in flush? Which securities company is good at opening an account? Low handling charges
Kubernetes learning summary (20) -- what is the relationship between kubernetes and microservices and containers?
【mysql】游标的基本使用
Statistical inference: maximum likelihood estimation, Bayesian estimation and variance deviation decomposition
Value of APS application in food industry
Pat 1078 hashing (25 points) ⼆ times ⽅ exploration method
1500万员工轻松管理,云原生数据库GaussDB让HR办公更高效
Mtcnn face detection
I've seen many tutorials, but I still can't write a program well. How can I break it?