当前位置:网站首页>[micro service sentinel] real time monitoring | RT | throughput | concurrency | QPS

[micro service sentinel] real time monitoring | RT | throughput | concurrency | QPS

2022-06-25 00:45:00 Bulst

Real-time monitoring

The cluster information of all machines under the same service will be aggregated , And show it in seconds " Real-time monitoring " Next .

Be careful : Real time monitoring only stores 5 Data in minutes , If you need persistence , It needs to be customized by calling the real-time monitoring interface .

Be careful : Please make sure Sentinel The machine time of the console is consistent with the machine time of its own application , Otherwise, the real-time monitoring data will not be available .

 Insert picture description here

There are several keywords on the console , Let's make a brief introduction .

RT( response time )

Response time refers to the time when the system responds to the request .

Intuitively , This index is very consistent with people's subjective feelings about software performance , Because it completely records the time when the whole computer system processes the request . Because a system usually provides many functions , The processing logic of different functions is also very different , So different functions have different response times , Even the response time of the same function is different under different input data .

therefore , When discussing the response time of a system , People usually refer to the average time of all functions of the system or the maximum response time of all functions . Of course , It is often necessary to discuss the average response time and maximum response time for each or each group of functions .

For a stand-alone application system without concurrent operation , It is generally believed that response time is a reasonable and accurate performance index . It's important to point out that , The absolute value of response time does not directly reflect the performance of the software , The level of software performance actually depends on the user's acceptance of the response time .

For a game software , Response time is less than 100 Milliseconds should be good , The response time is 1 Seconds or so may be barely acceptable , If the response time reaches 3 Seconds is totally unacceptable .

And for Compiler Systems , It may take dozens of minutes or even longer to compile the source code of a large-scale software completely , But these response times are acceptable to users .

throughput

Throughput refers to the number of requests processed by the system in unit time .

For non concurrent application systems , Throughput is inversely proportional to response time , In fact, the throughput is the reciprocal of the response time .

I've said that before , For a single user system , response time ( Or system response time and application delay time ) It can measure the performance of the system very well , But for concurrent systems , Throughput is usually used as a performance metric .

For a multi-user system , If there is only one user, the average response time of the system is t, When there are you n When used by users , The response time that each user sees is usually not n×t, And often more than n×t Many small ( Of course , In some special cases, it may be better than n×t Big , It's a lot bigger ).

This is because processing each request requires a lot of resources , Because there are many problems in the processing of each request, it is difficult to execute concurrently , This leads to at a specific point in time , It doesn't always take up a lot of resources .

That is to say, when processing a single request , At every point in time, there may be a lot of idle resources , When processing multiple requests , If the allocation of resources is reasonable , The average response time per user does not increase linearly with the number of users .

actually , The average response time of different systems is not the same with the increase of the number of users , This is also the main reason why throughput is used to measure the performance of concurrent systems .

generally speaking , Throughput is a general indicator , Two systems with different user numbers and user usage patterns , If its maximum throughput is basically the same , Then it can be judged that the processing capacity of the two systems is basically the same .

Number of concurrent users

The number of concurrent users refers to the number of users who can use the system functions at the same time .

Compared with throughput , The number of concurrent users is a more intuitive but more general performance metric . actually , The number of concurrent users is a very inaccurate indicator , Because different user modes will cause different users to send different number of requests in unit time .

A website system as an example , Suppose the user can only use it after registration , But registered users don't use the site all the time , Therefore, only some registered users are online at the same time , Online users spend a lot of time reading the information on the website when browsing the website , Therefore, at a specific time, only some online users send requests to the system at the same time .

such , For the website system, we will have three statistics about the number of users : Number of registered users 、 The number of online users and the number of simultaneous users . As registered users may not log on to the website for a long time , Using the number of registered users as a performance indicator can cause a lot of errors .

The number of online users and the number of requests from colleagues can be used as performance indicators .

Compared with , It's more intuitive to use online users as performance indicators , It is more accurate to take the number of users who send requests at the same time as the performance index .

QPS Query rate per second (Query Per Second)

Query rate per second QPS It is a measure of how much traffic a specific query server handles in a given period of time , On the Internet , As a domain name system server, the performance of the machine is often measured by the query rate per second .

Corresponding fetches/sec, That is, the number of response requests per second , That is, the maximum throughput . ( It looks like TPS, It's just throughput applied to specific scenarios )

原网站

版权声明
本文为[Bulst]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206242001480317.html