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 sathish_ix <sk...@inautix.co.in> on 2013/05/27 12:46:08 UTC

Application connecting to SOLR cloud

Hi,

We have setup the SOLR cloud with zookeeper.

 Zookeeper (localhost:8000)
 1 shard   (localhost:9000)
 2 Replica (localhost:9001,localhost:9002)

 Question :
  We load the solr index from Relational DB using DIH, Based on solr cloud
documentation the request to load the data will be forwarded to Leader.



Collection--------Shard1---------Leader1(localhost:9000)
                          |   |_________Replication1(localhost:9001)
                          |____________Replication2 (localhost :9002)

1.   To identify Leader (Here localhost:9000) from the zookeeper,  do we
need to read the znode clusterstate.json having leader=true   by connecting
to zookeeper. ?
             

2.  Do we need to keep external load balancer for (localhost:9000,9001,9002)
to route request ?

Is there any other way ?

Thanks,
Sathish

   






          

                      




--
View this message in context: http://lucene.472066.n3.nabble.com/Application-connecting-to-SOLR-cloud-tp4066220.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Application connecting to SOLR cloud

Posted by Erick Erickson <er...@gmail.com>.
There's no requirement to send the document to any leader, send updates to
any node in the system. The documents will be automatically forwarded to
the appropriate leaders.

You may be getting confused by the "leader aware" solr client stuff. It's
slightly more efficient to send updates to the leader directly and save the
extra hop, but it's not a requirement at all.


You don't need the external load balancer at all, internally Solr does its own
load balancing. That said, if your external app connects to a single node and
that node goes down, regardless of any internal load balancing, it's a single
point of failure so having the external load balancer can still make sense.

Best
Erick


On Mon, May 27, 2013 at 6:46 AM, sathish_ix <sk...@inautix.co.in> wrote:
> Hi,
>
> We have setup the SOLR cloud with zookeeper.
>
>  Zookeeper (localhost:8000)
>  1 shard   (localhost:9000)
>  2 Replica (localhost:9001,localhost:9002)
>
>  Question :
>   We load the solr index from Relational DB using DIH, Based on solr cloud
> documentation the request to load the data will be forwarded to Leader.
>
>
>
> Collection--------Shard1---------Leader1(localhost:9000)
>                           |   |_________Replication1(localhost:9001)
>                           |____________Replication2 (localhost :9002)
>
> 1.   To identify Leader (Here localhost:9000) from the zookeeper,  do we
> need to read the znode clusterstate.json having leader=true   by connecting
> to zookeeper. ?
>
>
> 2.  Do we need to keep external load balancer for (localhost:9000,9001,9002)
> to route request ?
>
> Is there any other way ?
>
> Thanks,
> Sathish
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Application-connecting-to-SOLR-cloud-tp4066220.html
> Sent from the Solr - User mailing list archive at Nabble.com.