Ensuring Proper Web Farm Synchronization Across Multiple Domains
Kentico’s Web Farm configuration needs adjustments to ensure that media files uploaded from either Application 1 or Application 2 sync correctly.
1. Ensure Proper Web Farm Configuration
- Go to Settings → Versioning & Synchronization → Web farm
- Set the Web farm mode to Manual instead of Automatic
- In Web farm servers, ensure that both applications are properly registered with unique names
2. Manually Register Each Front-End Server
- Navigate to Configuration → Web farms
- Ensure both applications are registered with correct domain names
- If necessary, manually add entries for both applications, ensuring they have unique names
3. Verify File System Storage Settings
- Go to Settings → Content → Media Libraries
- Ensure that both applications point to the correct shared media file storage (either local file system, Azure Blob Storage, or an external CDN)
- If the files are stored on the file system, both applications need proper access to the ~/wwwroot/media folder
4. Check Web Farm Task Processing
- Navigate to Web farm tasks in the Kentico Admin panel
- Look for any failed tasks related to media file synchronization
- If there are failed tasks, try manually running them to diagnose if the synchronization issue persists
5. Validate Cache Dependencies
Kentico caches data per application, so media files might not appear due to cache inconsistencies. Try:
- Clearing the cache on both applications using CacheHelper.Clear();
- Enabling Staging and Synchronization Logging to track the web farm tasks
6. Consider Using Kentico’s Blob Storage Provider
If your setup requires media files to be shared across multiple domains, an alternative is to store media in Azure Blob Storage or Amazon S3, ensuring both applications access the same media library.