Windows Apache AB Installation and stress testing

Source: Internet
Author: User

AB is the abbreviation for apachebench.

The AB command creates multiple concurrent access threads, simulating multiple visitors accessing a URL address at the same time. Its test target is URL-based, so it can be used to test the load pressure of Apache, as well as other Web servers such as Nginx, Lighthttp, Tomcat, and IIS.

The AB command is very low on the computer that emits the load, and it does not occupy a high CPU or consume a lot of memory. But it will cause a huge load on the target server, which works like a CC attack. You also need to be aware of your own testing, or too much load at a time. May cause the target server resources to run out, serious even causes the panic.

One: Installation

Download: http://httpd.apache.org/download.cgi

Select Files for Microsoft Windows

Can be directly selected Apachehaus

Unzip the file into the local folder, if it is not unpacked in the C drive, you need to set the parameters:

I extracted to the D disk, need to set parameters, conf->httpd.conf using a text editor to open,

There are three places that need to be modified:

A:

Run the root directory and modify the path to the local decompression

B:

Listening port, the default listening port is 80, if it has been used will be an error to modify, if the 80 port is not used, can not be modified, if the listening port is modified, you need to change the servername localhost to the same port number

C:

DocumentRoot test file is stored, and the directory must exist

After the configuration is complete, go to the D:apache24/bin directory, press SHIFT and right-click, choose here to open the command window

Run Httpd.exe-k Install

* How to start and close?

The first use of services.msc, find apache2.4, you can click on the left to restart, close; the second can be started with a command: Httpd.exe-k start

Two: Test

Ab-n 2000-c Http://*:8000/recommend?companycode=param

-N: Number of requests

-C: Concurrency number

Param:post you need to pass the parameters

*: IS IP address

Windows Apache AB Installation and stress testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.