Is it possible to use signalR with Service Fabric provided by Microsoft? I'm trying to connect an UWP app and an angularJS app to my stateless reliable service hosted in an Azure Cluster through signalR/websocket connection. But both are not able to open such a connection. On my local machine everything works fine.
Is there anything special to consider of using signalR/websockets with Service Fabric? Is there any example?
This code can be found in the readme.txt file we get after installing the Nuget package for the SignalR.
For cross domain feature, you need to install the Cores nuget package also.
After deploying this application, you can see that some calls to signalR fails and Some succeeds.
By default the instance count in Reliable stateless service is -1. Thus multiple instances will be created for the service.
From signaleR Connection.Start() method three SingalR APIs will be called.
These calls should happen within the same session in-order to work it properly.
When we call these three API in Service Fabric with multiple instances, the call might be processed in different nodes and thus different sessions which leads to failure in singalR connection.
One solution is to Make the instance count 1 for the stateless service fabric application. I don't think that this is an elegant solution.
Asked in February 2016Viewed 3,411 timesVoted 10Answered 1 times