---
title: "Scaling and configuring the xDB Collection database"
slug: "scaling-and-configuring-the-xdb-collection-database"
abstract: "An overview of scaling and configuring the xDB Collection database."
---
# Scaling and configuring the xDB Collection database

The xDB Collection database stores all contact and interaction data, and can experience high write rates from sources such as the [Content Delivery role](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/scaling-and-configuring-content-delivery.html "Scaling and configuring Content Delivery"). Review scaling options and performance tuning tasks for the following roles before scaling the xDB Collection database:

- [Scaling and configuring the xConnect Collection Search role](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/scaling-and-configuring-the-xconnect-collection-search-role.html "Scaling and configuring the xConnect Collection Search role")
- [Scaling and configuring the xConnect Collection service role](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/scaling-and-configuring-the-xconnect-collection-service-role.html "Scaling and configuring the xConnect Collection service role")
- [Scaling and configuring the xConnect Search Indexer](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/scaling-and-configuring-the-xconnect-search-indexer.html "Scaling and configuring the xConnect Search Indexer")

## Scaling and configuring the xDB Collection SQL provider

The xDB Collection SQL provider includes:

- A shard map manager database that stores global information about the shard set.
- A shard set of two or more shards.

The xDB Collection SQL provider supports the following scaling options:

- Sharding. All [default topologies](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/default-topologies.html "Default topologies") include two shards by default, and you [can re-deploy the xDB Collection database with a maximum of 18 shards](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/deploy-the-xdb-collection-database.html "Deploy the xDB Collection database"). Be aware that:
    - Contact and interaction data is sharded by contact ID.
    - The identifiers index is sharded by identifier.
    - Device profiles are sharded by device profile ID.
- In Sitecore 9.3 and later, you can [split/merge shards](https://doc.sitecore.com/xp/en/developers/104/platform-administration-and-architecture/split-or-merge-xdb-collection-database-shards.html) to redistribute data.
- Configure Always On for high availability (HA).