How to stress test e-commerce website
the 1th page: Background and face the challenge!
Nowadays, the electronic mall, online booking and online banking system are the typical cases of e-commerce website with the People's daily life closely. These systems cover a wide range of functions such as product promotion, merchandising, transaction settlement, service and customer feedback. When it is necessary to provide these services to a large group of people at the same time, performance considerations are often key to the successful operation of the system.
To a well-known domestic e-shopping site for example, the site has 30 million registered users, daily visits of up to 80 million, daily orders processing more than 300,000 single, daily turnover of billions of dollars. It can be imagined that system performance has a critical impact on the profitability of the site owner. Moreover, the performance optimization of the website not only can improve the user's access experience, but also can help the merchant to save the initial site construction cost and maintenance cost.
The performance optimization of e-commerce website can not be separated from the stress test of simulating real environment. And think Bollen communication is the expert in this field. In recent years, Si Bollen based on Avalanche e-commerce website testing solution has been for many customers to complete this aspect of testing, such as: A telecommunications operator Hospital line system, a well-known large-scale video portal product booking/snapping system, an authoritative TV media Brazil World Cup live program "XX win" mobile version. (The relevant test service needs can send mail to [email protected])
The challenges facing
(i) Complex systems
Is the structure of a typical e-commerce site.
Web servers, database servers, and application servers represent the core content of the site. Specifically, the front-end Web server is responsible for receiving and processing HTTP requests from the user and generating web page feedback to the user; The intermediary application server is responsible for executing the business logic; the background database and the file server are responsible for storing the user, product information and status. Some systems also deploy data cache devices before the database server to improve access performance. The perimeter firewall/ips is the primary network security component. The 4~7 layer Load Balancer acts as the application switch and is responsible for load sharing between the massive user access and multiple servers.
For this complex system, hundreds of thousands of servers and other devices are kneading together, in the face of massive user access, user behavior is inconsistent, some in the registration, some in the modification of the shopping cart, some in the checkout, and so on. Still ensures that the vast majority of users have smooth access is a challenge. In response, it is important and challenging to create a trusted test model. Evaluating the performance of a single component in a system is not complicated, but if you don't have a test tool that simulates massive users and emulates real-world user behavior, it's more like an impossible task to predict where the performance, bottleneck, or point of failure of this complex shopping site system is located.
(ii) Cost of failure
For e-commerce sites, system failures often mean high costs. A large shopping site, air ticket/hotel reservation system has an unacceptable page impact delay or denial of service, within one hours, you will lose millions of yuan of orders. Its negative impact on brand credibility may directly lead to a reduction in customer adhesion, this intangible loss impact more profound.
Moreover, the timing of the system failure is often the last thing a merchant will want to face. For example, a large sports event network ticketing system just online, a shopping site five anniversary of the time to Rob, a business network introduced summer discount package. These moments are the golden Gears of Fame and fortune for website merchants.
These gold schedule behind, often means a large number of users of sudden access, or more concurrent users, unit time users online fast.
(iii) Confusion about escalation
With the increase of users, the increase in traffic, e-commerce sites also have to face the growing pains.
On the one hand, the site wants to launch a richer feature to maintain its competitive edge while ensuring that more and more customers are still able to get a smooth service. On the other hand, site architects have to be thoughtful. Because, the site upgrade is not just a higher frequency of the CPU, add a few memory so simple. Can not be the remedy, blindly try not only to waste investment, but also wasted precious time to occupy the market.
The architect needs to make a decision and which components need to be upgraded? Or, what is the current bottleneck of the system: CPU processing power lag, resulting in complex dynamic pages can not be processed in time and deferred to the user browser? is the network bandwidth or disk I/O insufficient, resulting in a significant increase in page transmission latency? Or is the connection to the database not able to withstand the current number of concurrent users? It is foreseeable that the background database needs to be optimized, but it is useless to just be busy replacing the faster CPU with the foreground Web server.
It is noteworthy that, in the face of users, traffic can be expected to continue to increase, the system upgrade is not easy. Not to mention the face of those sudden situation? For example: The train ticket booking system during the Spring Festival is different from busy, shopping website shop discount in time to Rob, as well as the summer holiday Tide business travel website traffic surge.
Moreover, these emergencies often end in a short period of time, difficult to replicate in the real world. So that the site does not have enough time in the "actual combat" to find the bottleneck, and check the effect of the upgrade. If you wait until the next outbreak cycle to verify, the potential business losses are significant.
2nd page: Test method
Test method
As a powerful stress testing tool, Bollen Avalanche can help e-commerce websites find performance bottlenecks and points of failure by simulating real user access.
(i) Simulation of real users
Think Bollen avalanche simulate real user behavior. The implementation process is as follows:
1) Crawl Real browser users in the e-commerce site trading process Url,url include registration, login, product code, account and other information;
2) Import the crawled URL into the action list of the customer segment of the avalanche simulation, and modify it as needed, such as: 10,000 different users/passwords are extracted from the Avalanche database for landing;
3) Avalanche simulation clients can simulate different browsers and different versions. Supports cookies and can be used in conjunction with SSL for encrypted access;
4) The action list in avalanche is executed sequentially and supports conditional judgments, etc., for validation of the return value of the Web site.
Take a shopping site as an example, users visit the homepage and register, then automatically or manually landed, and then to buy. After the purchase is added to the shopping cart, through the online trading platform to complete the checkout (in the performance test, the checkout section can usually be performed by the developer in the avalanche after the execution of an action to return a specific value to simulate, rather than take the real payment process). As shown in.
Of course, in addition to the above major business processes, the site also contains other user behavior, such as: Users browse the different categories under the product promotion, modify or cancel orders, the user received the goods after the evaluation of products and services.
Avalanche simulation of the above behavior, such as: Landing, browsing, purchase, evaluation and so on. and can be in accordance with a certain proportion of the user's behavior, such as: 90% of online users from the browse home, 30% of the users click on the "Instant grab", 10% of the users placed orders, and so on.
(ii) Test topology
Avalanche can simulate millions of of concurrent customers and access e-commerce websites over the Internet. Test the topology as shown in.
In this topology, e-commerce sites can be evaluated as a whole, where the entire site is viewed as a "black box". You can also isolate one or several of the components in a Web site by using isolation methods after discovering the overall problem. For example, the caching device in the test system is valid for some pages, and the reason for the decline of the response success rate in the face of massive and promiscuous users.
3rd page: Test case (i)
Test case
Case one: Testing a telecom operator's large online cinema reservation/ticketing system
1. Test purpose
1) through the online cinema booking/ticketing platform performance testing, for marketing to provide a strong support and feasibility assessment, for the system expansion project to provide quantitative basis;
2) through the platform of the various subsystems (access, ordering, payment) processing capacity testing, detection of subsystems and end-to-end network service quality.
2. Test scope and requirements
This test mainly includes stress test and overload test. Testing requires simulating real-world user behavior and mingling in proportion to the specified behavior. The test covers business processes such as query, seat selection, order submission and payment, involving access subsystems, ordering subsystems, and payment platforms.
When user behavior is determined, avalanche increases or decreases the pressure on the system under test by adjusting the user's size, such as number of concurrent users or transaction rate.
At the end of the run and after the test, Avalanche provides status statistics and results from network traffic, to TCP, to application transactions at all levels. As shown in.
In the actual test, the user tested the entire system, as shown in the following table.
In addition to end-to-end testing, each subsystem is evaluated separately, including: Access subsystem, ordering subsystem and payment subsystem. For example, the following table shows the result statistics for the access subsystem.
3. The value of testing
After testing with the Bollen avalanche, the feedback from the user is as follows:
1) Avalanche configuration simple, soft, hardware combination, no need to use multiple pc/server at the same time to deploy a user behavior simulation software, a simulation software configuration takes about a week of debugging cycle, and avalanche configuration debugging process only need half a day;
2) The test process is true and effective; Through the server-side log, user database parameters change and return the result value, the Avalanche test instrument to verify the true validity of the request;
3) The pressure test reflects the actual results of the current network. Using pc/server + some simulation software to simulate a large number of concurrent users to do performance testing, no server performance bottlenecks found. But during the Christmas period last year, my system was repeatedly paralyzed by a large number of users logging in and paying, and using avalanche to easily reproduce this series of problems.
4) Rich test results to help developers quickly locate the problem, through the error Code, client independent statistics, TCP results and other comprehensive analysis, developers can quickly in the event log to find the cause of the problem.
4th: Test Case (ii), (iii)
Case TWO: Product reservation/snapping system stress test for a famous large video website
1. Test purpose
The performance of the website system is tested before the product reservation and buying activity begins, and the system bottleneck is found through the stress test, which helps to optimize the system and ensure the smooth progress of the reservation/snapping activities.
2. Test scope and requirements
This test is a stress test, designed to the website system login module, booking module, snapping module and payment module. To test the performance of each module and the performance of the entire system, the system bottlenecks and weaknesses are measured.
You need to simulate a large number of real user simultaneous operations to see the trading success rate and page response time. At the same time ensure that the system in the case of stress testing in a timely manner, will not produce unknown errors affecting the site user experience.
3. Value of the test
In the stress test, the website system login module, snapped module and payment module backstage all appear error message. A number of problems have been identified by location, such as:
1) Background database system has a slow bottleneck, which affects the response speed of each module;
2) in the case of a module pressure test, you need to find the cache processing and go to the database;
3) There are bottlenecks in the login module, a large number of users on-line synchronization of the master-slave system problems, resulting in an appointment failure;
In the stress test, will produce the relevant overall results, but also statistical network system generated in the two to seven layers of detailed results, for the system problem analysis and positioning of a great help. Such as:
In the Bollen avalanche help, not only to help users quickly locate the system bottlenecks and problems, and, after the user solves the problem and again to verify and tuning, very good protection of the appointment/snapping activities, to ensure that the system finally on-line, the user's good access experience.
Case three: An authoritative TV media Brazil World Cup live program "XX win" mobile version
1. Test purpose
Facing the potential huge number of mobile phone fan users, Brazil World Cup "xx win" program on the line before the system bottleneck search and performance optimization.
2. Test content
Use the Bollen avalanche to simulate a large number of mobile users accessing the "XX win" website. For the "XX win" each mobile phone access interface, such as registration, verification, landing, answer questions, simulation of a large number of World Cup fans registration, verification, landing and answer behavior, the system carried out a different scale of stress testing. Not only the simulation program of the smooth audition period, but also the simulation of "XX win" and the TV live synchronization of the peak burst period after the start of the answer program, not only simulated different mobile phone number and verification code, but also the site's return results of the keyword search and judgment.
3. The value of testing
The website's registration interface and the answer interface, under the specified user scale simulation, the research and development personnel originally thought that can the smooth access situation, all discovered the obvious performance obstacle. With the repeated testing of the Bollen avalanche, the developers solved the problem of the existing code and the design of the data caching service. Make a significant contribution to the smooth access of the system during the World Cup broadcast.
How to stress test e-commerce website