https://discord.umbraco.com logo
#help-with-umbraco
How to set Server Role correctly in v10 load blanced environment?
# help-with-umbraco
s

sandervandepas_33359

02/06/2024, 11:20 AM
We keep struggling with the right setup for our load balanced environment. Following the documentation on https://docs.umbraco.com/umbraco-cms/fundamentals/setup/server-setup/load-balancing/flexible-advanced#explicit-schedulingpublisher-server we need to set the server role based on the code in a Composer. We have the following setup for our CM (Backoffice) server: LocalTempStorageLocation: EnvironmentTemp LuceneDirectoryFactory: SyncedTempFileSystemDirectoryFactory IsSchedulingPublisherServer: True MainDomLock: FileSystemMainDomLock UmbracoApplicationUrl: https://acc-cm.ourwebsite.nl/ And the following setup for our CD (Frontend) server: LocalTempStorageLocation: EnvironmentTemp LuceneDirectoryFactory: TempFileSystemDirectoryFactory IsSchedulingPublisherServer: False MainDomLock: FileSystemMainDomLock UmbracoApplicationUrl: https://acc.ourwebsite.nl/ Based on the IsSchedulingPublisherServer appsetting we set the right ServerRegistrar (SchedulingPublisherServerRoleAccessor or SubscriberServerRoleAccessor). So far so good. But after a new deploy it seems that the index wouldn't be recreated on the CM environment and lost most of his items. Do we need to do something with the property "ServerRole" in the appsettings (below Umbraco > CMS > Global) or is that outdated? I heard that in v10 the ServerRole accessor won't work as expected and that it's solved in v11 or v12, but how can we fix this for v10? Hopelfully someone does have the right answer for us. Thanks in advance! Grtz Sander
k

kdxperbol

02/06/2024, 1:13 PM
If this is on Azure, you need to follow the Azure Load Balancing Guide: https://docs.umbraco.com/umbraco-cms/fundamentals/setup/server-setup/load-balancing/azure-web-apps There is no
ServerRole
property, where did you find that? Umbraco 8/9? Have you verified that the correct ServerRegistrar is set at startup? The logs should say. Maybe the index non-rebuild isn't related to load balancing at all? Is there something in the CM logs that would say?
Isn't SyncedTempFileSystemDirectoryFactory only supposed to be used with replicated file systems? It sounds like you have 1 CM Instance only and 2 completely standalone installations?
We use Azure for all our Umbracos and never have any index problems when deploying.
s

sandervandepas_33359

02/28/2024, 12:41 PM
Hi @kdxperbol Thanks for your response! A colleague of my told me about the serverRole property in the appsettings, but if this is not needed I deleted it. We followed the documentation (mine and yours) but keep getting wrong/empty examine indexes after a new deploy. How can we verify the correct ServerRegistrar by the log? Can you give me an example of how the log comment looks like, so I can search on that? We've indeed 1 CM Instance (server) only and 1 scalable Frontend Instance (server). Hopefully you can point us in the right direction. Thanks in advance. Grtz Sander