Tutorials focusing on Linux, programming, and open-source

Stress Testing Web Server

Sometimes it's worth knowing how well your web-server will cope with a large amount of demand. Especially if your expecting some large sale, or you want to see how much of an improvement your new load balancing system will make.

Luckily enough for use there is already a tool called Apache Bench to do this for you. For example:

ab -n 1000 -c 20 http://my-site.com

-n 1000 specifies that a total of 1000 requests should be made.

-c 20 specifies that 20 requests should be made concurrently (simultaneously) at a time (this is perhaps the most important factor).

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites. More info.