Cloud Deposition Solr

I currently have a zookeeper instance controlling replication on 3 servers. This is the built-in zoo solr. It works well in my web application.

I have a new requirement that will require shards in the cloud, and I'm not sure how to implement it. Basically, I want to separate data that can only be updated by me, shard 1, from data that users can update, shards 2. From time to time I will completely replace the data directory in shard 1, but I do not want to violate the data created by the user in shard 2.

Shard 1 does not need to be replicated, because I can copy new data to each server when I decided to upgrade it, however, workaround 2 requires replication.

I am currently running the following command on the server where zookeeper is running -

java -Dbootstrap_confdir=solr/myApp/conf -Dcollection.configName=myConfig -DzkRun -DnumShards=1 -jar start.jar

And the following command on other servers without zookeeper

java -Djetty-port=8983 -DzkHost=129.**.30.11:9983 -jar start.jar&

This creates a single instance of solr solr * 3

I think I just need to add 1 static splinter to this configuration, but I'm not sure what sequence of commands to execute it.

Many thanks

+4
source share
1 answer

First, you use zookeeper to support your shards and leaders / cues. Therefore, if you want to have one fragment with two instances and another fragment with one leader, you will have to change your command as: 1) provide -DnumShards = 2 so that zookeeper knows that you need two fragments 2) specify the -DzkHost parameter for this first instance of solr.

java -Dbootstrap_confdir=solr/myApp/conf -Dcollection.configName=myConfig -DzkRun -DnumShards=2 -DzkHost=** -jar start.jar

, , shard2 . , shard1 ( ), shard2 i.e leader

. .

Explanation

3 ! , solrCloud, zookeeper. :

1) solr- zookeeper, 1 solr cloud shard1

2) solr zookeeper..., DnumShards = 2, Zookeeper , 1 , shard2 . 1 .

3) 3- zookeeper, zookeeper , 2 , shard1 .

--- > shard1 --- > 1, server3

      --->shard2--->server2
+2

Source: https://habr.com/ru/post/1536519/


All Articles