[ 
https://issues.apache.org/jira/browse/SOLR-13055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16716357#comment-16716357
 ] 

Amrit Sarkar commented on SOLR-13055:
-------------------------------------

This can be achieved in multiple manners and following I suggest introducing 
"*isLive*" parameter in *SystemInfoHandler*.

Command: {code}http://localhost:8983/solr/admin/info/system?isLive=true{code}
Responses:
{code}
{
  "responseHeader":{
    "status":0,
    "QTime":1524}}
{code}
{code}
{
  "responseHeader":{
    "status":503,
    "QTime":2},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
    "msg":"Connection to Zookeeper is lost. Node unhealthy.",
    "code":503}}
{code}
note: the response metadata is added in every response in the base class.

Three checks for liveliness in place:
1. Node upTime greater than 0 milliseconds.
2. CoreContainer is not NULL and active, not shut.
3. Able to connect to Zookeeper, in case of node started in Solrcloud mode.

I am quite happy with these basic checks at the node level and design and 
requesting feedback and suggestions.



> Introduce check to determine "liveliness" of a Solr node
> --------------------------------------------------------
>
>                 Key: SOLR-13055
>                 URL: https://issues.apache.org/jira/browse/SOLR-13055
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Amrit Sarkar
>            Priority: Minor
>              Labels: cloud, native
>
> As the applications are becoming cloud-friendly; there are multiple probes 
> which are required to verify availability of a node.
> Like in Kubernetes we need 'liveliness' and 'readiness' probe explained in 
> https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/n
>  determine if a node is live and ready to serve live traffic.
> Solr should also support such probes out of the box as an API or otherwise to 
> make things easier. In this JIRA, we are tracking the necessary checks we 
> need to determine if a node is  'liveliness', in all modes, standalone and 
> cloud.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to