System capacity Estimation

Source: Internet
Author: User

A few days ago, the concept of PV and concurrency, also probably explained the concurrency, bandwidth and other indicators of calculation. Interested friends, you can look at my previous article: "Talk about PV and concurrency." I'll talk about it today. Capacity estimates.

E-commerce company's friends, whether such a scene is familiar:

Operations and products The mysterious run came to ask:

We have to do a promotion at night, the server can withstand it? How many machines do I need to add if I can't carry it?

As a result, technology is a face of crazy.

In fact, these are the problem of system capacity estimation, capacity estimation is one of the necessary skills of architects. The so-called capacity estimation is actually the maximum amount of traffic that the system can withstand before it is down. This is an important indicator of the ability of the technician to understand the system. Common capacity evaluations include a range of content such as traffic, concurrency, bandwidth, CPU, memory, disk, and much more. Let's talk today about capacity projections.

E-commerce Summary e-commerce Summary (vi) System capacity estimates summary: A few days ago, the concept of PV and concurrency, also probably explained the concurrency, bandwidth and other indicators of calculation. Interested friends, you can look at my previous article: "Talk about PV and concurrency." I'll talk about it today. Capacity estimates. E-commerce company's friends, whether such a scene is familiar: operations and products mysteriously ran over to ask: we have to do a promotion at night, the server can resist? If not, how many machines need to be added read the full text posted @ 2016-09-07 08:51  chapter for Zhong Read (611) |  Comments (2)   editor   e-commerce Summary (v) Mobile m Station Construction Summary: I've been working on M stations recently, which is the mobile Web site. Because it is the first time, also encountered a lot of problems, so the recent understanding of the things summarized. Talk about what a mobile m station is, what it does and how it's advantageous. Some people will ask, what is the difference between M station and app? 1. The APP directly on the user's mobile device, the exposure rate is relatively high. and M station needs to open the browser, enter the address to access, so the exposure rate is relatively low. Read the full text posted @ 2016-04-18 18:32  chapter for Zhong Reading (728) |  Comments (9)   editors   E-commerce Summary (iv) Picture server architecture based on shared storage summary: In the current era of the Internet, No matter what kind of web site, the demand for more and more pictures, especially in the e-commerce website, almost will face to the massive picture resources storage, access and other related technical issues. In the image server architecture, expansion, upgrade process, will certainly encounter a variety of problems, a variety of needs. Of course, this does not mean that you have to get a special NB Image service architecture, simple, efficient, stable on the line. So read the full text posted @ 2016-03-08 18:29  chapter for Zhong Reading (1128) |  Comments (+)   editors   E-commerce Summary (iii) the master-slave architecture of the building database abstract: During this time, has been summarizing the relevant basic technology and architecture of e-commerce system, wrote a lot of things. But still found a very important, very basic aspect is not mentioned, that is the database read and write separation of the master-slave architecture. Perhaps after the development of a large mature company, the master-slave architecture is outdated and replaced by a more complex database cluster. But as a small e-commerce company, the master-slave architecture of the database should be the most basic. Any large system rack read the full text posted @ 2016-03-03 18:24  chapter for loyalty Reading (2305) |  reviews (+)  Editor   e-commerce Summary (ii) Log and Monitoring System solution Summary: The previous article chatted to the small e-commerce website system architecture, and then a friend asked me, inside the log and monitoring refers to what, so, today to talk about this problem. Monitoring system is mainly used for server cluster resource and performance monitoring, application anomaly and performance monitoring, log management and other multi-dimensional performance monitoring and analysis. The importance of a perfect monitoring system and log system for a system do not need me to say, in a word, only real-time read the full text posted @ 2016-02-24 18:21  chapter for loyalty Reading (2065) |  Comments (7)   Editors   E-commerce Summary (i) Small e-commerce website Structure Summary: Another year end, this year, from the traditional software industry into the e-commerce enterprises, is a career change it. At first, I feel that the e-commerce site has no technical content, and there is no threshold, are some of the existing things piled up like piles of wood. However, after really entering the industry, it is not that. Remember someone said that good architecture is evolved. E-commerce website architecture is the same, now a fantastic e-commerce website, seemingly read the full text posted @ 2016-02-01 18:21  chapter for loyalty Reading (3561) |  review (+)   Edit

  One, several important parameters

