Teach you web server stress test

  
                  The Web server is built on the line, and it can carry large amount of traffic, response speed, fault tolerance and other performance indicators, all of which managers are most interested in knowing and worrying about. How do you know all this? It's a good idea to do web stress testing with tools. It can effectively test performance indicators such as the running status and response time of the web server.
First, the test environment:
hardsoft: CPU: Athlon XP2500+, memory 512MB, hard disk 80GB
Server OS: Windows Server 2003
IIS: 6.0
BBS: Mobile Network 7.0
IP : 192.1681.20
Tool:Web Application Stress Tool
Second, tool introduction
There are many tools that can be used for web stress testing, such as Microsoft's Web Application Stress, siege under Linux, and full-featured Web. -CT, etc. These are very good web stress testing tools. While these tools give us the convenience of testing server affordability, they are “double-edged swords”, and attackers can use a more comprehensive testing tool to launch a catastrophic rejection of a small Web server. Attack.
The author will use Microsoft's Web Application Stress Tool (WAST) as an example to conduct a web stress test. This is a set of tools developed by Microsoft's website testers to perform actual website stress testing. Through this powerful stress testing tool, managers can perform tests in real-world situations before the actual line of the website to identify potential problems of the system and further adjust and set up the system.
Third, tool settings
Download and install WAST, the process is simple. Then run WAST to see that the interface is very concise, before you stress test the target web server, you must first make some necessary settings.
1. Set the number of parallel connections
Click on the left side of “Defaults→Settings” to open the settings panel. Make parallel connection settings under Concurrent Connections. Stress level (threads) is the least threading, and Stress multiplier is the largest thread. The thread here is how many threads are used by the specified program in the background, which is equivalent to how many clients are connected. Generally, 500~1000 is filled, because the number of threads is set according to the tolerance of the machine. If you are If your machine configuration is confident enough, you can set it higher. (FIG. 1)

FIG. 1
2, set the duration in
& ldquo; Test Run Time & rdquo; stress test is used to specify the required duration, divided into days, hours, minutes, A few unit levels in seconds, such as we set to 1 hour. (FIG. 2)

FIG. 2
3, the remaining settings
& ldquo; Rpquest Delay & rdquo; delay time is set, we set the 100 to 500. “Suspend”Setting the setup suspension time, Warmup time is the initialization test run time, and cooldown time is the test time of the specified end phase. Bandwith” specifies a bandwidth bottleneck that allows you to simulate the network bandwidth from a 14.4 Kbps modem connection to a T1 (1.5 Mbps) Local Area Network (LAN) connection. Redirects sets the redirection time, “Throughput”Sets whether the user, password page status save, etc. is enabled, “Name resolution”Set whether to perform name resolution. All of the above options can be set according to your needs. After (Figure 3)

Figure 3
four
stress test set can be completed stress test, test steps as follows: Step
: & ldquo click on the toolbar; The new script” button creates a new test project by clicking the "Nanual" button in the panel that opens. In the open window, set it, fill in the IP address of the server to be tested in the server in the main option, here we fill in 192.168.1.20, select the test web connection method below, here the way Verb select get, path Select the path of the web page to be tested, fill in the /Index.asp page of the home page, WAST can set more Path. (FIG. 4)

FIG. 4
Step Two: & ldquo; Settings & rdquo; Function number provided in the Stress level (threads) thread to 1000. When you are done, click the gray triangle button in the tool to test. During the test, we can see that the CPU usage has reached 100% from the task manager of the server, and the loss rate reaches the maximum. Using the command netstat -an in the CMD window, you can see that the client's IP address is very much connected to port 80 on the server. See Figure 6, and the Web site has not been opened, prompting too many users to connect. (Figure 5) (Figure 6)

Figure 5

Figure 6
Summary: Web stress test, administrators have a rough grasp of the compression capability of a Web server, thereby Server hardware extension can be performed according to actual needs, and it also provides a basis for system settings and software selection. In summary, it is necessary to conduct stress tests before the official release of the Web server.

Copyright © Windows knowledge All Rights Reserved