SignalR components and pricing model might look confusing at first. I have recently had two questions in this topic. I will try to explain the difference between SignalR unit and instance as well as how SignalR pricing model works.
Question 1: What is the meaning of a SignalR unit and how different it is then an instance?
A SignalR instance is what you need to create first to use SignalR.
After searching for SignalR in Azure and going to SignalR homepage, you can create an instance by clicking “Add”. This is the very first step to use SignalR.
A unit is a sub-instance that processes your SignalR messages. Units are used to increase the performance and connections count.
Think unit this way: Let’s say you have a web server that is not enough to handle the web traffic. You can add two more servers to load balance the traffic. This increases the performance and number of requests your environment can handle. In this example, the environment is an INSTANCE. Each server is a UNIT. Before adding new servers, you have 1 instance and 1 unit in that instance. After adding new servers, you have 1 instance and 3 units in that instance.
- In FREE plan, you can use only 1 unit and this unit can handle maximum 20 concurrent connections
- In STANDARD plan, you can use 100 units. Each unit can handle 1,000 concurrent connections
(Please note the difference: The unit in FREE plan supports maximum 20 connections while a unit in STANDARD plan supports 1,000 connections. In terms of pricing, FREE plan unit and STANDARD plan unit are not the same)
Question 2: Which messages (inbound, outbound, heartbeat messages, etc.) are counted towards the quota?
Only outbound messages are counted for billing. There is more information on this page:
For billing, only outbound messages from Azure SignalR Service are counted. Ping messages between clients and servers are ignored.
Messages larger than 2 KB are counted as multiple messages of 2 KB each. The message count chart in the Azure portal is updated every 100 messages per hub.
For example, imagine that you have three clients and one application server. One client sends a 4-KB message to let the server broadcast to all clients. The message count is eight: one message from the service to the application server and three messages from the service to the clients. Each message is counted as two 2-KB messages.
If you are looking for information about SignalR service’s FIPS 140-2 compliance, check this post out: FIPS 140-2 Validation and Compliance for Microsoft libraries (DLLs)
Useful Links about SignalR:
- Introduction to SignalR
- Tutorial: Get started with ASP.NET Core SignalR
- Quickstart: Create a chat room by using SignalR Service
- Messages and connections in Azure SignalR Service
- Tutorial: Azure SignalR Service authentication with Azure Functions
- Scale ASP.NET Core SignalR applications with Azure SignalR Service
- SignalR and Serverless?
- Serverless real-time messaging with Azure Functions and Azure SignalR
Information about Azure SignalR Pricing: