On 6/8/2018 12:13 PM, THADC wrote:
> I am having trouble getting a clear understanding of the relationship
> between my 3-node zookeeper cluster and how those 3 nodes relate to solr
> replicas (if at all). Since the replicas exist for failover purposes
> (correct?) as opposed to for load balancing (which is what the sharding
> strategy addresses), I was assuming that  there should be as many replicas
> per shard as there are zookeeper nodes. So in my case, one zookeeper node is
> the leader for a given shard, while the other two are followers. Is this
> correct?

There is no relationship at all between the number of zookeeper nodes
and the number of SolrCloud nodes, shards, or replicas.

Within the zookeeper ensemble there is an election to determine the
leader for the entire ensemble.  But that is for zookeeper -- it has has
absolutely no connection to the leader elections that Solr conducts for
its shard replicas.

As Erick already said:

The reason to have multiple shards in a collection is so that Solr can
handle a larger index.  By sharing the index across additional servers,
adding shards CAN increase performance, but if the number of machines
doesn't increase, fewer shards is usually (but not always) better.

At least two replicas per shard are required for high availability.
Some prefer to have three replicas for extra reliability.  Load
balancing is handled by additional replicas, not additional shards.

Thanks,
Shawn

Reply via email to