2
votes

Suppose I have 3 applications -

WebApp 1 - a NancyFX app that serves html pages. there's also a SignalR hub for messaging communications between the users of that app. (and sends messages to WebApp2 sometimes)

WebApp 2 - a NancyFX app that serves html pages. there's a SignalR hub to that receives messages from WebApp 1 and updates the users of WebApp 2.

WebApp3 - a self hosted WebAPI that doesn't have a SignalR hub, but sends messages to WebApp2 in order to update it's connected clients.

So my question - is keeping two hubs in WebApp2 and WebApp1 the way to go, or should I have a (scalable) dedicated SignalR server which hosts the hubs of WebApp2 and WebApp1 to facilitate communications?

Thanks..

1

1 Answers

1
votes

Tough to say what's best for you, since we have no details about your load requirements or how authentication/authorization works in your application. However, I'll say this:

Your scenario could be viewed as similar to a more typical SignalR scale-out situation, where you have a single application deployed to a web farm behind a load-balancer. In this scenario, you use SignalR's scaleout ("backplane") feature for server-to-server communication so that outgoing messages reach clients no matter which server they happen to be connected to. Your situation is really no different, except you have three different applications in play. As long as all three of your applications are hosting the same hub class (via a shared hub assembly) and are connected to the same scaleout backplane, it ought to work fine.