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.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. 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?