You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Resiliency and disaster recovery in Azure SignalR Service
13
15
@@ -48,10 +50,9 @@ Multiple SignalR service instances are supported on both app servers and Azure F
48
50
49
51
Once you have SignalR service and app servers/Azure Functions created in each region, you can configure your app servers/Azure Functions to connect to all SignalR service instances.
50
52
51
-
### Configure on app servers
52
-
There are two ways you can do it:
53
+
:::zone pivot="default-mode"
53
54
54
-
####Through config
55
+
### Through config
55
56
56
57
You should already know how to set SignalR service connection string through environment variables/app settings/web.cofig, in a config entry named `Azure:SignalR:ConnectionString`.
57
58
If you have multiple endpoints, you can set them in multiple config entries, each in the following format:
In the ConnectionString, `<name>` is the name of the endpoint and `<role>` is its role (primary or secondary).
64
65
Name is optional but it's useful if you want to further customize the routing behavior among multiple endpoints.
65
66
66
-
####Through code
67
+
### Through code
67
68
68
69
If you prefer to store the connection strings somewhere else, you can also read them in your code and use them as parameters when calling `AddAzureSignalR()` (in ASP.NET Core) or `MapAzureSignalR()` (in ASP.NET).
69
70
@@ -94,9 +95,86 @@ You can configure multiple primary or secondary instances. If there are multiple
Weusea [`ServiceEndpoint`](https://github.com/Azure/azure-signalr/blob/dev/src/Microsoft.Azure.SignalR.Common/Endpoints/ServiceEndpoint.cs) object to represent a SignalR Service instance. You can define a service endpoint with its `<EndpointName>` and `<EndpointType>` in the entry key, and the connection string in the entry value. The keys are in the following format:
>*WhenyouconfigureAzureSignalRendpointsintheAppServiceonAzureportal, don't forget to replace `":"` with `"__"`, the double underscore in the keys. For reasons, see [Environment variables](/aspnet/core/fundamentals/configuration#environment-variables).
0 commit comments