I’m have multiple Umbraco apps in Azure app service.
Upgrading solutions to 17 and looking at scaling the backoffice:
Can you use the the same Azure signalR service for multiple umbraco solutions, or will the events/messages get mixed up?
Or are they prefixed somehow?
Kind regards
Martin
Hi @martinatorn
Welcome to the forum!
Umbraco hubs do use fixed class names, but it looks like it may be possible using this but there is no specific Umbraco related documentation for it that I can find:
builder.Services.AddSignalR().AddAzureSignalR(options =>
{
options.ApplicationName = "SolutionA"; // unique per solution
});
I’ve not tried this though…
The cleaner solution would be to use separate resources.
The Umbraco related SignalR documentation is here:
Justin
Thanks Justin,
I know it’s cleaner to use separate resources, but for dev/staging that have extremely low load and is almost never scaled unless that is tested, i prefer using free instances to make it cost efficient. However there is a roof of 5 free instances per subscription/region . So i figured it would be more cost efficient that all dev/stage apps could share a normal signalr instance.
I’ll try that out and see if it works!
Kind regards
Martin
When looking at it, the hub name for backoffice events and server events are constants, so i have to go with multiple resources.
public void CreateRoutes(IEndpointRouteBuilder endpoints)
{
if (RuntimeState.Level is RuntimeLevel.Install or RuntimeLevel.Upgrade or RuntimeLevel.Upgrading or RuntimeLevel.Run)
{
MapMinimalBackOffice(endpoints);
endpoints.MapHub<BackofficeHub>(Constants.System.UmbracoPathSegment + Constants.Web.BackofficeSignalRHub, ConfigureHubEndpoint);
endpoints.MapHub<ServerEventHub>(Constants.System.UmbracoPathSegment + Constants.Web.ServerEventSignalRHub, ConfigureHubEndpoint);
}
}
Thanks anyway!
Kind regards
Martin