---
title: "Scaling and configuring Content Delivery"
slug: "scaling-and-configuring-content-delivery"
abstract: "Options for scaling and configuring the Content Delivery role."
---
# Scaling and configuring Content Delivery

Content Delivery (CD) roles delivers your content to your visitors. You can [configure multiple CD instances](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-multiple-content-delivery-instances.html "Configure multiple Content Delivery instances") to meet your scaling requirements.

<details>
<summary><h2>Installation</h2></summary>

Use the Sitecore Installation Framework (SIF) or the Sitecore Azure Toolkit (SAT) to install the Content Delivery (CD) role. Refer to the [installation guide](https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform.aspx) for your version of the platform for more information.

</details>

<details>
<summary><h2>Scaling the Content Delivery role</h2></summary>

The following table describes your options for scaling the Content Delivery (CD) role:

| Scaling option | Supported | Notes |
| --- | --- | --- |
| Combined instance | No | The Content Delivery role must not be combined with any other role in production. The CD role can only be combined with other roles in the following circumstances:<br><br><ul><li>Combined Content Delivery, Content Management, and Processing - this topology is known as XP Single.</li><li>Combined Content Delivery and Content Management in an [“Experience Manager only” environment](https://doc.sitecore.com/xp/en/users/104/sitecore-experience-platform/en/experience-manager.html). This assumes that analytics is disabled, and that your topology does not include the Processing role.</li></ul><br><br>> [!note]<br>> In a developer environment, all core roles can be combined into a single instance. This includes [Content Management](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/content-management--cm-.html), Content Delivery, [xDB Processing](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/xdb-processing.html), and [EXM Dispatch](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/exm-dispatch.html). This setup is not recommended in production. |
| Standalone instance | Yes | <ul><li>You can deploy Content Delivery as a standalone role.</li><li>You can dedicate one or more Content Delivery instances to handle session expiration.</li></ul> |
| High availability and failover | Yes | You can fail over to a passive instance or set up multiple active instances behind a load balancer. |
| Horizontal scaling for load distribution | Yes | The CD role can be scaled horizontally into a load balanced content delivery cluster or across multiple data center to provide geographic scaling or data center level fail-over.<br><br>In a scenario with multiple CD clusters, be aware of the following:<br><br><ul><li>Each cluster has its own dedicated [Private Session State Store](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/private-session-state-store.html).</li><li>Each cluster has its own dedicated [Web database](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/web-database.html).</li><li>Federated authentication is recommended. Replication of the Security database is not supported.</li></ul> |
| Clustering | Yes | You can set up multiple clusters of Content Delivery servers. Each cluster can have its own Web database. In 9.1 and later, Content Delivery does not require a connection to the Core database.<br><br>> [!note]<br>> If you want to use Sitecore's default user management to support extranet users, all Content Delivery instances must connect to a centrally located Security database. |

</details>

<details>
<summary><h2>Performance tuning tasks</h2></summary>

To improve the performance of your CD role, consider the following performance tuning options:

- [Tune and configure caching.](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configuring-caching.html "Configuring caching")
- Use one or more dedicated CD instances to [handle session expiration](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/dedicate-a-content-delivery-instance-to-session-expiration.html "Dedicate a Content Delivery instance to session expiration"). This is supported by the Redis provider in 9.1 and earlier. In Sitecore 9.2 and later, all session state providers support this feature.
- Tune [session expiration](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-session-expiration.html "Configure session expiration").
- Tune [session end batching](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-session-end-batching.html "Configure session end batching").
- [Configure session cleanup](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-the-expired-session-cleanup-setting.html "Configure the expired session cleanup setting"). The default setting favors performance by deleting expired sessions from the session state database immediately.
- Reduce the [tracker's Reference Data Client API timeout](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-the-tracker-s-reference-data-client-api-timeout.html "Configure the tracker's Reference Data Client API timeout"). Reference Data service response time can affect CD response time.
- High resource consumption by the Reference Data database may result in a slower response time from the Reference Data service and degrade Content Delivery performance. There is a [patch available for Sitecore 9.0 - 9.2](https://kb.sitecore.net/articles/595419).
- Reduce the [tracker's xConnect Client API timeout](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-the-tracker-s-xconnect-client-api-timeout.html "Configure the tracker's xConnect Client API timeout"). The xConnect Collection service response time can affect the CD response time. If you use the xConnect Client API in your own code, [review timeout settings per request](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-platform/en/configuring-xconnect-client-api-timeouts.html).
- Set up a dedicated device to [handle encryption/decryption of incoming requests](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-ssl-offloading.html "Configure SSL offloading").
- Reduce request to the Reference Data service by [implementing Reference Data dictionary caching](https://kb.sitecore.net/articles/067230).
- Use a [Media Library CDN](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-manager/en/enabling-cdn.html).

</details>

<details>
<summary><h2>Security configuration tasks</h2></summary>

Refer to [the Content Delivery section of the Security guide](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/securing-experience-manager.html#UUID-c1a5f0a2-29ea-1f9c-6114-ccd44bd28794_para-idm83139864876142).

</details>

<details>
<summary><h2>Redacting contact IP addresses</h2></summary>

The CD role stores all incoming contact IP addresses in the InteractionFacets table in the xDB Collection database. You can choose to have the CD role redact these IP addresses by changing the `value` attribute of the `Analytics.RedactIpAddress` setting in the `<wwwroot>\App_Config\Sitecore\Marketing.Tracking\Sitecore.Analytics.Tracking.config` file.

```xml
<configuration>
  <sitecore>
    <settings>
      <setting name="Analytics.RedactIpAddress" value="false" />
    </settings>
  </sitecore>
</configuration>

```

The following table shows the results of setting the `value` attribute to either `true` or `false`:

| Value | Result |
| --- | --- |
| `false` (default) | All incoming contact IP addresses are stored in plain text. |
| `true` | All incoming contact IP addresses are redacted, and empty IP addresses (0.0.0.0) are stored instead.<br><br>> [!important]<br>> You lose the ability to determine contact IP addresses if you configure this setting to `true`. |

</details>

<details>
<summary><h2>Encrypting contact IP addresses</h2></summary>

All incoming IP addresses are stored in Web database by default. You can change this in the configuration. The IP addresses are encrypted by the `Sitecore.CES.GeoIp.Core.IpHashing.IpHashProvider` provider, using the MD5 algorithm and a random security string (a salt). You can specify the salt in the `<wwwroot>\App_Config\Sitecore\ DetectionServices.Location\ Sitecore.CES.GeoIp.config` configuration file.

```xml
<configuration>
  <sitecore>
    <ipHashManager defaultProvider="default">
      <providers>
        <add
          name="default"
          salt="<SALT STRING>"
          type=" Sitecore.CES.GeoIp.Core.IpHashing.IpHashProvider, Sitecore.CES.GeoIp.Core" />
      </providers>
    </ipHashManager>
  </sitecore>
</configuration>

```

> [!important]
> We recommend that you always enter a salt string of at least six random characters. You must never change the salt string after deployment. If you do, future incoming contact IP addresses are encrypted differently, and you lose data integrity.

> [!note]
> Sitecore provides a tool called *Hash Stored IPs*. You use this tool when you upgrade from a Sitecore version earlier than 8.1, where IP addresses were not hashed.

</details>

<details>
<summary><h2>General configuration tasks</h2></summary>

The following general configuration tasks apply to the Content Delivery role:

- [Walkthrough: Disable the Security database on a Content Delivery instance](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/walkthrough--disable-the-security-database-on-a-content-delivery-instance.html "Walkthrough: Disable the Security database on a Content Delivery instance").
- [Walkthrough: Moving security data to a separate database](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/walkthrough--moving-security-data-to-a-separate-database.html "Walkthrough: Moving security data to a separate database")
- [Update Core role license files](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/update-core-role-license-files.html "Update Core role license files")
- [Configure the analytics cookie lifetime](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-the-analytics-cookie-lifetime.html "Configure the analytics cookie lifetime")
- [Configure the analytics cookie domain](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-the-analytics-cookie-domain.html "Configure the analytics cookie domain")
- [Configure multiple managed websites](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-multiple-managed-websites.html "Configure multiple managed websites")
- [Enable or disable performance counters](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/enable-or-disable-performance-counters.html "Enable or disable performance counters")
- [Configure the tracker submit queue](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/configure-the-tracker-submit-queue.html "Configure the tracker submit queue")

</details>

<details>
<summary><h2>Default topologies and packages</h2></summary>

The following tables list the topologies that include the Content Delivery role and how the role is packaged by default.

### Sitecore Installation Framework

The Content Delivery role is available in the following default topologies for the Sitecore Installation Framework:

| Topology | Web Deploy Packages | Description |
| --- | --- | --- |
| XP Single | `Sitecore 9.X.X rev. XXXXXX (OnPrem)_single.scwdp.zip` | Content Delivery is bundled with all other Core roles.<br><br>Not recommended in a production environment. |
| XP Scaled | `Sitecore 9.X.X rev. XXXXXX (OnPrem)_cd.scwdp.zip` | Standalone instance of Content Delivery. |
| XM Scaled | `Sitecore 9.X.X rev. XXXXXX (XM) (OnPrem)_cd.scwdp.zip` | Standalone instance of Content Delivery. |

### Sitecore Azure Toolkit

The Content Delivery role is available in the following default topologies for the Sitecore Azure Toolkit:

| Topology | Web Deploy Packages | Description |
| --- | --- | --- |
| XP Single | `Sitecore 9.X.X rev. XXXXXX (Cloud)_single.scwdp.zip` | Content Delivery is bundled with all other Core roles.<br><br>Not recommended in a production environment. |
| XP Scaled | `Sitecore 9.X.X rev. XXXXXX (Cloud)_cd.scwdp.zip ` | Standalone instance of Content Delivery. |
| XM Scaled | `Sitecore 9.X.X rev. 002893 (XM) (Cloud)_cd.scwdp.zip` | Standalone instance of Content Delivery. |
| XM Single | `Sitecore 9.2.0 rev. 002893 (XM) (Cloud)_single.scwdp.zip` | Content Delivery is bundled with Content Management.<br><br>Not recommended in a production environment. |

</details>