Herokubench

Distributed benchmark and load testing tool using Heroku's free cloud

This project is maintained by wcdolphin

Heroku Bench.

Herokubench allows you to easily load test websites, from the cloud, for free. Use hundreds of free dynos on Heroku to run apache-bench, in the same way you would run it locally.

Goals

This project was created to make it easier to load tests web apps built on Heroku. I was upset at Blitz.io's high price and limitations, so I built this.

Installing

$ gem install herokubench

Getting Started

Using HerokuBench is as easy as using apache bench. The interface is the same, but the actions are distributed! In the simplest of cases, hbench only needs to know three things: the number of concurrent connections (the 'c' option), the total number of requests (the 'n' option), and the URL to make the request to.

$ hbench ab -c 100 -n 10000 http://www.google.com/

Making it rain

HerokuBench shines when running a load test with thousands of requests per second. Unlike running apache-bench from your own PC, Hbench distributes the requests across a number of dynos, allowing far higher throughput. Testing with 10,000 concurrent connections is the same as testing with 100.

$ hbench ab -c 10000 -n 1000 http://www.google.com/

Example Result

hbench ab -c 1000 -n 10000 http://nodejssimple.herokuapp.com/

        Cumulative results, summed across dynos
        Server Port:         80
        Document Length:     12
        Concurrency Level:   1000
        Time taken for tests: 7.1
        Complete requests:   10000
        Failed requests:     2
        Write errors:        0
        Total transferred:   1321134
        HTML transferred:    119976
        Requests per second: 1473.7
        Time per request:    7.1
        Transfer rate:       21.03

        Connection Times (ms), median across dynos
                             min      mean     [+/-sd]  median
        Connect:             1.3      3.0      3.5      1.6
        Processing:          185.9    641.1    427.7    481.1
        Waiting:             185.3    641.0    427.7    481.0
        Total:               190.9    644.2    428.0    483.3

        Percentage of the requests served within a certain time (ms) across dynos
          50%                  551
          66%                  671
          75%                  854
          80%                  1022
          90%                  1514
          95%                  1561
          98%                  1777
          99%                  3422
          100%                 7219

Options

Everyone likes options!

$  hbench help
Commands:
  hbench ab [options] [http[s]://]hostname[:port]/path              # Run apache-bench automatically spreading over dynos as necessary
  hbench create APP_NAME                                            # Create your personal bench-server on Heroku
  hbench help [COMMAND]                                             # Describe available commands or one specific command
  hbench multi NUMDYNOS [options] [http[s]://]hostname[:port]/path  # Run apache-bench, using multiple one-off dynos
  hbench update                                                     # Updates your remote bench server