Configure a content delivery server

Abstract

You can configure one or a cluster of content delivery servers for improved scalability and better performance.

Content delivery servers make your web content available to your website visitors. You can configure one or more content delivery servers for improved scalability and better performance. If you expect to have high numbers of visitors or want to configure servers in different geographic locations, you can arrange content delivery servers into clusters.

Before you configure a content delivery server, consider the following recommendations:

  • Live Session Agent module – download and install the Live Session Agent module from the Sitecore Developer Portal to more accurately trigger and process engagement automation states (EAS states) by timeout closer to the timeout delay set on the automation state.

  • xDB analytics tracking – enable this feature. Tracking is required on a content delivery server to track contacts, goals, and outcomes, and perform personalization. You can enable tracking in both xDB and xManagement mode.

  • xAnalytics assembly files – if you have implemented custom code that uses ASP.NET Web API attribute routing, to avoid errors, disable the following .dll files in the Website\bin folder:

    • Sitecore.ExperienceAnalytics.dll

    • Sitecore.ExperienceAnalytics.Client.dll

    • Sitecore.ExperienceAnalytics.ReAggregation.dll

  • Session state – use session state to share contact sessions across all browsers and devices. This is important if you are configuring clusters of content delivery or processing servers. For each server cluster, configure private and shared session state and a session state database to ensure that contacts stay connected to the same server until the session ends.

  • xDB Cloud configuration – if you are running xDB Cloud edition, then configure your content delivery environment according to this topic and the instructions for configuring xDB Cloud.

Important

Synchronize all servers to a single reliable time source, for example, by means of the Network Time Protocol (NTP). The aggregation of engagement automation states depends on the system time and changing this can lead to incorrect aggregation results or loss of data.

To configure a content delivery server:

  1. Ensure that you have read the hardware guidelines for:

  2. Install a Sitecore instance using the Installing the Sitecore Experience Platform guide on the Sitecore Developer Portal website.

  3. Remove or restrict access to the client. You do not need the Sitecore client on a content delivery server.

  4. Configure database connection strings. This topic contains a list of all database connection strings required for each server type.

  5. Download the spreadsheet that lists of all the configuration files that you must enable or disable for each server type.

    Important

    If you are using Windows File Explorer, you must ensure that file extensions are displayed. To display file extensions, in the File Explorer Options window, on the View tab, ensure that the Hide extensions for known file types check box is clear.

  6. Enable or disable the relevant files for a content delivery server.

    Note

    You must completely disable List Manager and Path Analyzer on a content delivery server.

    Note

    If you do not use the Sitecore Commerce product in your Sitecore XP installation, then you must disable the configuration files that belong to Commerce, regardless of whether the spreadsheet says to disable them or enable them.

  7. Make changes to the configuration file settings. Edit the configuration files listed in the table below.

  8. Configure a search and indexing provider. This topic contains a list of links and other information you need to configure Lucene or Solr as your search and indexing provider.

Note

Configuration files using the Master database are not required on a content delivery server. If you enable the SwitchMasterToWeb.config configuration patch file, you can automatically remove references to the master database.

In the following configuration files, find the appropriate section and update each of the parameter values.

If you enable the SwitchMasterToWeb.config configuration patch file, you can automatically remove references to the master database.

Note

In Sitecore, you can create your own names for databases and indexes. This table uses the default Sitecore names for all databases and indexes, such as master, web, and sitecore_marketing_asset_index_web.

Note

Do not make changes directly to the configuration files. Instead, you must create a patch file that performs the required changes during runtime.

Configuration file

Section

Parameter

Value

ScalabilitySettings.config
configuration/sitecore/settings/setting
name="InstanceName"
patch:attribute name

Default value is blank. If it is blank, Sitecore automatically assigns the unique value of machine id + IIS site name to InstanceName.

If you assign the InstanceName yourself, give each server a unique name.

Sitecore.Analytics.config
configuration/sitecore/scheduling/
agent type="Sitecore.Analytics.Tasks.EmailReportsTask, Sitecore. Analytics"

