Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to simulate DDOS/Slashdotting?

Tags:

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.

like image 638
Kevin Burke Avatar asked Mar 19 '11 22:03

Kevin Burke


1 Answers

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

  • ab
  • siege
  • JMeter


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.

like image 78
Pascal MARTIN Avatar answered Sep 30 '22 03:09

Pascal MARTIN