简体   繁体   中英

Signalr on Azure: service bus required for calling a single client?

I read that Signalr on Azure requires a service bus implementation (eg https://github.com/SignalR/SignalR/wiki/Azure-service-bus ) for scalability purpose.

However, my server only makes callbacks to a single client (the caller):

// Invoke a method on the calling client
Caller.addMessage(data);

If don't need Signalr's broadcasting functionality, is an underlaying service bus still necessary?

The Service Bus dependency is not something specific to Azure. Any time you have multiple servers in play, some of your signalR clients will have created their connection to a specific server. If you want to keep multiple servers in sync something needs to handle the server to server real time communication. The pub-sub model of service bus lines up with this requirement quite well.

dfowleR lists a specific case of this in the comments. Make sure you read down that far!

If you are running on a single server (without the sla on Azure) signalR will work just fine on a Cloud Service Web Role as well as the new Azure Web Sites. I did a screencast on this simple scenario that does not take on a service bus dependency, but only runs on a single server.

In order to support the load balance scenario, is it possible to enstablish a "server to server" SignalR PersistConnection between multiple instances (ie on Azure) ? If so, we can use a SQL Azure Table where all instances register at startup, so newest can connect to previous ones.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM