Apache Solr Index Replication

                   Smart Techie

                  In the last Apache Solr related articles we have discussed “How to set up Apache Solr?“, “How to configure Apache Solr to index data from database?” , etc.. In this article we will see “how to set up Apache Solr replication?“. Before getting into the configuration details, we will discuss a use case to use replication. In most of the online sites, the data will get the update so frequently. To make this data available to search, the Apache Solr server requires to do delta indexing so frequently. So, the Solr server used for indexing will be always busy with the indexing. If we use the same indexing server for searching, then the search functionality has a performance hit. To isolate the search with the indexing and to achieve better search performance, we need to go with replication. To setup indexing replication we require at least two Solr instances. The below diagram will depict the replication setup.

Apache Solr Indexing Replication

                   From the above diagram, the master Solr instance will do indexing. The Salve Solr instances will serve the content to the web. The index from master to slave instances will get replicate based on the replication interval. Now we will see the configuration details.

Master configuration:

             To make Apache Solr instance as “Master”, we need to do the below configuration in solrconfig.xml.


You can find more details of master configuration here.

Slave configuration:

To make Apache Solr instance as “Slave”, we need to do the below configuration in solrconfig.xml.


You can find more details of slave configuration here.

Now, we will see the admin consoles of master and slave instances.

Master Solr Admin Console

                     From the “Master” Solr instance admin console, we can disable the replication to all the “Slave” Solr instances by clicking on “Disable Replication” button.

Now, we will see the salve Solr instance admin console.

Slave Admin Console

                     From the “Slave” Solr instance admin console, we will come to know the replication polling time, the master instance, the master and slave index statuses, and the last iteration replication failures and success details. If we want to disable the polling from the slave, we can use the “Disable Polling” button. If we want to replicate the index from the master on-demand basis, we can use “Replicate Now” button.

                If you want more details about Solr replication, you can find here.

I am Siva Prasad Rao Janapati. Working as Technical Architect. Has hands on experience on ATG Commerce(DAS/DPS/DCS), Mozu commerce, Broadleaf Commerce, Java, JEE, Spring, Play, JPA, Hibernate, Velocity, JMS, Jboss, Weblogic,Tomcat, Jetty, Apache, Apache Solr, Spring Batch, JQuery, NodeJS, SOAP, REST, MySQL, Oracle, Mongo DB, Memcached, HazelCast, Git, SVN, CVS, Ant, Maven, Gradle, Amazon Web services, Rackspace, Quartz, JMeter, Junit, Open NLP, Facebook Graph,Twitter4J, YouTube Gdata, Bazzarvoice,Yotpo, 4-Tell, Alatest, Shopzilla, Linkshare. I have hands on experience on open sources and commercial technologies.

Tagged with: , , , , ,
Posted in Apache Solr, Solr Replication
One comment on “Apache Solr Index Replication
  1. Anonymous says:

    Nice information on Apache Solr

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Java Code Geeks
Java Code Geeks
%d bloggers like this: