Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SignalR with Service Fabric Stateless Web API

Got some info from this related question: Using SignalR with Azure Service Fabric

Quote in quote from that comment history: "After deploying this application, you can see that some calls to signalR fails and Some succeeds...."

Just want to know if anybody had similar implementation (signalR with Web API...). And I don't want to set instance count 1 for the stateless Web API.

like image 733
alltej Avatar asked Dec 18 '22 17:12

alltej


1 Answers

You can configure LoadBalancer that is used by Service Fabric to persist session. This will result in particular client ending up always in the same node.

You can do it by accessing LoadBalancer assigned to service fabric cluster in azure portal. Then go to "Load balancing rules", select rule that is responsible for signalR port and set "Session persistence" to "Client IP". This can also be done from PowerShell or ARM template.

like image 100
Sławomir Kwasiborski Avatar answered Jan 29 '23 10:01

Sławomir Kwasiborski