Search code examples
signalrsignalr-backplane

SIGNALR Backplane - What happend when you send message to a group


When you configure SignalR to use a SQL Backplane and you send to a group, does SignalR create in the backplane one message for the group or one message for each client ID in the group.

I need two instances of my SignalR, but because clients have different connectionIds between instances, I need to send message to a unique identifier which could be the group.

Can anyone please answer this ? Thanks


Solution

  • Each server instance connects to the backplane through the bus. When a message is sent, it goes to the backplane, and the backplane sends it to every server. When a server gets a message from the backplane, it puts the message in its local cache. The server then delivers messages to clients from its local cache.

    As per: http://www.asp.net/signalr/overview/performance/scaleout-in-signalr

    This means that the server (hub) would decide how to handle the message so you can do either.

    This might help. http://www.asp.net/signalr/overview/performance/scaleout-with-sql-server