SolrCloud auto routes the documents to the correct shard leader, however
you would be able to reduce the extra hop by sending the document to the
correct shard. Here are a few posts that explain how the document routing
in SolrCloud works:

https://lucidworks.com/2013/06/13/solr-cloud-document-routing/
https://lucidworks.com/2014/01/06/multi-level-composite-id-routing-solrcloud/

If the extra hop isn't something you are much bothered about, I wouldn't
suggest adding the complexity to your client code.

The Java client that Solr ships with, SolrJ has a 'smart' client i.e.
CloudSolrClient, that tracks the clusterstate in zk by keeping a watch. It
also contains caching logic, and more to optimize sending requests to a
SolrCloud cluster. You might want to explore that and possibly use that
instead.

-Anshum


On Sun, Jan 29, 2017 at 9:49 AM GW <thegeofo...@gmail.com> wrote:

> Hi folks,
>
> 1: Can someone point me to some good documentation on how this works? Or is
> it so simple that I'm over thinking?
>
> My understanding of document routing is that I might be able to check the
> hash of a shard with the hash of the document id and determine the exact
> node / document and know exactly where to send the request reducing
> Zookeeper traffic.
>
> I'm getting ready to deploy and I have used the recommended format in my
> doc id
>
> All my work is REST/curl -> Solrcloud
>
> I plan to watch cluster status through the admin console REST to and build
> a list of OK servers to do the reads for the website.
>
> I have a crawler that will be running mostly 3:am Eastern to 3:am Pacific,
> outside the bulk of read activity. I plan to do all posts to Who Has
> Zookeeper according the admin REST API
>
> Can I get some reassurance? Be gentle, this is my very first solrcloud
> deployment and it's going to production. I'm about to write script for
> something that I still feel I am week in concept.
>
> When I'm done and I totally understand, I promise to publish a nice A - Z
> REST deployment HowTo for HA with class examples in (PHP,Perl,Python)/curl.
>
>
> Best regards,
>
> GW
>

Reply via email to