Comment out this section:

<agent type="Sitecore.Analytics.Tasks.EmailReportsTask, Sitecore.Analytics" method="Run" interval="1:00:00">
    <DatabaseName>master</DatabaseName>
</agent>

Sitecore.Analytics.Tracking.config

<setting
name="Analytics.DefaultDefinitionDatabase" value="master"
/>
Analytics.DefaultDefinitionDatabase
web

configuration/sitecore/settings
Analytics.ClusterName

For a single content delivery server, you must set ClusterName to the domain name of the server.

For a cluster of content delivery servers, you must set ClusterName to the domain name of the load balancer in front of the cluster. ClusterName must be the same for all content delivery servers in the same cluster.

For example:

<setting name="Analytics.ClusterName" value="cluster1.yourdomain.com">

configuration/sitecore/settings
Analytics.HostName

This setting must be left blank.

For example: <setting name="Analytics.HostName" value="" />.

Sitecore.Buckets.config
configuration/sitecore/databases/database
database id="master"

Comment out:

<database id="master" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
    <Engines.DataEngine.Commands.AddFromTemplatePrototype>
    <obj type="Sitecore.Buckets.Commands.AddFromTemplateCommand, Sitecore.Buckets" />
    </Engines.DataEngine.Commands.AddFromTemplatePrototype>
</database> 
Sitecore.ContentSearch.config
configuration/sitecore/scheduling/agent
Agent type="Sitecore.ContentSearch.Tasks.Optimize"

Comment out:

<agent type="Sitecore.ContentSearch.Tasks.Optimize" method="Run" interval="01:00:00">
    <indexes hint="list">
        <index>sitecore_master_index</index>
    </indexes>
</agent>
Sitecore.ContentSearch.DefaultConfigurations.config
configuration/sitecore/contentSearch/indexConfigurations/indexUpdateStrategies/
intervalAsyncMaster

Comment out:

<intervalAsyncMaster type="Sitecore.ContentSearch.Maintenance.Strategies.IntervalAsynchronousStrategy, Sitecore.ContentSearch">
    <param desc="database">master</param>
    <param desc="interval">00:00:05</param>
    <CheckForThreshold>true</CheckForThreshold>
</intervalAsyncMaster>

configuration/sitecore/contentSearch/indexConfigurations/indexUpdateStrategies/
syncMaster

Comment out:

<syncMaster type="Sitecore.ContentSearch.Maintenance.Strategies.SynchronousStrategy, Sitecore.ContentSearch">
    <param desc="database">master</param>
</syncMaster>
Sitecore.Social.config
configuration/sitecore/settings/setting
name="Social.Messages.SearchIndex.Master"

Change the value to

social_messages_web
Sitecore.config
configuration/sitecore/sites/
site name="shell"

Change the value of the content parameter to

web

configuration/sitecore/sites/
site name="modules_shell"

Change the value of the content parameter to

web

configuration/sitecore/IDTable/
connectionStringName

Change the value of the content parameter to 

web

configuration/sitecore/databases/
database
id="master"

Comment out the entire id="master" database node

<database id="master"

….

</database>

configuration/sitecore/search/configuration/indexes/index/locations/master

Comment out:

<master type="Sitecore.Search.Crawlers.DatabaseCrawler, Sitecore.Kernel">
    <Database>master</Database>
    <Tags>master content</Tags>
</master>

configuration/sitecore/scheduling/<agent
type="Sitecore.Tasks.PublishAgent">

Comment out:

<agent type="Sitecore.Tasks.PublishAgent" method="Run" interval="00:00:00">
    <param desc="source database">master</param>
    <param desc="target database">web</param>
    <param desc="mode (full or smart or incremental)">incremental</param>
    <param desc="languages">en, da</param>
</agent>
Sitecore.Marketing.Search.config
configuration/sitecore/marketingDefinitions
searchIndexName

Change the value to

sitecore_marketingdefinitions_web