February 23, 2009

Pylot - Web Load Testing from Amazon Elastic Compute Cloud (EC2)

I have been playing around with Amazon's Elastic Compute Cloud (EC2). It allows you to provision virtual machines on-demand and configure and control your own compute clusters. To do external (over a WAN) performance\load testing against your web application or services, you can put together a cloud based test harnesses using some simple tools. My open source tool Pylot does the job well for simple web performance and load tests. Pylot generates concurrent load (HTTP Requests), verifies server responses, and produces reports with metrics. Tests suites are executed and monitored from a GUI or shell/console. You define your test cases in an XML file. This is where you specify the requests (url, method, body/payload, etc) and verifications.

It is incredibly easy to provision an instance and launch a virtual machine using the EC2 console. Once you have it up and running, you can just connect to your new virtual machine (via RDP or SSH) and get started.

Here is a screenshot of my terminal session using Pylot (click to enlarge):

You can see I took the following steps:

  1. remotely login to the EC2 instance using SSH and my private key
  2. download Pylot using wget
  3. unzip the distribution
  4. change to the Pylot directory
  5. launch the default test with 1 agent (virtual user)

Thats it! I ran a test today doing 1500 Virtual Users from one instance of 64-bit Fedora Linux, and it took me about 5 minutes to get it setup and running. Python 2.5 is already installed on the image, and no further configuration is needed to run a basic test. To run the Pylot GUI and generate results graphs, you need to install wxPython and Matplotlib.

You can upload your own test case files and run any load test scenario you want. Don't forget, you can create and save your own machine images and launch as many as you want to run a large distributed test.

I'd like to build some tools to make this easier and to create preconfigured machine images for other people to start with. It needs common results collection and remote control of user agents. I'm thinking of a cluster of virtual machines all running Pylot, each running thousands of virtual user agents. EC2 provides the ability to place instances in multiple locations, so this could be used to create a massive geo-distributed test bed with capacity on-demand.

More soon...


Anonymous said...

I found the description a little tricky to follow. For anyone else who also does, this is a tool for setting up and running CLIENTS that hit your publicly accessible web service. I was briefly confused and thought it was a tool for testing your service deployed on EC2.

Corey Goldberg said...


thanks for the clarification. you are right. this is how you run virtual client users (synthetic requests) to test load test a public facing website.

Anonymous said...

That's so cool! I also ran some software on a standard linux distribution and it just worked once!

Todd said...

Adam over on OpenQA is really moving quick with his RESTful app, that's a good buzzword.

Also AWS have a recent blog post that is very Selenium and Browsermob weighted.

Anonymous said...

It is extremely interesting for me to read this blog. Thank you for it. I like such themes and anything connected to them. I definitely want to read more soon.

hunza said...

I have installed the tool, but it is not working, I want to execute a test case in its GUI environment, please help me out