简体   繁体   中英

Signalr dynamically add hubs

I've already looked SignalR - adding hubs at runtime , and the accepted answer doesn't provide an actual sample of the solution.

I'm looking to scale an application, a chat application that leverages the power of signalr hubs. Each hub is a chat room, and as users connect to my website, I'd like to dynamically add signalr hubs (so the application can scale). Is this at all possible? - Or is a another approach to have one single hub that can route traffic to different segments of users (simulating different chat "rooms")?

The only way I know for this is to use Groups from SignalR. And if you want to scale it horizontal you could use a Redis.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM