Skip to content

Commit 20bd364

Browse files
authored
Update signalr-howto-scale-multi-instances.md
1 parent eca2400 commit 20bd364

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

articles/azure-signalr/signalr-howto-scale-multi-instances.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,22 @@ services.AddSignalR()
122122
});
123123
```
124124

125+
`ServiceOptions.Endpoints` also supports hot-reload. You could configure `ServiceOptions` using [options pattern](/aspnet/core/fundamentals/configuration/options?#ioptionsmonitor) to hot-reload the endpoints from your configurations and customize how they are loaded. The below sample code shows how to load connection strings from one configuration section and public URL exposed by [reverse proxies](./signalr-howto-reverse-proxy-overview.md) from another:
126+
```cs
127+
services.Configure<ServiceOptions>(o =>
128+
{
129+
o.Endpoints = [
130+
new ServiceEndpoint(Configuration["ConnectionStrings:AzureSignalR:East"], name: "east")
131+
{
132+
ClientEndpoint = new Uri(Configuration.GetValue<string>("PublicClientEndpoints:East"))
133+
},
134+
new ServiceEndpoint(Configuration["ConnectionStrings:AzureSignalR:West"], name: "west")
135+
{
136+
ClientEndpoint = new Uri(Configuration.GetValue<string>("PublicClientEndpoints:West"))
137+
},
138+
];
139+
});
140+
```
125141
## For ASP.NET
126142

127143
### Add multiple endpoints from config

0 commit comments

Comments
 (0)