Configure multi-regional deployment
To configure the delivery of static personalized content in multiple regions, you need to make several adjustments to some of the configuration files.
1. Modify the Web.config file
Open the web.config file of all Sitefinity CMS instances that are part of the Primary and the Secondary region and make the following configurations:
-
Turn on read-only mode of configurations, by adding
restrictionLevel
in section <telerik>
.
-
Ensure that all Sitefinity CMS instances in each region have the same values for
machineKey
property.
EXAMPLE: Use the following configuration for the Primary region and the Secondary region(s).
The <telerik>
section of all Sitefinity CMS instances that are in the primary and the secondary regions, should look in the following way:
2. Modify the DataConfig.config file
Open the DataConfig.config
file and make the following configurations:
-
Define the connection strings to the primary, the secondary, and the session database.
The Primary region must have a connection to the Primary database and the Session database. The Secondary region should have a connection to the Secondary database and the Session database.
-
Define the replication type.
You should set the Primary database to have replication=”Master”
and the Secondary database to have replication=”Slave”
.
-
Define the read-only state.
The Primary database must not be read-only, while the Secondary database must be read-only.
EXAMPLE: Use the following samples for the configuration of both regions:
Primary region: The DataConfig.config
file of all Sitefinity CMS instances that participate in the Primary region should look in the following way:
Secondary region(s): The DataConfig.config
file of all Sitefinity CMS instances that participate in the Primary region should look in the following way:
NOTE: Take note of the following configurations:
-
The
replication="Master"
attribute is mandatory in the database connection string for the Primary region.
-
The
replication="Slave"
attribute is mandatory in the database connection string for the Secondary region(s).
-
The
replication="None"
attribute in the Session database connection string is not required and could be omitted.
3. Modify the LibrariesConfig.config file
Open the LibrariesConfig
file of the Secondary region and for every Sitefinity CMS instance that is part of the region, disable dynamic resizing of images, because it requires database writes operations.
EXAMPLE: Use the following configuration for the Secondary region(s).
The LibrariesConfig.config
file of all Sitefinity CMS instances that are part of the Secondary region, should look like this:
NOTE: If you do not have a LibrariesConfig.config
file, create one and place it in folder ~\App_Data\Sitefinity\Configuration
.
4. Modify the SchedulingConfig.config file
Open the SchedulingConfig
file of the Primary and the Secondary region and for every Sitefinity CMS instance that is part of the respective region, reconfigure the config file to use the respective Session database, which is dedicated per region.
EXAMPLE: Use the following configuration for the Primary region and the Secondary region(s).
The SchedulingConfig.config
file of all Sitefinity CMS instances that are part of the Primary and the Secondary region, should look like this:
NOTE: If you do not have a SchedulingConfig.config
file, create one and place it in folder ~\App_Data\Sitefinity\Configuration
.
5. Modify the StatisticsConfig.config file
Statistics must be stored in the respective Session database. Open the StatisticsConfig.config
file of the Primary and the Secondary region and for every Sitefinity CMS instance that is part of the respective region, reconfigure the config file to use the respective Session database, which is dedicated per region.
EXAMPLE: Use the following configuration for the Primary region and the Secondary region(s).
The StatisticsConfig.config
file of all Sitefinity CMS instances that are part of the Primary and the Secondary region, should look like this:
NOTE: If you do not have a StatisticsConfig.config
file, create one and place it in folder ~\App_Data\Sitefinity\Configuration
.
6. Modify the UserActivityConfig.config file
User activities must be stored in the respective Session database. Open the UserActivityConfig.config
file of the Primary and the Secondary region and for every Sitefinity CMS instance that is part of the respective region, reconfigure the config file to use the respective Session database, which is dedicated per region.
EXAMPLE: Use the following configuration for the Primary region and the Secondary region(s).
The UserActivityConfig.config
file of all Sitefinity CMS instances that are part of the Primary and the Secondary region, should look like this:
NOTE: If you do not have a UserActivityConfig.config
file, create one and place it in folder ~\App_Data\Sitefinity\Configuration
.
7. Modify the SystemConfig.config file
Open the SystemConfig.config
file and make the following configurations:
-
Enable synchronization across the regions.
-
Set the connection string to the Redis instance used as a communication channel between the regions.
-
Define a prefix for cache records.
-
Disable the backend UI of the Secondary region.
EXAMPLE: Use the following samples for the configuration of both regions:
Primary region: The SystemConfig.config
file of all Sitefinity CMS instances that participate in the Primary region should look in the following way:
Secondary region(s): The SystemConfig.config
file of all Sitefinity CMS instances that participate in the Secondary region should look in the following way:
NOTE: If you do not have a SystemConfig.config
file, create one and place it in folder ~\App_Data\Sitefinity\Configuration
.
8. Modify the MetadataConfig.config file
You should add a metadata provider that uses the respective Session database. Open the MetadataConfig.config
file of the Primary and the Secondary region and for every Sitefinity CMS instance that is part of the respective region, reconfigure the config file to use the respective Session database, which is dedicated per region.
EXAMPLE: Use the following configuration for the Primary region and the Secondary region(s).
The MetadataConfig.config
file of all Sitefinity CMS instances that are part of the Primary and the Secondary region, should look like this:
NOTE: If you do not have a MetadataConfig.config
file, create one and place it in folder ~\App_Data\Sitefinity\Configuration
.
9. Modify the OutputCacheConfig.config file
Output cache feature must use the respective Session database. Open the OutputCacheConfig.config
file of the Primary and the Secondary region and for every Sitefinity CMS instance that is part of the respective region, reconfigure the config file to use the respective Session database, which is dedicated per region.
EXAMPLE: Use the following configuration for the Primary region and the Secondary region(s).
The OutputCacheConfig.config
file of all Sitefinity CMS instances that are part of the Primary and the Secondary region, should look like this:
NOTE: If you do not have a OutputCacheConfig.config
file, create one and place it in folder ~\App_Data\Sitefinity\Configuration
.
10. Modify the SecurityConfig.config file
Open the SecurityConfig.config
of each Sitefinity CMS instance in the Primary region and the Secondary region(s) and make sure that all Sitefinity CMS instances in each region have exactly the same values for authCookieName
, rolesCookieName
, loggingCookieName
, validationKey
, and decryptionKey
properties.
11. Restart the application.
Restart Sitefinity CMS by restarting the IIS application pool.