Stress-testing your website or put your website under siege

Sometimes one just want to check the stability of a web application under heavy load to check whether all ressources are sufficient or just for finding the limits of a webserver. This especially applies if you have some fancy backend calls assoiated with a HTTP request. A small Linux utility named “siege” helps you make your life easy. Just set up a textfile with a newline spaced list of urls you wanna hit and invoke “siege” like:

siege -i -f urls.txt -t10M -c10

The urls in the file named “urls.txt” are hit randomly (parameter -i) for a time of 10 minutes by 10 concurrent users. The urls.txt file also allowes POST requests, which can be used to actually do e.g. a login on a webpage.  At the end of the test you’ll get a report like:

Transactions:                9438 hits
Availability:               93.39 %
Elapsed time:             1800.02 secs
Data transferred:           63.79 MB
Response time:                9.82 secs
Transaction rate:            5.24 trans/sec
Throughput:                0.04 MB/sec
Concurrency:               51.51
Successful transactions:        9439
Failed transactions:             668
Longest transaction:           34.06
Shortest transaction:            0.32

From which you can conclude the strenght of your system. The probably most important value is the availability! Everytime a site was not loaded (timeout in connection), a customer was not served in time. A DOS attack tries to minimise this value!

Leave a comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.