Configure Sitecore Content Delivery Servers in a Scaling Environment

  1. Files to enable or disable to configure a content delivery server

Follow the Sitecore document to enable and disable the configuration files.

Sitecore Documentation – Configure a content delivery server

Some different settings are documented below:

  • File: App_Config\Include\ScalabilitySettings.config

 Find section: configuration/sitecore/settings/setting name=”InstanceName”/patch:attribute name=”value”

Change value to CD node servers name, for example: CD1, CD2, CD3

  • ENABLE file: App_Config\Include\Analytics.MarketingTaxonomy.config
  • Enable file: App_Config\Include\Marketing.Definitions.MarketingAssets.Repositories.config
  • Enable file: App_Config\Include\Marketing.config
  1. Configure Session State:
  • Senario 1: Content delivery cluster with a sticky load balancer

On all content delivery instances, you should configure the ASP.NET session state provider to use the in process (InProc) mode. You should configure the shared session state provider to use one of the out of process modes connected to a database shared among all the content delivery instances.

  • Senario 2: Content delivery cluster with a non-sticky load balancer

On all content delivery instances, you should configure both session state providers to use one of the out of process modes connected to a database (or databases) shared among the content delivery instances.

Open the ConnectionStrings.config and add the following connection string:

<add name="session" connectionString= "mongodb://_mongo_server_name_:_port_number_/_session_database_name_" />

To configure Sitecore to use the shared session-state provider for MongoDB:

  1. In website root folder, navigate to: Website\App_Config\Include.
  2. Open the Analytics.Tracking.configfile.
  3. Locate the line where you can define the default shared session state provider using the following path: sitecore/tracking/sharedSessionState.
  4. The default shared session store uses inProcprovider (storing data in memory and implemented in the internal ASP.NET class InProcSessionStateStore):
<sharedSessionState defaultProvider="inProc">
<providers>
<clear/>
<add name="inProc" Type="System.Web.SessionState.InProcSessionStateStore" />
</providers>

Note

For clustered environments, Sitecore ships with a MongoDB session state store provider. Change the defaultProvider from inProc to mongo. Also, change the name attribute value to mongo.

<sharedSessionState defaultProvider="mongo">
<providers>
<clear/>
<add name="mongo" type="Sitecore.SessionProvider.MongoDB.MongoSessionStateProvider,  Sitecore.SessionProvider.MongoDB" connectionStringName="session" pollingInterval="2" compression="true" sessionType="shared"/>
</providers>
  1. Enable Switch Master to Web:

When enabling the SwitchMasterToWeb.config file for configuring the distributed Sitecore environment, you may face several issues:

Exception: System.InvalidOperationException
Message: Could not find configuration node: contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster
Source: Sitecore.Kernel at Sitecore.Diagnostics.Assert.IsTrue(Boolean condition, String message) at Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert)...
at Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration()
at Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name)
at Sitecore.ListManagement.ContentSearch.Pipelines.GetAllLists.GetAllContactLists..ctor()
The search indexes that should be disabled after applying the aforementioned config file, may still be present in the output of the/sitecore/admin/showconfig.aspx page:

sitecore_testing_index

sitecore_fxm_master_index

sitecore_list_index, etc.

The issue may occur when some config files in the /App_Config/Include folder are applied after the SwitchMasterToWeb.configfile and revert the configuration changes made by the SwitchMasterToWeb.config file.

Ensure that the SwitchMasterToWeb.config file is applied as the latest one in the list of configuration changes. Follow the steps below:

  • Create a sub-directory in the /App_Config/Includefolder that is the latest one alphabetically comparing to other sub-folders (e.g. Z-SwitchMasterToWeb).
  • Move the configfile to that folder.
  1. WFFM Installtion

Extract “Web Forms for Marketers CD 8.0 rev. 150625” to the Website folder of the CD servers.

To configure the module:

  • In /Website/Web.config, add the nodes under the configuration\system.webServer\handlers
<add name="CaptchaImage" verb="*" path="CaptchaImage.axd" type="Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver, Sitecore.Forms.Core" />
<add name="CaptchaAudio" verb="*" path="CaptchaAudio.axd" type="Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver, Sitecore.Forms.Core" />
  • In /Website/App_Config/Include/Sitecore.Forms.Config, remove or disable the following sections on all CD servers:
<hooks>
<!--remote events hook-->
<hook type="Sitecore.Form.Core.WffmActionHook, Sitecore.Forms.Core"/>
</hooks>
<event name="wffm:action:remote">
<handler type="Sitecore.Form.Core.WffmActionHandler, Sitecore.Forms.Core" method="OnWffmActionEventFired" />
</event>
  • In /Website/App_Config/Include/Sitecore.Forms.Config, add the following node to the <settings>section:
<setting name="WFM.IsRemoteActions" value="true" /> 
  1. Restrict access to the client

We’d like to restrict access to the client by disabling Anonymous IIS access to the following folders and files in Website\sitecore folder: /admin; /login; /shell; default.aspx page

CD config1

Set Anonymous Authentication to Disabled, in the Actions panel, click Disable.

  1. Disable schedules

Since master db has been removed from CD server, all scheduled jobs require master db access should be disabled.

  • In web.config, set agent interval to 00:00:00

CD config2 CD config3

  • In include/sitecore.processing.config, comment out the master agent

CD config3

 

This entry was posted in Information Technology, Sitecore and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s