Scaling

 

Applies To: Service Bus for Windows Server 1.1

Service Bus for Windows Server supports scaling. There are two aspects to scaling:

  • Compute: adding new computers to the existing farm.

  • Storage: adding new message containers.

Compute Scale for the Service Bus

The administrator can scale out the farm by adding more compute nodes to the farm. While every computer that is added to the farm contains a Service Bus for Windows Server messaging broker instance, note that the compute scale for the message broker depends on how many message containers are in the server. For example, if there is one message container in the server and there are three computers, the Service Bus for Windows Server provides high availability but does not scale out automatically. It is recommended that you configure at least 2n message containers in the farm, where n is the number of computers in the farm.

Note that the compute scale-out for the Service Bus for Windows Server message broker might not address all scale issues. If the new database is in a different server, the bottleneck might be in the SQL Server layer. In that case, you can create more message containers, each of which has its own database.

The gateway process automatically scales with the number of computers. You can update the client configuration to include the newly-added servers. The Service Bus client supports API that can consume a list of gateway addresses.

For more information about adding computers to a Service Bus for Windows Server farm, see Managing Farms and Nodes2.

Data Tier Scale Out

The Service Bus for Windows Server uses SQL Databases to store messages. Each database is mapped to a runtime component called a message container. Message containers point to the underlying database as well as to additional cached information in order to accelerate the Service Bus. A Service Bus for Windows Server host (server) can host multiple message containers (thus communicating to multiple databases). At any given time, a message container is hosted in a single Service Bus for Windows Server host (server).

A Service Bus messaging entity (a queue or topic) is created in a message container (and database). All messages in a Service Bus messaging entity are stored in the same container (and database). To enable the Service Bus to balance the load on its servers as well as to support future scaling (adding more servers), you can create multiple containers (even on the same database engine). You can create Service Bus message containers by issuing the following PowerShell command:

New-SBMessageContainer -ContainerDBConnectionString <String> [-SBFarmDBConnectionString <String>]

Tip

If you expect your Service Bus for Windows Server farm to scale out and support multiple applications (tenants) or multiple Service Bus messaging entities (queues or topics), it is recommended that you create multiple message containers.

Tip

Even if you plan to have a single SQL Server database to store all Service Bus related content, it is recommended that you create multiple message containers (SQL Databases) on the same SQL server.