Great news coming from the Azure AppFabric Service Bus team. As from today, they have updated the Service Bus to include load balancing in the Relay Service capabilities. It will now be possible to have up to 25 listeners registered to the same service endpoint. When a message is then sent to that endpoint, only one of these endpoints will get the service call, based on a random decision on the relay cloud infrastructure.
- First, we got an e-mail with the announcement through our Azure agreement
- After that, a tweet of Valery Mizonov (from the AppFabric CAT team) appeared: #ServiceBus relay load balancing was one of your top requirements, dear community. We are done. What’s the next big thing you need?
How to enable this functionality.
No update of SDK is needed, everything is included in the AppFabric 1.5 SDK.
The only thing that needs to be done, is change your code to manage the number of concurrent listeners per endpoint and set the limits right. I expect that each of these listeners will count for a billable connection, so the limits are important indeed.
Scale out scenarios
Before this load balancing
Before this capability, a lot of issues were encountered when opening service bus endpoints on multi-instance computers. In that case, the AddressAlreadyInUseException was thrown.
- When a Web or Worker role opened a relay connection, but had more than one instance (to be high available), the second instance that tried to open that same endpoint got an exception, because the other instance already registered on it.
- With BizTalk Server multi-server groups, the receive location with the Relay Binding only could be opened on one host instance.
New scenarios possible
Now it becomes possible to have real scaled out infrastructure and logic on premises too. Customers who have geo-clustered data centers with redundant applications and logic can now expose that same level of availability to the cloud.
A concrete example
An concrete example of how we can leverage this, is the following. For one of our cloud scenarios, we need to do a lot of flat file parsing. This we do on an on-premises hosted BizTalk Server. Therefore, we created a generic web service that accepts the flat file with a message identifier and returns the parsed XML.
Until now, only one server could expose this functionality over the service bus. But, in case of outage in our on premises data center, we would’ve been offline with this capability, making our entire solution not functioning for that amount of time. With the new load balancing feature, we just have to expose the same service on a BizTalk Server in another data center (of our hosting partner) and we’re high available just like that.
So we can conclude that with this new feature, the following things have been shown:
- The service bus keeps on being improved to be a world class reliable hybrid connectivity bus.
- It is great that this feature is introduced, without a new release of SDK being required. That is the power of the cloud.
- Most importantly: on premises services can now be scaled better to leverage cloud power on premises too.