How do I do Ruby on Rails concurrency testing? How do I do Ruby on Rails concurrency testing? ruby ruby

How do I do Ruby on Rails concurrency testing?


I recently published a post with a solution on how to test concurrency caused by job queue workers in order to validate code fix for race condition. It should apply to other concurrency issues in Rails.

http://ternarylabs.com/2012/04/16/handle-job-queue-workers-concurrency-in-rails/


I would look at using the Apache Bench tool. It should come installed with an Apache installation. Even though it's written by Apache, it is generic enough to test any type of server.

Usage is similar to thisab -c 1000 -n 10000 http://www.some-site.cc/

The "c" is number of concurrent connections and "n" is number of requests. See http://httpd.apache.org/docs/2.0/programs/ab.html