How simulate little stress attacks on your servers

This week I could make some WPO with a project that I worked and I found the httperf program, a little application that permit simulate a stress test from you pc to a server. It’s so good for make little stress attacks and check if the project go for good way.

What I so like of this program is, the attack is simulate from your local pc, and we can use for attack development servers that you can’t access from external connections and you can access from a local pc.

For install the httperf, is more simple, because the program is in of the most distributions repositories of linux, therefore only need search in the repository of your distribution and install it.

View Code SHELL
# yum install httperf
# apt-get install httperf

If you don’t find the httperf in your repository, you can try download and install from HP webpage (they have developed this application).

So an example that how run a stress attack:

View Code SHELL
$ httperf --server --port 80 --uri /index.html --rate 300 --num-conn 30000 --num-call 1 --timeout 5

The options that the httperf application permit:

–server: The hostname of the web that to attack.
–uri: The url of the web that to attack.
–rate: How many requests send by second.
–num-conn: The total number of connections that the program to be opened.
–num-call: How many requests send by connection.
–timeout: How many seconds the program wait before it considered that the request is lost.

And there is an example of the result of one attack:

Example of the result of one attack using httperf

Leave a Reply

Your email address will not be published. Required fields are marked *