Solr Replication

Currently, we set up Solr replication between solr-5-prod (Master) and kaboodle20 (Slave), and the poll interval is 60 secs which would sync data every minute without shutting down solr services.


For configuration, please see Solr's tutorial Index Replication. It is pretty straightforward and simple, all you need to modify is solrconfig.xml. Here are some notes for the configuration:

  1. You need to create at least one core before you modify solrconfig.xml. Every core has its own solrconfig.xml.
  2. Slave and Master should have the same version, otherwise Slave may not be able to read Master's data format. For example, if Master is 8.7.1 but Slave is 8.0.0, Slave would fail to start.
  3. You will need to open the port 8983 on Master to Slave.
  4. The format for “masterUrl” in the solrconfig.xml: <str name=“masterUrl”>http://master.solr.company.com:8983/solr/core_name/replication</str>
  5. In the slave node, go to bin/solr.in.sh and add SOLR_OPTS=“$SOLR_OPTS -Dsolr.disable.shardsWhitelist=true” to the shell script.
  6. After setting the configuration, you will need to restart solr services on both sides.