On 9/22/2016 11:33 AM, jimtronic wrote:
> Boxes 1,2, and 3 have replicas of collections dogs and cats. Box 4 has
> only a replica of dogs. All of these boxes have a healthcheck file on
> them that works with the PingRequestHandler to say whether the box is
> up or not. If I hit Box4/cats/admin/ping, Solr forwards the ping
> request to another box which returns with status OK. Is there anyway
> to stop a box from forwarding a request to another node?

SolrCloud assures that as long as a node is functional, and the
collection is whole *somewhere* in the cloud, requests will work, even
if the node you're talking to has absolutely no data from that collection.

What exactly are you trying to determine with your ping handler?

If you're trying to check the status of the cores on each specific
machine, that's not the way to do it.  Try  sending a request directly
to the core (cats_shard1_replica1, for example) with distrib=false. 
That should remain entirely local.  The core name will typically be
different for every server that contains replicas for that collection,
which can make automation difficult.  You can get a list of cores for a
machine with a call to the CoreAdmin API.

To check whether the MACHINE is working, independent from any core or
collection, use a request for something global, like the LIST command on
the Collections API.

A request to /solr/<collection>/admin/ping is a check to make sure the
*collection* is working.  It's reasonable in that scenario for SolrCloud
to forward the request to wherever it needs to go, and to load balance
the requests across the cloud -- that's what it is designed to do.  If
the request works, then the machine must be working ...but you can also
be sure that the collection is working, wherever it might live.

If you use "distrib=false" with a URL containing the *collection* name
(instead of the specific core name), the distrib parameter is probably
ignored, because satisfying a request sent to the collection name
requires a distributed lookup in zookeeper data just to learn where the
collection lives.  I do not have a large enough cloud install to check
whether this is true.


Reply via email to