Search code examples
messagingpublish-subscribeservicebushorizontal-scaling

Service Bus for Windows - Performance and Scalability


We are building out a system using Service Bus for Windows 1.1 for pub/sub. If we were on Azure, we could use partitioning to scale it out. However, the on-premise version does not support partitioning. Instead, all nodes in a farm seem to use the same SQL Server for their persistence layer, and this seems to be a built-in bottleneck.

What can we do to get the Service Bus for Windows to scale out?


Solution

  • As this article states.

    http://www.planetgeek.ch/2014/12/10/service-bus-for-windows-server-high-availability/#

    If a server has more than one container, the fabric controller automatically rebalances the compute capacity by reassigning the containers to a specific messaging broker service. This load balancing mechanism is also triggered when server administrators create new message containers or remove existing ones. New servers can be joined into an existing farm automatically by issuing a few PowerShell commands which we will cover in next installments.

    For the storage layer Service Bus for Windows Server has no out-of-the-box solution. But because the underlying storage layer is based upon Sql Server you can use Sql Server Mirroring or AlwaysOn features of newest Sql Server Editions.

    You use Service Bus "installers" to handle High Availability for the Computing Nodes. On Sql Server, you have to roll your own High Availability.

    My company uses "AlwaysOn Failover Cluster Instance (FCI)." since we have Standard Edition. See reference below.

    AlwaysOn is a bigger umbrella which covers two features. AlwaysOn Availability Groups (AG) and AlwaysOn Failover Cluster Instance (FCI). FCI for 2 node is supported. You can't use AG feature in SQL Server Standard Edition

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/06651b7f-576c-4703-845f-2a81c5f5173d/which-edition-of-windows-is-required-for-using-sql-2012-always-on-availability-groups?forum=sqlgetstarted*

    Also see:

    https://msdn.microsoft.com/en-us/library/jj193012%28v=azure.10%29?f=255&MSPPError=-2147217396

    And:

    https://blogs.technet.microsoft.com/meamcs/2013/12/08/recommended-practices-service-bus-for-windows-server/

    Recommendations: Make sure it is highly available (HA): HA can be fully satisfied only when both service and database layers are HA. Service layer HA can be accomplished by having at least 3 servers in the ring. In regards to database HA, there are different ways of doing that depending on your case (db version, disaster-recovery plan, etc.) You can check my blog posts about single site failover clustering here for SQL 2012 Server. Please note that Service bus v1.1 supports up-to 5 servers in the ring Make sure it is scalable: You need minimum 2n message containers where n is the number of servers of the service bus farm ring. So, HA and scalable service bus implementation requires 3 servers and 6 message containers (database instances) at least.