First of all, let me list down the list of software versions that I used in this article
Sitecore Experience Platform 8.1 rev. 160519 (8.1 Update-3)
Solr 4.10.4 - recommended Solr version for Sitecore 8.1
What is Solr Index Replication?
Index Replication distributes complete copies of a master index to one or more slave servers. The master server continues to manage updates to the index. All querying is handled by the slaves. This division of labor enables Solr to scale to provide adequate responsiveness to queries against large search volumes.
Sitecore & Solr Master/Slave server architecture
Below you can find two suggested architecture for Sitecore based on Solr master/slave index replication.
Single slave server architecture:
Multiple slaves server architecture:
Configuring the Replication RequestHandler on a Master Server
Index replication will be configured in Solr core level by enabling master replication request handler in Solr Master Server. Let me share how to configure it on sitecore_core_index.
- Open solrconfig.xml under Solr sitecore_core_index core folder
- Uncomment master node under
- Set the following parameters on initialization of the handler (replicateAfter, backupAfter, confFiles, commitReserveDuration)
- Repeat these steps for other indexes
For more information about how the purpose of each parameter and parameters values please read page 481 on https://archive.apache.org/dist/lucene/solr/ref-guide/apache-solr-ref-guide-4.10.pdf
Configuring the Replication RequestHandler on a Slave Server
Index replication will be configured in Solr core level by enabling slave replication request handler in Solr Slave server. Let me share how to configure it on sitecore_core_index.
- Open solrconfig.xml under Solr sitecore_core_index core folder
- Uncomment slave node under
- Set the following parameters on initialization of the handler (masterUrl, pollInterval, compression, httpConnTimeout, httpReadTimeout, httpBasicAuthUser, httpBasicAuthPassword)
- Repeat these steps for other indexes
For more information about how the purpose of each parameter and parameters values please read page 483 on https://archive.apache.org/dist/lucene/solr/ref-guide/apache-solr-ref-guide-4.10.pdf
Note: Solr slave servers are read only and can't update indexes that is why we will explain later few changes on both Sitecore CM & CD instances configurations.
Configuring Sitecore CM server
Sitecore CM server will be responsible for updating/rebuilding indexes. Please configure your CM instance as illustrated below:
- Enable all Sitecore indexes configuration files - Don't follow the Sitecore search indexes required in a scalable environment content management section
- Set your Solr master server URL
Configuring Sitecore CD server
Sitecore CD server will query from Slave servers only, so you will need to patch the Sitecore default configuration by changing indexes strategy to manual. Please configure your CD instance as illustrated below:
- Enable CD Sitecore indexes configuration files only - Do follow the Sitecore search indexes required in a scalable environment content delivery section
- Set your Solr slave server URL