You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by David Patterson <pa...@gmail.com> on 2015/06/02 18:08:18 UTC

Looking for help in building a configuration that should be simple

I've been asked to build a sample configuration of SolrCloud using Solr
4.10.

I want to have two instances (virtual machines) each with two solr nodes.
Let's call the instances 1 and 2, and the nodes 1AO, 1BB, 2AB, and 2BO.  I
want 1AO to be the owner of that shard with 2AB as the backup, and 2BO to
be the owner of its data and have 1BB as its backup.

I also want to use an external ZooKeeper that we already have and trust for
all 4 solr nodes.

Is this something that is doable, and what does it take to make it so?

Thanks.

Dave Patterson

Re: Looking for help in building a configuration that should be simple

Posted by Erick Erickson <er...@gmail.com>.
What have you tried? Have you worked with the Collections API?

See: https://cwiki.apache.org/confluence/display/solr/Collections+API,
and note that in th eupper left you can download older versions of the
ref guide, including 4.10.

I'd really advise against getting hung up on this bit of your question
"I want 1AO to be the owner of that shard with 2AB as the backup, and 2BO to
be the owner of its data and have 1BB as its backup."

First off, the default behavior is to distribute shards and replicas
across the nodes available in a balanced fashion. Then one of the
points of SolrCloud is that you shouldn't have to worry about who is
or is not the leader, and it'll shift around anyway as you bring nodes
up/down in different sequences. "Leader" is a lightweight role,
especially in a 2x2 setup and completely not worth obsessing over. You
can't really assign specific shards to specific nodes in 4.10, but you
can in the 5.1 with the createNodeSet.shuffle parameter, create a
one-replica (i.e. leader-only) collection then use ADDREPLICA to add
the replicas for the shards exactly where you want. . But again, IMO
it's a waste of time.

Up to you of course,
Erick

On Tue, Jun 2, 2015 at 9:08 AM, David Patterson <pa...@gmail.com> wrote:
> I've been asked to build a sample configuration of SolrCloud using Solr
> 4.10.
>
> I want to have two instances (virtual machines) each with two solr nodes.
> Let's call the instances 1 and 2, and the nodes 1AO, 1BB, 2AB, and 2BO.  I
> want 1AO to be the owner of that shard with 2AB as the backup, and 2BO to
> be the owner of its data and have 1BB as its backup.
>
> I also want to use an external ZooKeeper that we already have and trust for
> all 4 solr nodes.
>
> Is this something that is doable, and what does it take to make it so?
>
> Thanks.
>
> Dave Patterson