Distributed base (3) - the concept of performance-related system

In this paper, a reference from "large-scale Web Site Technology Framework: Core Principles and Case Studies," a book the third and fourth chapters, and other online articles, if any omission or mistake, forgive us and pointed. Thank you!

Here Insert Picture Description

Architecture is popular to say that "the highest level of planning, decision difficult to change," these plans and decisions laid the things in the future development direction of the final blueprint. In this sense, life planning is a framework. Choose what school, what to read, specialized, into what the company, looking for what objects, over how kind of life, all of life's architecture.
- "large-scale Web Site Technology Framework: Core Principles and Case Studies"

A core element of architecture

1, performance

Performance refers to is an important indicator of a system, according to research, the performance is inversely proportional relationship between the user and the system loss rate, unless it is not selected, users prefer otherwise excellent performance, responsive website.

2. Availability

Availability refers to whether the system can provide uninterrupted services available outside, such as the year 99.99% of the time can be used outside. It should be noted that 100% of the available system does not exist, we can only make the greatest extent possible to improve system availability.

3. Scalability

Scalability refers to the so-called application cluster when barely visited pressure, they can continue to expand by adding machines to the cluster, to improve performance.

Visit the site because the pressure is different each time period, usually a small access pressure, if too much of the machine will be set up cluster performance problem of excess; and in the promotion day, increasing the pressure on the server, this time they can add server approach to enhance the compression capabilities.

4, scalability

Scalability refers to whether the system can be used to quickly build out new features, whether existing reusable components on the basis of the original is available rapidly expanding business.

5, security

A released system will certainly suffer some attacks, so do security system in advance.

2. System performance concepts

1. The system performance under different viewing angles

For users, the performance of a site can be click on the required response time, but more needs to be professional from a developer's point is well broken down, so allow us to quickly know where the bottleneck of the system performance.

  • Performance of the user's perspective
    Here Insert Picture Description

  • Perspective developer performance
    properties should Perspective developer comprising: response time, number of concurrent throughput (TPS, QPS), system load, etc.

2. Common system performance

1. Response time

Here Insert Picture Description
In practice, if a single response time is very short, it may be by way of repeat requests, for example, 10,000 repeat request, each response time accumulating and dividing by 10,000, can obtain the response time per request.

2. The number of concurrent

Concurrent means that the system can withstand the number of concurrent users online. It can be used as a base load conditions. Performance of the system increases the number of concurrent moderate gradually in the case of a substantial decline in performance will then appear in a certain amount of concurrency, this point is called concurrency bottlenecks.

3. Throughput

Throughput refers to the unit of time, and the system can accept the amount of data processed correctly. Size determines how much the throughput per unit time of the system can handle requests.

May be described by a certain main TPS and QPS.

1.TPS

TPS namely Transaction Per Second, the number of transactions per second. Usually used to represent an interface (business-process-based), the number of transactions processed per second.

2.QPS

QPS That Querys Per Second, the number of queries per second. The number of requests is generally used to represent an interface (mainly to check), it can be processed per second.

4. The system load

The load is the system CPU usage, usually refers to the total number of processes currently being executed in the CPU, it is an important indicator reflecting the system busy state.

In the case of multi-core CPU, most perfect situation is all the CPU are being used, all processes are being executed without the process is pending.

Use the top command in Linux is available to view in one minute, 10 minutes, and the average number of processes running within 15 minutes:

Here Insert Picture Description

3. Performance Test Category

1. Performance Testing

Performance indicators system to the initial planning for the intended target, the system constantly pressured verification system resources within an acceptable range, whether it can meet the performance expectations.

2. Load Test

The system continue to increase concurrent requests has increased the pressure in the system until the system of a particular security or more performance indicators have reached the critical value, then if the system pressure continues to increase, the system's processing capacity will be steady or even decline.

3. Pressure test

In the case of system security over the load, continue to put pressure on the system, so that the server is down or the system can not provide services outside for maximum compression capabilities of the system under extreme conditions.

4. Benchmark

Benchmark is a performance measurement and evaluation software activities, establish performance benchmarks for a certain time, generally do not need to consider business processes, but directly to the interface or the service test, you can get more quickly to a variety of underlying compression performance of basic services (such as MySQL and Redis provides a benchmarking tool)

5. JMeter test

(Omitted here first, have a more in-depth study in the future to add)

6. Diagram

Here Insert Picture Description

Published 309 original articles · won praise 205 · Views 300,000 +

Guess you like

Origin blog.csdn.net/pbrlovejava/article/details/104928906