Just pointing out the obvious, any node can answer to any query by relaying it 
to the node that actually hosts a replica of a shard of the collection(s) being 
queried. It’s just an extra hop if the asked node doesn’t hold a replica 

-Ufuk

—

> On Apr 2, 2025, at 20:59, Jan Høydahl <jan....@cominvent.com> wrote:
> 
> Hi,
> 
> Any of the above :) 
> 
> If you don't care about minimizing network hops during indexing/search, you 
> can use a LB like HAProxy, NginX or some hardware product in front of your 
> nodes for simplified logic in your application.
> 
> However, the best practice these days is to provide your application with a 
> list of Solr host names and initialize a Solr Client (e.g. for Java the 
> CloudSolrClient) with several host names. The client will then reach out to 
> one of these hosts and request the cluster state which lists all nodes, which 
> of them are alive etc. And then the Solr Client will manage routing for you 
> directly to the best node, and also fail over. If your programming language 
> does not have a SolrClient that can do this then implement this in your own 
> code or consider a LB.
> 
> It is no longer recommended for applications to connect to Zookeeper directly 
> to get the cluster state. Zookeeper should be protected and reachable only 
> from the Solr nodes.
> 
> Jan
> 
>> 2. apr. 2025 kl. 11:38 skrev Andreas Mock <andreas.m...@drumedar.de>:
>> 
>> Hi all,
>> 
>> probably for all out there a stupid question, but I didn't find any hint in 
>> the documentation.
>> 
>> When I install a SolrCloud-Cluster with several nodes, how do you connect to 
>> any of them to do the job?
>> Do you install some kind of proxy in front of the nodes? Or do you ask 
>> zookeeper for an endpoint of a known node which is up?
>> Do you try to connect round robin (a timeout on a not-up node could last too 
>> long)?
>> 
>> What is the best practice for SolrCloud?
>> 
>> Best regards
>> Andreas
>> 
>> 
> 

Reply via email to