Load testing web applications with FunkLoad

As the project I’m working on is approaching its final stages, it’s time to do some scale/stress/load-testing. We’re building a webapp, so the purpose of the tests would be to see how the system performs under load, how many concurrent users it can support with specific sample dataset on a given hardware setup. The focus of tests would be the server’s HTTP interface, we would be hammering it with GET and POST requests and measuring response times, system load and so forth.

Writing a script/framework that does the concurrent requests, gathers the statistics and generates nice reports seemed like quite some work, so I first had a look around the existing software.

First, there’s ApacheBench. It’s a really simple command-line tool, you just give it an URL and the number of concurrent requests and it’ll jump on to it and print out some statistics when done. There are various command-line options for passing custom headers, POST data and other stuff. However, this was way too simple for our use case since it only tests one URL. We want a bit smarter “bots” that mimic real users in their interactions with the webapp as closely as possible. Still, ApacheBench is handy for low-level benchmarking of specific problematic requests.

The next thing I came across was FunkLoad. Glancing at the docs it looked like exactly what I need, included examples helped me to get started quickly, and soon I had first HTML reports and some revelations about our webapp. So, the main facts about FunkLoad:

  • HTTP-oriented
  • Test cases (the bot code that decides what requests to make) are written in Python, but the system under test can use any technology (Java, PHP, etc.) since all the interaction with it is over HTTP, as from the browser
  • Nice reports with graphs! (example)

The preliminary results from these tests have been very educational, I now have a better idea of what the system can handle. Also during the pseudo-random crawl around the app I caught some failing requests. Deliberate fuzz testing would still be in order, though.

So, to sum up, very positively impressed with FunkLoad, it has been working well for me so far, and has already saved substantial amount of work!


One thought on “Load testing web applications with FunkLoad

Comments are closed.