Sitecore Dedicated Publishing Instance

Recently while working on a project we configured a dedicated Publishing Instance for Sitecore. The decision to configure it was made looking at the volume of the items that were supposed to be published which were in huge numbers and we do not wanted the content authors to feel the slowness on the content management server while publishing was taking place. Of course it adds up the license cost (good things are never for free).

Here I am sharing a step-by-step (precise) guide about how we configured the publishing instance. DEDICATED PUBLISHING INSTANCE CONFIGURATION has all the necessary information for configuring a dedicated publishing instance. The reason to share this blog post is to have all the necessary steps at one place. Few server roles (Content Management Server and Aggregation or Processing Server if they are defined separately in your environment) gets affected when a dedicated publishing instance is added to the Sitecore ecosystem.

1.Configuration on Publishing Instance

1.1 Ensure Sitecore is installed

1.2 Website/App_config/ConnectionStrings.config file of Content Management and Publishing Instance should be same.

1.3 Create a folder at Website/App_Config/Include/zzz/, copy zzz.DedicatedPublishing-PI.config file to it,It is important to note that all include config files are applied in alphabetical order. Therefore this include file cannot remove indexes that are defined by include files that are applied later. Hence moving the file under folder zzz is ncesessary. This file contains settings from below mentioned files,
– Sitecore.Publishing.DedicatedInstance.config.example
– Sitecore.Publishing.Optimizations.config.example
– Sitecore.Publishing.EventProvider.Async.config.disabled
– Sitecore.Publishing.Parallel.config.disabled

1.4 Make sure that the server time is in sync with the database server and content management server.

1.5 Make sure Sitecore’s keepalive agent is alive and kicking. Copy KeepAlive.config file under Website/App_Config/Include/RJ folder.Open the file and update the value “PI-WebsiteName” with the name of the publishing instance website name
http://PI-WebsiteName/sitecore/service/keepalive.aspx
1.6 Tweak IIS application initialization settings to make sure the publishing instance’s worker can start without the need of a first request. This is done in a two-step manner,

1.6.1 Start worker process without waiting for a request
Open IIS -> Select the Application Pool of sitecore publishing instance -> Open Advanced Settings and change the “Start Mode” value to “AlwaysRunning” as shown in below image.

PI-Image-1

This setting will ensure that a worker process is always running for the application pool. This means that IIS will spin up a worker process when the World Wide Web Service is started, and it will start a new worker process if the existing one is terminated.

1.6.2 Worker process to load application without waiting for a request
Select site-> select Advanced Settings and change the value of “Preload Enabled” to “True”.
Below image is for showing an example about how to set “Preload Enabled” setting the Application Pool will be different for your installation.

PI-Image-2

When a new worker process spins up, Application Initialization will enumerate all of the applications that it will host and checks for this property. For any application where preloadEnabled=”true”, it will build a URL corresponding to the default page for the application and run it through the pipeline. This request does not go through the network, and there is no client listening for a response (IIS discards any data that would have gone to the client.)

1.7 Tweak app pool idle timeout, as you wouldn’t want the publishing server to idle out and restart between publishing jobs and lose all cached data. Change the value of “Idle Time-out(minutes)” to 0 which means infinite.

PI-Image-3

1.8 Disable recycling of App Pool in IIS, Select the app pool for sitecore website-> Advance Settings and change the value of “Regular Time Interval(minutes)” to “0”

PI-Image-4

2.    Configuration on Content Management Server

Content Management server should be made aware about the dedicated publishing instance in order to do so,

2.1 Copy the attached zzz.DedicatedPublishing-CM.config file to Website/App_Config/Include/zzz/ folder,

2.2 Open the file and update “value” to point to the publishing server instance name.

The value should be the name of the IIS Instance and the Website Name of the publishing instance. For e.g the publishing instance value would be “BKR8D72-speakpublish” for a publishing instance shown in below image,

PI-Image-5

Below image is an example about how to determine publishing instance name, it will be different for your sitecore installation.

3.    Configuration on Processing / Aggregation Server

Processing / Aggregation server should also be made aware about a dedicated publishing instance in order to do so repeat the steps mentioned at section “2. Configuration on Content Management Server” of this post.