Wednesday, May 25, 2011

Windows Azure Traffic Manager - Load Balancer In the Cloud !!

It's pretty well known that Azure essentially is a set of VMs managed by a set of very sophisticated load balanced layer (that also manages VMs lifecycle and other management/instrumentation functions). But till now, there was no way for users/developers to balance the load on various instances and services that you have subscribed to in a streamlined way.

One workaround was to use RoleEnvironment.StatusCheck event to get the latest state of your service, and call SetBusy to take a particular instance out of load balancer queue for 10 secs. Similarly, there were few other worksroudns that required you to keep track of what your VMs are doing, and accordingly re-direct the traffic to prevent any one instance from being bogged down and become irresponsive.  Not any more!!

With the launch of "Windows Azure Traffic Manager" , Microsoft has introduced a new feature that allows customers to load balance traffic to multiple hosted services (even across data centers and regions). Developers can choose from three load balancing methods: Performance, Failover, or Round Robin. Traffic Manager will monitor each collection of hosted service on any http or https port. If it detects the service is offline Traffic Manager will send traffic to the next best available service.

This feature is offered under the broader umbrella of "Windows Azure Virtual Network name" feature along with "Azure Connect" service. This is currently in CTP, and you can request access from the Winodws Azure Site.
MSDN has also published a hands-on lab that works really well, if you want to try this feature out.

Cheers!!