5

I'm looking for a tool/framework (preferably in Java if it involves coding) that allows me to load test a server. I need to be able to launch multiple EC2 instances, hit the server hard for a period of time, log the response times to something that can be graphed (i.e. CloudWatch?), and then shutdown the instances. Automation for the tests is also needed.

I haven't had a lot of experience with load testing - I've tried out using the Jmeter GUI for a very simple test to hit a URL, and I've been researching how Grinder works. Could either of these allow creation/shutdown of EC2 instances in their tests? Is there a better option out there to do this?

Thanks.

2 Answers 2

6

Before anything, I would recommend you to think about an important point:

What is the main purpose behind your test?

Try to define your SLO/SLIs first (KPIs).
For example if the KPI is "throughput", then you need to think about what should be your scaling policy and allow Autoscaling to do the Adding/Removing instance job for you.

Obviously you can Add and Terminate the instances using different tools but at the end, most of them will use AWS client to do it.
So, if you want everything to be automated, my suggestion would be a Scala test which uses:

Gatling + AWScala to prepare and shutdown the stack and instances.

By this, you can create your stacks, monitor the response time both on Gatling and also for example at ELB levels on CloudWatch.

Last but not the least, Load Tests are usually expensive and is not happening very often, so maybe you don't need everything automated. Just create the stacks manually as you wish, define the scaling policy and then do the Load Testing and monitoring.

2
  • 1
    Exactly. When you load test EC2 you are testing if AWS works as advertised. I would assume that Amazon spends hundreds of thousands of USD to test that, so all you need to do is to test few times if you understand and configured it correctly. Not a daily task. Nov 10, 2017 at 15:10
  • Thank you for your answer! Your answer definitely makes sense - I also thought autoscaling should take care of creation/removal of instances. I realized I've misunderstood the requirements I was going for, but I'll post that as a separate question if needed.
    – syim
    Nov 10, 2017 at 15:57
0

There are several ways you can kick off and terminate an AWS instance, to wit:


If you're looking for a code-based load testing tool you can also check out Gatling which provides Scala-based DSL for creating the load.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.