Simple load testing for Rails apps

If your looking for a really quick and easy way to load test a deployed Rails app you can’t get much simpler than Apaches ab tool.

To load test public pages just use

ab -n100 -c5 -t10 http://google.co.za/

-n requests Number of requests to perform
-c concurrency Number of multiple requests to make
-t timelimit Seconds to max. wait for responses

To load test secured pages you will need pass cookie information

ab -n100 -c5 -t10 -C identifier=cookie http://mysite.co.za/secured_page

Getting the cookie details using Chrome is really easy.

1. Login to the secured area

2. Find the request in Developer Tools => Network

3. Look for the cookie details in the response headers

Happy load testing!