"It's one thing to get your Web application to do what you want to do, and getting them to do it quickly and efficiently is often another matter." ”
In this article I will briefly discuss the "performance of Web Applications" issues, mainly some basic concepts and tools, which is a trigger! Note that these contents are also applicable to the Java EE application. After that, maybe I'll write more articles about this.
First, there are two key performance indicators. Please note that the following "definition" is not a specification and is for informational purposes only.
* Response time-response times
The time taken from initializing the request to completing the response. This is an important metric for testing the speed of a Web application.
* Scalability-Scalability
The response time of a scalable application increases linearly as the load increases.
No Web application can handle an unlimited number of requests, but generally we can predict a range and ensure that our web applications can "gracefully" scale within this range, always keeping response times at an acceptable level.
If we are going to optimize our web application, at least we should know whether it should be optimized or not. Stress tests can answer this question.
* Load Test-stress testing
The process of simulating a user request for a Web application to measure its scalability. It is very useful, although at the beginning will feel a bit "abnormal". In general, we simulate a large number of user requests to get the number of concurrent requests that can be processed before the speed of the Web application deteriorates to an unacceptable level.
The so-called "unacceptable level" does not necessarily have to go to the instance pool crash, the application server is paralyzed, or even the server is on the machine, depending on the requirements.
General stress tests include the following steps:
* Determine the maximum allowable latency to accept the request and complete the response.
* Estimate the maximum number of concurrent users for the Web application.
* Simulate user requests, start with a relatively small load, and gradually increase the number of simulated users until the corresponding delay in the Web application exceeds the maximum latency.
* If the load is smaller than the estimated number of users, then you should optimize the Web program, otherwise you will perform optimizations selectively.
You're not thinking about writing a test program yourself, are you? Forget it, why reinvent the wheel again? Here are a few stress testing tools, each featuring a free introduction:
* WEB application Stress Tool, Microsoft, http://www.microsoft.com
* JMeter, Java Apache Project, http://www.apache.org/
* Loaditup, Broadgun Software, http://www.broadgun.com