A master may be able to serve only so many slaves without affecting performance. Some organizations have deployed slave servers across multiple data centers. If each slave downloads the index from a remote data center, the resulting download may consume too much network bandwidth. To avoid performance degradation in cases like this, you can configure one or more slaves as repeaters. A repeater is simply a node that acts as both a master and a slave.

  • To configure a server as a repeater, both the master and slave configuration lists need to be present inside the ReplicationHandler requestHandler in the solrconfig.xml file.

  • Be sure to have replicateAfter ‘commit’ setup on repeater even if replicateAfter is set to optimize on the main master. This is because on a repeater (or any slave), only a commit is called after index is downloaded. Optimize is never called on slaves.
  • Optionally, one can configure the repeater to fetch compressed files from the master through the ‘compression’ parameter (see ‘slave’ section for details) to reduce the index download time.

Example configuration of a repeater:

<requestHandler name="/replication">
    <lst name="master">
      <str name="replicateAfter">commit</str>
      <str name="confFiles">schema.xml,stopwords.txt,synonyms.txt</str>
    <lst name="slave">
      <str name="masterUrl">http://master.solr.company.com:8080/solr/replication</str>
      <str name="pollInterval">00:00:60</str>

Also See How to set up Solr Replication

Post By Editor (2,827 Posts)

Website: →