I have been trying to set up Apache JMeter remote testing the last few days. JMeter remote testing enables users to view the test results on a client machine while the traffic is generated from one or more other servers. It is useful when you want to view the test result on a lower spec server and generate huge amount of traffic with a higher spec server or a cluster.
Initially, I was hoping that I can set up the JMeter server on AWS EC2 and the client on my laptop. Unfortunately, that didn’t go well and I was having inconsistent error messages. After that, I tried to set up on both of my laptop. I have googled for solutions and tried changing the port numbers for the server and rmi, turning off the firewalls on both sides, and telnetting to each other. And I was having a socket error message. My third experiment was to set up this remote testing on two EC2 (Windows Server 2008 R2) instances and it finally works. Below are the steps that I took to set up JMeter remote testing.
Launch two EC2 instances
Download and install JDK, JRE, JMeter (binary package) on both instances. JMeter requires JVM 1.5 and above.
On the server, double click the jmeter-server.bat in [JMETER_HOME]/bin folder. A command prompt window similar to below will pop up.
On the client side, you need to add the IP address of the server to the “remote_hosts” property in the jmeter.property file in [JMETER_HOME]/bin folder. You can use either private IP address or the public IP address but the public IP address changes every time you restart your instance. To start the JMeter client with GUI, double click the jmeter.bat in [JMETER_HOME]/bin folder. After adding a simple thread group with a listener, we can start the remote testing by selecting the IP address of the JMeter server from the Remote Start menu.
After you start the test. You should see a message similar to the one below shows up on the command prompt.
On the server side, you should receive the messages for starting and finishing the test.
I am happy that I finally have it set up after many tries. I still don’t know if there are fixes for my first two tries. Please leave a comment if you have the same issues or know about how to fix them.
My most important task for this semester is to finish my senior project which is building a software to test and monitor the performance and scalability of a SaaS application on Google App Engine. It is a very exciting project in many ways. First, cloud computing is one of the hottest topics and more and more people are using cloud services. The next thing they want to do is to monitor what they are spending on. Amazon provides Cloud Watch but it’s a paid service while Google app Engine only gives you a dashboard. Even though Appstats, a third-party monitoring plugin for GAE, is easy to install with your application, it only gives you a couple of metrics for each request which is not very useful for analyzing the performance and scalability. So there is a huge market demand for a third party tool that can analyze the results of different testings based on some calculated models with extensive metrics of the application and that is what we are working on.
There are many differences between GAE and AWS because GAE is PasS model while AWS is IasS model. Here is my other blog post about cloud computing in general if you want to know more about different models. AWS gives you a virtual machine that you can remote log in to and install anything you want. GAE is providing a platform that supports Java, Python, and Go to host your application. If you just want to host your Website or other Web applications, you should definitely use GAE since you can deploy your application instantaneously with the Eclipse plugin. If you need to use AWS, there is some overhead for initial setup of your EC2 instance mainly for security reason but you will be able to control the whole environment. In fact, the biggest challenge for our project is knowing what we cannot do in GAE and overcome these limitations.
As cloud services providers, both GAE and AWS give you a software stack including database, mailing, and APIs. Take database for example, GAE is based on Big Table which is a well-known distributed database used by many of Google applications. AWS provides SimpleDB (S3) which is also a non-relational data store. Also, they both provide free account with limitations. GAE has a daily usage limit and it’s controllable if you have a new and not that well known Website. AWS Free Usage Tier only applies to their micro Linux server with limitations on monthly usage. So if you have a Windows server with AWS, you will be charged on a hourly basis regardless of the usage. All in all, they are both worth exploring if you want to experience the benefits of cloud computing.