Load Balancing & Multi-site IIS
Server roles, shared media, Data Protection keys, per-app config overlays
Load Balancing & Multi-site IIS
When hosting one backoffice + multiple public sites on IIS sharing the same database, each site keeps its own TEMP folder. Content changes propagate via DatabaseServerMessenger.
Baseline Settings (every site)
Hosting:LocalTempStorageLocation: EnvironmentTemp— writes to %TEMP%/UmbracoData/Examine:LuceneDirectoryFactory: TempFileSystemDirectoryFactory— indexes under %TEMP%Global:MainDomLock: FileSystemMainDomLock— file-based lock for multi-site
Server Roles
| Role | Responsibility |
|---|---|
| SchedulingPublisher | Primary. Runs scheduled tasks. Exactly one app. |
| Subscriber | Serves requests, no scheduled tasks, picks up cache from DB. |
| Single | One app does everything (default standalone). |
Set via uTPro:Hosting:ServerRole in appsettings. Subscribers automatically skip uSync import and schema migrations.
Shared Media
Point all apps at a shared folder with uTPro:Hosting:MediaPath:
"uTPro": { "Hosting": { "MediaPath": "D:\\Shared\\uTPro\\media" } }Data Protection Keys
Share keys across instances with uTPro:DataProtection:KeysPath and ApplicationName.
Per-app Config Overlays
Use UTPRO_APP environment variable to select overlay:
UTPRO_APP=backoffice→ loads appsettings.backoffice.jsonUTPRO_APP=website→ loads appsettings.website.json- (unset) → standalone mode
Deployment Checklist
| Concern | Setting |
|---|---|
| Database | Single shared DB (required) |
| Server role | Backoffice=SchedulingPublisher; websites=Subscriber |
| Media | Shared folder via MediaPath |
| TEMP/NuCache | Separate per app (never shared) |
| Data Protection | Shared path when apps validate each other's tokens |