QPS: number of requests processed per second

Concurrency : number of requests processed concurrently by the system

  Response Time : Average response time is generally taken

Many people often confuse concurrency with QPS, understand the meaning of the above three elements, and can deduce the relationship between them: QPS = concurrency/average response time

Second, the steps and methods of capacity evaluation

1: Estimated total traffic

How do I know the total number of visits? What is the best way to assess an operation's traffic, or to evaluate a system's on-line PV?

The simplest way is to ask the business side, ask the students to run, ask the product classmate, see the product and the operation of the flow estimate of the activity.

However, the business side of the estimate of traffic should be two indicators, PV and user access number. Technicians need more of these two data to calculate other related indicators, such as QPS. Specific how to calculate can refer to my previous article PV and concurrency.

2: Estimated average QPS

      Total number of requests = Total PV * page-derived connections

Average QPS = Total number of requests/total time

For example: The total number of visits to the active page within 1 hours is 30w PV, which has a derivative connection of 30, then the average QPS of the landing page

(30w * 30)/(60 * 60) = 2500,

3: Estimated peak QPS

System capacity Planning, you can not only consider the average QPS, but to resist the peak of the QPS, how to assess peak QPS?

This is based on the actual business assessment, through the previous marketing activities of PV and other data to estimate. In general, the peak QPS is about 3-5 times the mean QPS, and the average daily QPS is 1000, so the peak QPS is estimated to be 5000.

However, some businesses such as "kill the business" are more difficult to assess the volume of business visits, and the capacity evaluation of such a business is not discussed here.

4: Estimated system, single machine limit QPS

How to estimate a business, a server single-machine limit QPS?

This performance indicator, is the server, one of the most basic indicators, so there is no other way, is the stress test. Through the pressure test, the server's single-machine limit QPS is calculated.

Before a business goes live, stress testing is generally required (many startups, the business iteration system may not have this step, it's tragic), the app pushes a campaign for example (estimated daily average QPS 1000, peak QPS 5000), the business scenario might be:


1) Push an active message through the APP

2) Operational Activities H5 Landing page is a Web site

3) H5 floor-to-ceiling pages are assembled from cache caches, database DB data

Through the stress test found that the Web server can only resist 1200 Qps,cache and database db can withstand the concurrency of pressure, (generally speaking, 1% of the traffic to the database, the database of the QPS can be easily anti-live, the cache word QPS can resist, need to evaluate the cache bandwidth, This assumes that the cache is not a bottleneck, so that we get the Web single-machine limit of the QPS is 1200. In general, production systems do not run full limits, which can easily affect the life and performance of the server, allowing a single line to run to QPS 1200 * 0.8 = 960.

Extension said, through the stress test, already know that the web layer is a bottleneck, you can make some adjustments to the web-related optimization to improve the Web server single-machine QPS.

Also, in the stress test work, the general is a specific business perspective of the stress test, is concerned about a specific business of the concurrency and QPS.

5: Answer the first two questions     

Required machines = Peak QPS/single-machine limit QPS

Well, the above has got the peak QPS is 5000, the single-machine limit QPS is 1000, the online deployment of 3 servers:

(1) Can the server withstand? ---peak 5000, stand-alone 1000, 3 units on line, can't carry

(2) How many machines do I need to add if I can't carry it? 2 additional units, 1 units in advance, to 3 sets of insurance

third, the last

Above, just a few personal experience sharing, there is nothing wrong place, everyone tap to shoot bricks, there are better suggestions welcome reply,,

System capacity Estimation

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.