Use the Precompiler tool in a load balanced setup

The following article explains how to use Sitefinity CMS page precompiler for sites deployed in load balanced setup and how to deploy the precompilation assemblies at more than one server.
For  more information, see For developers: Precompiler tool.

The tool precompiles frontend pages, backend pages, or a custom set of pages . Precompiling the backend significantly improves the backend user experience of the site. You should precompile the backend pages of the site once and repeat this only when new backend pages are added, usually when new dynamic modules are added to the site or new modules are activated.

You generate the precompilation assemblies once and then distribute them to multiple servers running the operation only once. 

To deploy the precompiler in a load balanced setup, perform the following:

  1. Run the Precompiler tool on the development environment to start precompiling against the live site. 
    This way, if there is a problem with rendering a certain page or 404 on any page, it will be recorded in the precompiler log, located in ~\App_Data\Sitefinity\Logs.
  2. Bring one of the NLB servers down, and deploy the precompiled assemblies in its bin folder. 
    This way, the site on this node will restart and uses the precompiled assemblies. 
  3. After the first server restarts and the site loads, perform the same for the rest of the servers for the NLB setup. 
    Take down one server at a time.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?