The number of concurrent connections and the calculation of online numbers

Source: Internet
Author: User

In actual performance testing, the concepts associated with the number of concurrent users that are often exposed include "concurrent users", "System users" and "simultaneous online users", with a practical example to illustrate their differences.

Suppose there is an OA system with 2000 users-that is to say, the total number of users who may be using the OA system is 2000, the concept is "number of system users", which has an "online statistics" function (the system uses a global variable to count all logged-in users), From the online statistics function can be obtained, the peak of 500 people online (this 500 is generally referred to as the "number of simultaneous online"), then the number of concurrent users of the system?

         based on our definition of the number of concurrent users of the business, This 500 is the maximum number of business concurrent users used by the system as a whole. Of course, the value of 500 only indicates that 500 users logged in at the highest peak, not the actual server pressure. Because the pressure on the server is also related to the specific user access mode. For example, in these 500 users who "use the system simultaneously", consider a point in time at which 40% of the users are more interested in viewing the system announcement (note: "See" This action will not incur any burden on the server), 20% The user fills in the complex form (to the user fills in the form, only then will send the request to the service side in the "Submit" time, the filling process is not to the service side to constitute the pressure), 20% partial users in the daze (that is what also did not do), the remaining 20% users continuously from one page jumps to another page-- In this scenario, it can be said that only 20% of users really pressure the server. Therefore, as can be seen from the above example, the actual pressure on the server depends not only on the number of concurrent users, but also on the user's business scenario.

In the actual performance testing work, the tester is generally concerned about the number of business concurrent users, that is, from the business perspective should be set how many concurrent number is reasonable, so in the later discussion, is mainly for the number of business concurrent users to discuss, and, for convenience, The number of business concurrent users is referred to directly as the number of concurrent users.

(1) Calculate the average number of concurrent users: C = nl/t

(2) Peak number of concurrent users: C ' ≈c+3 radical C

In the formula (1), C is the average number of concurrent users; n is the number of login sessions; L is the average length of the login session; t refers to the length of the period of the visit.

The formula (2) gives the method of calculating the peak number of concurrent users, where C ' refers to the peak of the number of concurrent users, and C is the average number of concurrent users in the formula (1). The formula is derived from the assumption that the login session of the user is estimated to be in accordance with the Poisson distribution.

Instance:

Suppose there is an OA system, the system has 3,000 users, an average of about 400 users per day to access the system, for a typical user, the average user from logging on to exit the system in a day is 4 hours, in a day, the user only within 8 hours to use the system.

According to the formula (1) and the formula (2), you can get:

C = 400*4/8 = 200

C ' ≈200+3* radical 200 = 242


This article is from the "Nrain Growth Road" blog, please be sure to keep this source http://nrain.blog.51cto.com/11930278/1867171

The number of concurrent connections and the calculation of online numbers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.