soabase/exhibitor

Load Balancer Health Check

Opened this issue · 1 comments

pjrm commented

I'm using an load balancer in front of the Zookeeper Nodes and for health check i'm only using the client port 2181.

The problem is when exhibitor starts at the first time, Zookeeper run as standalone mode, which will indicate on ELB that it's able to receive connections. I only want to accept connections when the node is available and ready in the cluster.

To achieve this I could use the endpoint "exhibitor/v1/cluster/state" which gives the state of the current ZK node, but this endpoint always return "200 - OK".

How do you guarantee that the ZK is healthy (joined in the cluster) ?

Thanks in advance

pjrm commented

To deal with this issue I did a PR#371 that contains the endpoint "exhibitor/v1/cluster/node/serving".

It returns HTTP Code 200 (OK) if the node is serving and not running in standalone mode. Otherwise, it returns 503.