You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2009/08/10 13:05:01 UTC
[Solr Wiki] Update of "SolrReplication" by ShalinMangar
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by ShalinMangar:
http://wiki.apache.org/solr/SolrReplication
The comment on the change is:
Added example for repeater
------------------------------------------------------------------------------
<!> ["Solr1.4"]
+
+ [[TableOfContents]]
= Features =
* Replication without requiring external scripts
@@ -16, +18 @@
The new Java-based replication feature is implemented as a !RequestHandler. Configuring replication is therefore similar to any normal !RequestHandler.
- === in master: ===
+ === Master ===
{{{
<requestHandler name="/replication" class="solr.ReplicationHandler" >
<lst name="master">
@@ -45, +47 @@
On the master server, the file name of the slave configuration file can be anything, as long as the name is correctly identified in the "confFiles" string; then it will be saved as whatever file name appears after the colon ':'.
- === in slave: ===
+ === Slave ===
{{{
<requestHandler name="/replication" class="solr.ReplicationHandler" >
<lst name="slave">
@@ -83, +85 @@
=== Setting up a Repeater ===
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.
-
+ Example configuration of a repeater:
+ {{{
+ <requestHandler name="/replication" class="solr.ReplicationHandler">
+ <lst name="master">
+ <str name="replicateAfter">commit</str>
+ <str name="confFiles">schema.xml,stopwords.txt,synonyms.txt</str>
+ </lst>
+ <lst name="slave">
+ <str name="masterUrl">http://master.solr.company.com:8080/solr/replication</str>
+ <str name="pollInterval">00:00:60</str>
+ </lst>
+ </requestHandler>
+ }}}
= Replication Dashboard =
This shows the following information