On 5/9/2016 10:56 PM, Sandy Foley wrote:
> Question #1:Is there a SINGLE command that can be issued to each server from 
> a load balancer to check the ping status of each server?

I am not aware of a single request that will test every collection.

The way I have things set up, each load balancer front end (runs on a
port number separate from the others) is only responsible for a single
index.  This is typically a collection in the SolrCloud world.

> Question #2:When running /solr/admin/ping from the load balancer to each Solr 
> node, one of the three nodes returns a status ok.  It's the same node every 
> time; it's the first node that we set up of the 3 (which is not always the 
> leader). The zkcli upconfig command has always been issued from this first 
> node.Out of curiosity, if this command is for local ping only, why does this 
> return status ok on one node (issued from the load balancer) and not the 
> other nodes?

I have never seen a global /solr/admin/ping handler.

If a collection has the ping handler defined, you should be able to
request /solr/COLLECTION_NAME/admin/ping on any server in the cloud,
even a server that does not contain replicas for that collection.  I
believe that as long as the ping handler doesn't set distrib to false,
the configured ping query will be executed across the entire collection
-- effectively testing the whole thing.  You could target specific shard
replicas, but the collection is probably better.  If the collection is
whole (at least one replica of every shard is functional) within the
cloud, the ping handler should return success.  The fact that a 2xx
response is returned verifies that the server itself is up.

With SolrCloud, I am not sure what happens if you disable the ping
handler's health check file.  I have not used a load balancer with
SolrCloud -- our client code is Java, so the small SolrCloud deployment
we have doesn't need one.  My load balancer sits in front of Solr
servers that are *not* running SolrCloud.

Do you need to track the availability of each collection independently? 
If you do, you can set up a backend for each collection with appropriate
cloud servers in it.  Each backend would use the ping URL for that
collection.  This is probably extreme overkill, though ... see the next
paragraph for the solution that probably makes more sense.

If you don't need to track the availability of each collection
independently, then you really only need one back end.  You can simply
pick a collection that you expect to always exist in the cloud (let's
say that collection is named foo) and use /solr/foo/admin/ping as the
health check URL.  As long as you have the appropriate number of
replicas in every collection to survive any expected failure scenario,
SolrCloud itself will take care of making sure the queries work on all
your collections, no matter which server receives the request.

Thanks,
Shawn

Reply via email to