0

We've got two competing designs having read https://learn.microsoft.com/en-us/aspnet/signalr/overview/performance/scaleout-in-signalr.

In short what we have is multiple applications across a network of multiple servers broadcasting events/messages to multiple browsers over multiple machines via SignalR. Importantly browsers/clients never connect to an application directly. All clients connect to a server who's sole responsibility is to receive the messages from the server applications and proxy them down to the connected clients - these are called the message-to-client-proxy servers.

The two approaches are:

All servers drop messages on the SignalR Hub and the SignalR scale-out backpane distributes those messages to all the message-to-client-proxy servers which push them down to the browsers.

   APP SERVER    === >   AZURE SERVICE-BUS
                        (SignalR BackPane)
                                |
                                |
                                |
                                |\=== >    PROXY SERVER   ===  >  WEB CLIENT
                                |        (SignalR Server)      (SignalR Client)
                                |
                                |
                                |
                                |
                                |\=== >    PROXY SERVER   ===  >  WEB CLIENT
                                |        (SignalR Server)      (SignalR Client)
                                |
                                |
                                |
                                |
                                 \=== >    PROXY SERVER   ===  >  WEB CLIENT
                                         (SignalR Server)      (SignalR Client)

All servers connect to the message-to-client-proxy servers using a singalR client, pushes the messages via the signalR client directly to A single message-to-client-proxy server which thens pushes that back up to the SignalR scale-out backpane message-to-client-proxy server, which then all them down to the browsers.

   APP SERVER    === >   PROXY SERVER    === >   AZURE SERVICE-BUS
(SignalR Client)       (SignalR Server)         (SignalR BackPane)
                                                         |
                                                         |
                                                         | 
   WEB CLIENT    < ===   PROXY SERVER   < ==============/|
(SignalR Client)       (SignalR Server)                  |
                                                         |
                                                         |
   WEB CLIENT    < ===   PROXY SERVER   < ==============/|
(SignalR Client)       (SignalR Server)                  |
                                                         |
                                                         |
   WEB CLIENT    < ===   PROXY SERVER   < ===============/
(SignalR Client)       (SignalR Server)

The reason we're struggling with this is all example assume the applications / server raising the messages also allow clients to connect to them... which is definately not our case.

cdmdotnet
  • 1,663
  • 3
  • 17
  • 22
  • what are you actually asking? would you like to get a design recommendation for either of the two senarios? if I get the scenarios right you are essentially asking if the hub should be on the "proxy" or on the "application" servers, is that right (if I misunderstood this, then please explain where in scenarion (1) is the location of the Hubs)? – Ronald Rink 'd-fens' Mar 21 '17 at 04:46
  • In scenario 1, the location of the hubs is on the front end servers, not on the application servers - and we'd use a SignalR client to send messages to the hubs. In scenario 2 the hub is within the application on the application server. We're looking for what recommended pattern is. As you can see, we've come up with two competing ideas on how to solve the basic problems of server broadcast. – cdmdotnet Mar 21 '17 at 07:59
  • Sorry I need to correct myself. In scenario 2, the hubs are on the front-end server, in In scenario 1 the hubs are within the applications – cdmdotnet Mar 21 '17 at 18:43
  • Now with your updated question parts of my answer are not valid anymore. Regarding your comments, I do not totally agree with them, but in my opinion it makes no sense to discuss them (as the basis for the answer is not valid anymore). So I will delete my answer altogether. – Ronald Rink 'd-fens' Mar 22 '17 at 09:50
  • regarding your updated designs scenario (2) seems contradicting to your comment "In scenario 2 the hub is within the application on the application server" (your picture writes "APP SERVER (SignalR Client)" and not server (which should be the case if it is a "Hub"). The same for scenario (1). Your comment "In scenario 1 the hubs are within the applications" contradicts the first pricture "APP SERVER (SignalR Client)". – Ronald Rink 'd-fens' Mar 22 '17 at 09:58
  • Really well spotted. I've corrected the copy/paste errors in the diagram. Hopefully it's more accurate now. – cdmdotnet Mar 22 '17 at 20:01

0 Answers0