In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "what is the method of designing and building the server stress testing environment". In the daily operation, I believe that many people have doubts about the method of designing and building the server stress testing environment. The editor consulted all kinds of materials and sorted out the simple and useful operation methods. I hope it will be helpful to answer the doubts about "what is the method of designing and building the server stress testing environment". Next, please follow the editor to study!
1. Factors to be considered in the performance environment
1.1 system logical architecture
The logical architecture of the system, that is, the composition of the system, the structure between applications, the abstraction of interactive relations. The simplest and most basic is the three-tier architecture.
Three-tier logical structure diagram
Client layer: user request side.
Web layer: handles all client-side business request logic and server-side data.
Database layer: maintain the data of business system.
A more complex logical structure states:
Any layer of a logical architecture may be on a separate physical cluster machine, or it is possible to share the same physical cluster across multiple physical machines or with other logical layers.
The arrows between logical architectures are data flows, not physical network connections.
1.2 physical architecture
The following figure is a physical architecture diagram.
1.3 hardware, software and network
Software: where the basic software and middleware are involved in the environment.
Hardware: physical / virtual machine, stand-alone configuration (CPU, memory, hard disk size), cluster size.
Network: internal network or external network, network bandwidth, whether there are cross-segment problems, whether it is isolated.
The software has an understanding of the middleware used in the system, which can not only help to design a more simulated stress testing environment, but also help to speed up the positioning and solution of bottlenecks and problems in the process of stress testing.
two。 Comparison of advantages and disadvantages of pressure testing environments with different performance
2.1 comparison table
No matter which kind of stress testing environment scheme, there are differences in the landing cost and the degree of meeting the demand. then the application of several kinds of pressure testing environment in Ali is introduced.
3. Subset of low-configuration production environment-finding performance bottlenecks in R & D phase
Since it is a low-configuration environment, it seems that the pressed data can not be used as a reference for the operation of the production environment, but in fact, the stress test in this environment is also a very important part. It is mainly reflected in the value of the project R & D phase.
3.1 value
Before the new application is launched, the bottleneck of the application code itself is found. The performance problems of the code itself, such as unreleased connections and too many threads, can be detected in advance by stress tests for a certain length of time in a low-configuration environment.
Apply dimensional baseline data. The running data cannot be used as an online reference, but if the performance test is run in the same low-configuration environment before each iteration and release, and compared with the low-configuration baseline data, it can also be used to measure the iteration of the system. Whether there is a reference for performance improvement or decline.
Help R & D to tune the performance quickly. The more complex the system is, the more difficult it is to locate when performance problems occur. Research and development of performance tuning have experience, sometimes tuning is to change a configuration, and then redeploy, run pressure test, to see if the results are improved, until the best configuration is found. If this process cannot be weighed lightly, it will be a nightmare for R & D optimization.
3.2 question
Build a low-configuration environment, which can be an ordinary test environment, completely isolated from the online environment. But to solve the following problems:
Stress testing will affect the functional testing of the test environment. This is easy to understand. High pressure may affect the functional test results of the same set of test environment, so the performance stress test environment had better be independent.
The basic application of dependency is not in the performance test. For example, the target business for stress testing is posting, which will certainly rely on the user-related business, and the user center is a basic application (of course, many small companies may not be independent of this business).
The branch to be pressed cannot be quickly deployed in the R & D phase. For an Internet company of a small size, a week's iteration may have multiple branches of the same application and need to support the rapid deployment of specified branches to the performance environment.
3.3 Plan
Ali has a complete system to support the performance stress testing requirements of thousands of R & D stages in Ali every day.
4. Subset of identical production environment-capacity planning
4.1 Challen
Capacity planning is a continuous process, how to reduce manpower investment, how to "unattended".
Cost and effectiveness balance: as close as possible to the online operating environment, while the data of capacity planning has a good guidance for online capacity layout.
Complete independence does not affect the online.
It can be run at any time, and the results can be tracked.
4.2 question
Capacity planning is not carried out directly in the production environment, because the final capacity ratio of the production environment is based on the data from self-capacity planning. The pressure test carried out in the production environment is the final acceptance stage after the completion of capacity planning.
Provide a separate subset of the production environment, the isolated environment, for the problems to be solved in capacity planning:
How the built environment set is defined, how the size and architecture are close to the online.
How does the traffic get to the isolated environment?
Does the data written in the quarantined environment need to be cleaned and how?
4.3 Plan
For the technical evolution of Ali capacity planning, please refer to the materials below for details [1]
Now the isolated environment is an important foundation in the latest capacity planning ecology. Only with the support of the isolated environment can we support the normal capacity planning and operation and continuous improvement.
First of all, refine the machine proportion. Based on the existing scale of online core applications, a scaled-down version of the complete model is extracted. That is, the ratio between online machines may be 5000 virtual 2000, and the overall scale is 100x. In an isolated environment, the machine ratio is 50:20:10. In this way, the same proportion of online machines is effectively guaranteed, and the cost is well controlled at the same time.
Second, determine the isolation target traffic. According to the target traffic on the next line, the traffic that should be supported by the isolated environment is calculated in the same proportion, which is used as the target traffic when the isolated environment is used to suppress and measure the traffic.
Then, through the pressure measurement flow from the small to the target flow to explore, while pressing while projectile.
Finally, collect the new machine proportion and data after the isolated environment reaches the target traffic. The proportional relationship between applications is likely to have changed, some applications may be reduced, some applications may be expanded, as a reference for online machine relationships.
Of course, there are a lot of technical details involved:
New application of full-link pressure testing: the whole pressure testing flow actually follows the full-link pressure testing mechanism of on-line pressure testing, with flow mark and data shadow sublibrary, so the data written in the isolated environment does not need special processing.
Environmental label isolation environment: the traffic will be accompanied by an "environmental label". Through the identification of the environmental target, the access layer will direct the traffic to the isolated environment, so as to achieve the environmental isolation of the traffic.
PTS pioneered the "RPS" model to exert pressure: we have abandoned the way that we have always relied on the highly sought-after "concurrency" in obtaining traffic data in the system as a whole. As we all know, the goal put forward by the business is to "peak support xxxx user login". When carrying out capacity planning, it is necessary to map the number of concurrent users to the QPS that the system can bear. Our capacity planning directly uses the "RPS" mode of Aliyun pressure testing platform (PTS). The QPS data obtained by pressing out is directly system-dimensional data without conversion, which further reduces the distortion in the conversion process.
Pressure while projectile technology: in the isolated environment pressure test, when to play the new machine, how many machines, how to control the whole process, which contains a complete set of precise algorithms. The diagram of the whole process is as follows.
5. Production environment replication-the advantages of the cloud era
5.1 Challen
There are many challenges facing replicas in production environments:
Among them, if you want to completely replicate the production environment, you will face the following challenges:
Copy the architecture of the server in the production environment
Copy the production environment network basic environment
Replicate all application layering of the production environment
Network bandwidth
Database and all basic data sets
Load balancing
.
5.2 question
For stress testing engineers in the traditional era, such a series of operations is to build a new "shadow system", which looks like an impossible task. To accomplish the above tasks, stress test engineers face great challenges:
Communicate and coordinate almost all technical departments (development, operation and maintenance, network, IT...)
If it is destroyed immediately, it will only be used once or twice, and the cost will be too high.
If continuous maintenance, it is obvious that the maintenance cost can not be ignored.
So we rarely see companies carrying out such "production environment replication" operations. Small companies may not have so much manpower to achieve, large and medium-sized companies, the cost is even more difficult to accept. But now in the trend of cloud trend, this kind of solution is beginning to show its superiority.
5.3 scenario
Let's first take a look at Aliyun's product architecture diagram.
Products and services are very rich, but it is not easy for us to understand and copy the online environment for stress testing. Specific to the landing of the system in a certain scenario in Aliyun:
For a summary of the cloud product architecture of netizens, please refer to the information below for details.
To build a minimum set of cloud applications, you should use:
SLB- is used for load balancing.
ECS- is used to deploy business applications
RDS- is used to store business data
If you want to copy the above online system on Ali Cloud.
Step1 buys ECS of the same size and configuration as the online cluster, and deploys applications
Step2 copy online RDS
Step3 SLB configuration new entry, pointing to the replication environment
Step4 starts online pressure testing
Replication in the production environment in Aliyun has the following advantages:
Easy to operate. Visual interface, the system needs to install the configuration configuration. For a moment, PTS, the stress testing service on Aliyun, will have the opportunity to build and destroy the performance environment with one click in the future, completely liberating the stress testing engineers.
The architecture information is clear. There is an "architecture awareness" function on Aliyun, which can intuitively draw the overall architecture of the business system on Aliyun. It is accurate and intuitive, and pressure testing engineers do not have to spend a long time combing the architecture of the system. They also face problems that may not be accurate.
Use and destroy, greatly save the cost. Copy a set of online environment, if it is a sufficiently complex system, using a large number of components, large traffic, the cost must be considered. The cost of building in the traditional era is high, and the cost of continuing to maintain and re-build is also high. But in the cloud era, it is the process of building and destroying by clicking a few buttons, paying by usage, and releasing after verification, which is very controllable for the waste of resources.
The machine ratio can be adjusted freely according to the situation: on Aliyun, it is obvious that it can also quickly replicate a subset of the low-configuration and identical production environment, which also has obvious advantages over the non-cloud system.
6. Production environment-platitudes
Ali's full-link pressure testing technology has been very mature, and has been widely promoted on-line pressure testing technology. Internet large and small companies have landed, here only summarized as a model diagram, want to know more details, readers can collect the following online, there are a large number of articles detailing the implementation process of their respective landing.
The following is Ali's classic full-link pressure test model diagram.
After years of development, the full-link stress testing system has been developed into and out of PTS, which can provide cross-industry general performance testing services to enterprises other than Ali. At present, PTS also provides traffic isolation solutions for external enterprises.
At this point, the study on "what is the method of designing and building the server stress testing environment" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.