1
votes

we are planning to use SignalR with Windows Azure Service Bus for a cloud application that requires live client updating (browsers). We might have about 200 clients connected to our solution. If we deploy our application over a 4 instances cloud service I know I should use the "GlobalHost.DependencyResolver.UseWindowsAzureServiceBus(connectionString, 1);" option to connect them through the service bus.

My question is: Will it use service bus relays? or topics? as many as hubs on each instance? one relay per client (200 clients) connected using SignalR? I just want to know how much they will charge me to know if it is worth it. In fact the most important thing to know here is if SignalR uses Topics/subscriptions or relays?

Thanks a lot for your help,

1

1 Answers

2
votes

The SignalR Azure Service Bus scaleout provider will only use one subscription per role instance. If you have 4 cloud service instances, you will actually want:

GlobalHost.DependencyResolver.UseWindowsAzureServiceBus(connectionString, 4);

The second parameter is your instance count.

This will put all of your SignalR messages on one topic. If you want to distribute you messages between more topics, you can specify a topicCount as the third parameter to UseWindowsAzureServiceBus like so:

GlobalHost.DependencyResolver.UseWindowsAzureServiceBus(connectionString,
                                                        instanceCount: 4,
                                                        topicCount: 2);

NOTE: The parameters above are only named for clarity.