Kentico CMS 6.0 Developer's Guide

Defining web farm servers

Defining web farm servers

Previous topic Next topic Mail us feedback on this topic!  

Defining web farm servers

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

You need to enter the internal URLs of all your servers into the system so that the web farm synchronization module knows which servers should be synchronized.


To add a server to the web farm, go to Site Manager -> Administration -> Web farm, click NewServer New server and fill in the following fields:


Server display name - a descriptive name for the server displayed in the administration interface.

Server code name - a unique code name of the server that will be used in the server's configuration file.

Server root URL - the URL of the root of the website on the server, such as The availability of the server can be checked by using the Check Server availability (CheckServer) button.


Click OK to save. Repeat the process for every server in your web farm.




Now you need to update the web.config file on each server and add the following keys into the /configuration/appSettings section:


<add key="CMSWebFarmServerName" value="server1"/>

<add key="CMSWebFarmEnabled" value="true"/>


Where server1 is the appropriate code name of the given server. Every server must contain only one such key with its own name.


Additional low-level settings of web farm synchronization can be done by adding the keys listed in the Web farm synchronization settings section of Appendix B - Web.config parameters into the /configuration/appSettings section of your web.config file.


If synchronization doesn't work as expected, you can check the Tasks tab of the web farm administration interface. Here, you can view information about all currently active (waiting to be processed) synchronization tasks.


Tasks can be filtered using the Server drop‑down list according to the server to which they are assigned, or (all servers) can be selected to show all synchronization tasks in the entire web farm. The Run tasks button can be used to manually execute tasks, regardless of how the synchronization interval is currently configured. The listed tasks can be removed all at once using the Clear task list button, or individually via the Delete (Delete) action. Clearing the list is not necessary if the web farm is working correctly, since tasks are removed automatically when successfully processed.




A similar user interface can be found on the Anonymous tasks tab. This tab displays a list of currently active (waiting to be processed) anonymous synchronization tasks. These tasks are logged by external applications (e.g. Windows services) to ensure that changes made by the external application are reflected in the web application cache. Tasks are logged as anonymous only if the application is NOT configured to run in a web farm. If it is configured to run in a web farm, these tasks are logged as standard synchronization tasks on the Tasks tab.




License keys


Please be sure to enter an appropriate license key for the internal URL of the server.


E.g. if the web farm servers are used for domain name and you access them internally through URLs like,, etc., you need to enter separate license keys for, and in Site Manager -> Licenses dialog (you need to do that on one server only and restart the other instances using Site Manager -> Administration -> System -> Restart application).


Configuring the server synchronization interval


By default, web farm servers are updated with changes made on other servers once per request. Synchronizing this frequently may however be impractical for high‑traffic websites. The synchronization interval can be changed by setting the value of the CMSWebFarmUpdateWithinRequest web.config key to false and using the Synchronize web farm changes scheduled task instead, which has a configurable execution interval. To do this, go to Site Manager -> Administration -> Scheduled tasks, select (global) from the Site drop-down list at the top of the page, edit (Edit) the mentioned task, set the required Task interval, check the Task enabled property and click OK.




The task must also be created for each server in the web farm, so return to the list of scheduled tasks, click the NewTask New task link, fill in the same properties as those of the Synchronize web farm changes task (the Task name must be different) and check the Create tasks for all web farm servers box below the Server name property. Click OK to complete the process.