Friday, 15 October 2010
For the 30th Cloud Cover show, Steve and I talked about coordinating work. It is not an entirely new topic as there have been a couple variations on the topic before. However, the solution I coded is actually different than both of those. I chose to simply iterate through all the available instances and fire a WCF message to each one. I could have done this is parallel or used multi-casting (probably more elegant), but for simplicity sake: it just works.
The reason I needed to coordinate work was in context of load testing a site. Someone had asked me about load testing in Windows Azure. The cloud is a perfect tool to use for load testing. Where else can you get a lot of capacity for a short period of time? With that thought in mind, I searched around to find a way to generate a lot of traffic quickly.
I built a simple 2 role solution where a controller could send commands to a worker and the worker in turn would spawn a load testing tool. For this sample, I chose a tool called ApacheBench. You should watch the show to understand why I chose ApacheBench instead of the more powerful WCAT.
Get the source - It's Hammer Time!
PS: Big props go to Steve for AJAX'ing the source up side the head.