CloudSolrClient preferred over LBHttpSolrClient

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
S G
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CloudSolrClient preferred over LBHttpSolrClient

S G
Hi,

Does anyone know if CloudSolrClient is preferred over LBHttpSolrClient ?
If yes, why so and has there been any good performance benefits documented
anywhere?

Thanks
SG
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CloudSolrClient preferred over LBHttpSolrClient

Amrit Sarkar
S G,

Not sure about the documentation but:

The CloudSolrClient uses a connection to zookeeper to extract cluster
information like who is a the leader for a shard in a solr collection. To
create a CloudSolrClient all you specify is the zookeepers and which
collection you want to work with. Behind the scenes solrj will load balance
and send the request to the right "shard" in the cluster. The
CloudSolrClient is better if you have a cluster of multiple solr nodes
across multiple machines.

While in LBHttpSolrClient, load balancing is done using a simple
round-robin on the list of servers.

Hope this helps.

Amrit Sarkar
Search Engineer
Lucidworks, Inc.
415-589-9269
www.lucidworks.com
Twitter http://twitter.com/lucidworks
LinkedIn: https://www.linkedin.com/in/sarkaramrit2

On Mon, Jul 17, 2017 at 11:38 PM, S G <[hidden email]> wrote:

> Hi,
>
> Does anyone know if CloudSolrClient is preferred over LBHttpSolrClient ?
> If yes, why so and has there been any good performance benefits documented
> anywhere?
>
> Thanks
> SG
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CloudSolrClient preferred over LBHttpSolrClient

Erick Erickson
Also, since CloudSolrClient is ZK aware it is notified when any Solr
instances go up and down so it will take the appropriate action. Also,
when indexing CloudSolrClient will send updates to the correct leader,
reducing the hops for indexing documents.

Short form: CloudSolrClient is preferred over LBHttpSolrClient.

Best,
Erick

On Mon, Jul 17, 2017 at 12:15 PM, Amrit Sarkar <[hidden email]> wrote:

> S G,
>
> Not sure about the documentation but:
>
> The CloudSolrClient uses a connection to zookeeper to extract cluster
> information like who is a the leader for a shard in a solr collection. To
> create a CloudSolrClient all you specify is the zookeepers and which
> collection you want to work with. Behind the scenes solrj will load balance
> and send the request to the right "shard" in the cluster. The
> CloudSolrClient is better if you have a cluster of multiple solr nodes
> across multiple machines.
>
> While in LBHttpSolrClient, load balancing is done using a simple
> round-robin on the list of servers.
>
> Hope this helps.
>
> Amrit Sarkar
> Search Engineer
> Lucidworks, Inc.
> 415-589-9269
> www.lucidworks.com
> Twitter http://twitter.com/lucidworks
> LinkedIn: https://www.linkedin.com/in/sarkaramrit2
>
> On Mon, Jul 17, 2017 at 11:38 PM, S G <[hidden email]> wrote:
>
>> Hi,
>>
>> Does anyone know if CloudSolrClient is preferred over LBHttpSolrClient ?
>> If yes, why so and has there been any good performance benefits documented
>> anywhere?
>>
>> Thanks
>> SG
>>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CloudSolrClient preferred over LBHttpSolrClient

Susheel Kumar-3
In reply to this post by Amrit Sarkar
Also per def of CloudSolrClient.


SolrJ client class to communicate with SolrCloud. Instances of this class
communicate with Zookeeper to discover Solr endpoints for SolrCloud
collections, and then use the LBHttpSolrClient
<http://grepcode.com/file/repo1.maven.org/maven2/org.apache.solr/solr-solrj/5.0.0/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java#LBHttpSolrClient>
to
issue requests.

On Mon, Jul 17, 2017 at 3:15 PM, Amrit Sarkar <[hidden email]>
wrote:

> S G,
>
> Not sure about the documentation but:
>
> The CloudSolrClient uses a connection to zookeeper to extract cluster
> information like who is a the leader for a shard in a solr collection. To
> create a CloudSolrClient all you specify is the zookeepers and which
> collection you want to work with. Behind the scenes solrj will load balance
> and send the request to the right "shard" in the cluster. The
> CloudSolrClient is better if you have a cluster of multiple solr nodes
> across multiple machines.
>
> While in LBHttpSolrClient, load balancing is done using a simple
> round-robin on the list of servers.
>
> Hope this helps.
>
> Amrit Sarkar
> Search Engineer
> Lucidworks, Inc.
> 415-589-9269
> www.lucidworks.com
> Twitter http://twitter.com/lucidworks
> LinkedIn: https://www.linkedin.com/in/sarkaramrit2
>
> On Mon, Jul 17, 2017 at 11:38 PM, S G <[hidden email]> wrote:
>
> > Hi,
> >
> > Does anyone know if CloudSolrClient is preferred over LBHttpSolrClient ?
> > If yes, why so and has there been any good performance benefits
> documented
> > anywhere?
> >
> > Thanks
> > SG
> >
>
Loading...