Automatic deletion of inactive WF servers


This article summarizes improvements which were made in web farm synchronization for Kentico 8.x versions.

We released a scheduled task for Kentico 8.x, which improves automatic web farm server deletion in case server becomes inactive (e.g. when scaling down, utilizing auto-scaling in cloud, etc.).

To import the scheduled task to your Kentico instance, all you need to do is simply add the code file to your App_Code folder (or CMSApp_AppCode -> Old_App_Code if the project is installed as a web application). The task is registered to your system automatically.

Basically how it works is that the system periodically checks all web farm server tasks and if it finds any that are older than 24 hours, it deletes the tasks along with the corresponding server. The web.config key that enables you to set the interval, after which the system considers the server as not responding, is following:
<add key="CMSWebFarmServerCleanerRemoveAfterHours" value="24" />

Please note that Kentico 9 will have a similar functionality built-in so our recommendation is to delete the scheduled task if you decide to upgrade to Kentico 9 once it is released.

Download link for the scheduled task - WebFarmServerCleaner.cs

Share this article on   LinkedIn

Filip Ligač

Hi, I work as a Cloud Support Specialist here at Kentico. I write about Microsoft Azure and and am trying to extend knowledge about the best practices for deployment.


kentico_filipl commented on

Thank you for the notice, Marcin. The link was corrected.

Marcin Jernaś commented on

The linked file cannot be downloaded it displays a login screen.