The sample code creates a simple MVC application that has a button to send a message to the other SignalR clients.
We created out Service Fabric cluster using the new PS command New-AzureRmServiceCluster. This command creates a Secure Service Fabric Cluster with the number of nodes specified on the clustersize parameter.
- You MUST create the certfolder on your machine ahead of time.
- Your #clustername should be all lowercase!
- No need to create the Resource Group, Key Vault, or any other Azure resources as the script WILL DO THIS FOR YOU!
- Your Key Vault name must be unique to the Azure Universe as it creates a DNS name for your Key Vault service.
Due to the nature of websockets the SignalR Application does not send messages to clients unless they are connected to the same host (web node). In order to get our sample to work we had to scale the deployment of our app DOWN to 1 node in Service Fabric (FB) to see the messages flow. To achieve scale you will need to implement a backplane. The suggestion is to create a custom backplane, which is difficult!
SignalR can create the backplane for you on Service Bus,SQL Backplane or Redis backplane. The links below show the examples of these backplanes.
The recomendation however is to just write (publish) your messages straight to the Service Bus and then have your clients subscribe to the bus to recieve new messages. Until SignalR makes scaling easier.