How to simulate DDOS/Slashdotting?

Kevin Burke picture Kevin Burke · Mar 19, 2011 · Viewed 12.4k times · Source

So, I'd like to get more experience working with high-traffic websites, but unfortunately the Internet is not beating down the doors to my blog.

How can I simulate tens/hundreds of hits per second on my blog and test its performance? I'm hosting my blog with an SSH account on a shared server.

Answer

Pascal MARTIN picture Pascal MARTIN · Mar 19, 2011

You can send lots of requests to your server, using tools such as :


The first one, ab, will only allow you to send lots of a requests to a single URL -- which is great to benchmark a single script / page ; but doesn't reflect the real pattern of a user browsing your website (CSS/JS/images don't get loaded, for example).

The second one, siege, will allow you to send requests to a list of URLs, specified in a text file -- building that list of URLs properly (there is a proxy for that) will get you some not too bad tests.

And the third one, JMeter, will allow you to create more complex scenarios.
That one is more complex, and you'll need a bit of time to use it -- but that's probably what will get you the best results.