I have a PHP application which I have running on Amazon’s Web Services. It’s a relatively simple PHP script which basically does a simple write to an SQL database. This Database is an Xtra Large RDS instance. The PHP is running on a large EC2 instance behind a load balancer.
What I would like to do is to stress test my script to simulate about 800 users all connected at the same time (yes, that truely is the estimate).
I have heard about Siege, but I wasn’t sure how to go about using it to test my application. If I try running it from my connection at home, I’m not sure that my PC / ADSL is even fast enough to create enough traffic to simulate 800 users attacking the EC2s (thus the RDS) all at once.
Is it advisable to start another EC2 instance in another zone to simply “Siege” my application? Or perhaps running 2 EC2 instances, both sieging with 400 users each!?
One hope that this would test the load balancing, the RDS and the EC2s thoroughly.
Does anyone have experience with this kind of high-concurrent-user testing?
Andy
I wrote a script that might help with what you need, details here, source here.
But first of all, and really, this is the most important thing, you need to consider what defines a ‘user’. Whilst it might seem obvious in descriptive terms, in technical terms you need to start to talk about requests per second.
Now that bug bear is out of the way, to run load tests against Amazon using ELBs there’s a couple of things you might want to know about.
At this sort of load you’ll very likely need to ask Amazon to ‘pre-warm’ things. Last time I looked into this I found that an ELB is essentially a software load balancer running on a simple instance. Like all things, these instances have a throughput limit and tend to max out at around (very vague) 40 requests a second. They will autoscale but the algorithm for this is not suited to load testing so pre warming is Amazon spinning up X ELBs beforehand where X is based on the information you provide to them in your request (see my first point around requests per second, not users).
ELBs can cache DNS which in load testing can cause issues. If your test tool is java based (like JMeter) use: -Dsun.net.inetaddr.ttl=0
Whatever solution you opt for, be very aware that your test itself can become the bottleneck, you should check for this first before blaming the application you’re testing.