Dileep Paul
Dileep Paul

Reputation: 167

single-user group method in signalr

Is there any disadvantage if we use single-user group method instead of keeping identity and connections in a list as mentioned in below link. If so we can avoid keeping connections in memory or database. Please advice, will this make any issue with web farm.

https://www.asp.net/signalr/overview/guide-to-the-api/mapping-users-to-connections

Upvotes: 0

Views: 543

Answers (1)

Sayan Pal
Sayan Pal

Reputation: 4956

As per my understanding, you can map one connection to one or more groups. And this mapping should be mostly depending on your need. For example, whether to notify only a single user about a change or a group of users.

However, this might be problematic for web farm scenario. To scale out, you can use a backplane, where each application publishes to the backplane and backplane forwards to notification to all instances of the application (servers in the web farm). There are 3 possible options for backplanes: Azure service bus, Redis, and SQL server.

You may check https://www.asp.net/signalr/overview/performance/scaleout-in-signalr for more information.

Upvotes: 1

Related Questions