Configure region specific copies of the Links Database

Abstract

How to configure Sitecore Content Delivery roles to use a region specific Links Database.

You can configure Content Delivery (CD) roles replicated to distant regions roles to use region-specific copies of the Links Database. You might want to do this to avoid network latency issues in scaled environments. Using region-specific copies of the Links Database is not possible if the CD roles are separate publishing targets with individual content.

Note

The Links Database is not a database in itself but a table named Links in the Core database. The Links table stores all links between individual items across databases (Core, Master, Web) and language versions. Also note that the Links Database is called LinkDatabase (without s) in the Sitecore configuration files.

SQL Server transaction replication is the best way to configure region specific copies of the Links Database. You can use the Azure active geo-replication feature for Azure Web App solutions.

To configure CD roles to use a local Links Database:

  1. In the App_Config/ConnectionStrings.config file, add an additional connection string for the local Links Database:

    <add name="CONNECTION_STRING_NAME" connectionString="Data Source=HOSTNAME;Initial Catalog=DATABASE;User ID=USER;Password=PASSWORD" />
  2. In the App_Config/Include/ folder, create a folder and name it, for example, MyPatchFiles/.

  3. In the App_Config/Include/MyPatchFiles/ folder, create a configuration patch file and name it, for example, DedicatedLinkDatabaseProvider.config.

  4. In the DedicatedLinkDatabaseProvider.config file, insert the following code and configure LinkDatabase to use the new database connection string by changing the defaultLinkDatabaseConnectionStringName attribute:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration xmlns:set="http://www.sitecore.net/xmlconfig/set">
      <sitecore>
        <sc.variable name="defaultLinkDatabaseConnectionStringName" set:value="CONNECTION_STRING_NAME" />
      </sitecore>
    </configuration>