4

Has anyone experience of load-testing a web application hosted on Amazon-EC2 by using the JMeter that is also hosted on Amazon EC2 instance (separate instance).

Please share best practices and tips while doing so. I am specifically interested if it will have any negative-impact on 'results' since both are hosted on Amazon EC2 instances (using same regional zone).

2

There shouldn't be any negative impact, it's even better - you won't have to worry about network issues and bandwidth. Just make sure that you follow JMeter best practices, to wit:

Also if you're using Elastic IP or other load balancing mechanism make sure you add DNS Cache Manager to your test plan.

  • Thanks for confirming. That is what I was looking for. I am using Elastic IPs but I dont think there is any load-balancing involved. However I will further check on it. Thanks for sharing all the info. – TestingWithArif Dec 12 '15 at 16:18
1

Most of my clients use AWS and I perform load testing without issue. Note that doing it from one source your network/bandwidth/router/adapter could be the bottle neck. It would be best to spread out the load over multiple machines/networks for more accurate results. What you are most interested in when doing these tests is how the server reacts to the load and not necessarily the response times on the client side. With AWS you can put on monitoring tools to look at the CPU/RAM usage while under load. If the CPU/RAM is being heavily tasked, increase your instance size to see if that helps. You should also have monitoring on your RDS/DB. CloudTrail can inform you of slow queries.

  • I agree that multiple instances of JMeter can give better results as compared to single instance. I am already working to implement distributed JMeter testing over AWS. Also I would look into CloudTrail. Thanks for your answer. – TestingWithArif Dec 12 '15 at 16:16
1

Following what Kirbycope mentioned, it is a good idea to profile the response time at two levels i.e:

  1. How long finishing the process takes within the application e.g. it takes 2 ms to update a record.
  2. How long the whole API call takes to finish (from sending the request to receiving the response) i.e. previous time + network e.g. 50 ms.

More points:

  • Most probably for the 1st layer you need to profile the response time from within your application and keep the duration somewhere, e.g. Header.
  • The 2nd layer is measured by most of the Test Performance Tools like JMeter.
  • Don't be surprise if the majority of time is spend on Network etc (not layer 1).
  • As the consequence of the previous point, closer you test hosts to the application, better response time you get. Consider where the service consumers are located.
  • Although AutoScaling supposed to be the safety net for applications on AWS, don't forget that bringing up a new instance is not a boolean! You might be interested to monitor the behavior of your application then. In this direction I think some Infrastructure Reliability Testing is worth. For example have a look at Chaos Monkey.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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