wpfsilverlightsignalrweb-farm

SignalR in WebFarm


I am trying to deploy my signalR based web application in ‘load balanced web farm’ using AWS Elastic load balancer and Auto Scaling. My application architecture is such that all users send messages from web browsers to server, and server send these messages to Silverlight OOB (or WPF app.) on remote computer to display message. It works fine in single web server environment, but with multiple web servers behind load balancer, it seems that only one server sends these messages to Silverlight OOB (or WPF app.) while messages sent by users connected to other servers of the farm are lost. Apparently my SL OOB (or WPF) application is connected to only one server of the farm. Though ideally it should be connected to load balancer. In SL OOB I connect with hub on server using following:

Dim url As String = "http://xxxx.com/"
 Dim hubConnection As New HubConnection(url)
 Dim hubProxy As IHubProxy = hubConnection.CreateHubProxy("myHub")

Right now I am not considering web servers sending messages to each other. What could be the solution to this?


Solution

  • Your theory is correct. SL OOB client receives messages only from web clients connected to the same server as SL OOB client. This is known SignalR architecture limitation. Only way to fix it is to use something called backplane to connect all the servers to single message bus

    See Introduction to Scaleout in SignalR