I have the next setup in Azure Resource Manager :
- 1 scale set with 2 virtual machines having Windows Server 2012 .
- 1 Azure Redis cache (C1 standard)
- 1 Azure load balancer (Layer 4 in the OSI network reference stack)
Load balancer is basically configured using :
https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-get-started-internet-portal . Session persistence is set to none for the rules.
On both VMs from scale set I have deployed a test web app which uses SignalR 2 on .Net 4.5.2. The test web app uses Azure Redis cache as backplane . The web app project can be found here on github : https://github.com/gaclaudiu/SignalrChat-master.
During the tests I did notice that after a signalr connection is opened , all the data sent from the client, in the next requests, arrives on the same server from the scale set , it seems to me that SignalR connection know on which sever from the scale set to go.
I am curios to know more on how this is working , I tried to do some research on the internet but couldn't find something clear on this point .
Also I am curios to know what happens in the next case : Client 1 has a Signalr opened connection to Server A. Next request from the client 1 through SignalR goes to the Server B.
Will this cause an error ? Or client will just be notified that no connection is opened and it will try to open a new one?