Azure Service Fabric WebAPI with SignalR

I have a cluster of a service network with a web API with a signal and a reliable installation of the actor.

I also have a separate MVC application that gets into the web API.

I can connect to the R signal just fine using the MVC app just fine, and everything works fine. But when I got into the API with a trusted actor, who then must cause the signalR signal to be sent to the group that the MVC application is connected to, nothing happens in my MVC application. I know that it falls into the API, since I register it to be sure.

I set load balancing on persistence of the session to the client IP address. I suspect that the signalR hub may not be the same “hub” or its another node? Is there a way that I can make him be the same so that it communicates? Am I forgetting something? Please let me know if I need to include additional information.

+4
source share
1 answer

The answer I found was Scaleout SignalR with Redis

This mainly uses redis to exchange signalR signals across all nodes in the service structure.

Just install Redis, the link Microsoft.AspNet.SignalR.Redisand add this to your run:

GlobalHost.DependencyResolver.UseRedis(new RedisScaleoutConfiguration(redisConnectionString, "SignalR"));
+2
source

Source: https://habr.com/ru/post/1655130/


All Articles