Search code examples
apacheknox-gateway

health check for apache knox


I want to create a health check mechanism to make sure I remove unhealthy Knox instances that are configured behind a load balancer.

Normal ping to the underlying instances will help check whether the machine is reachable or not. But it will not help determine if the gateway is healthy/running to serve incoming requests to that instance.

I can make a request to Knox through the LB, but it will goto only one instance and there is no way of knowing it.

I want to know if there is any way to determine the same? Or is there a mechanism that is provided in Knox itself though which I can make a http (non-secure, as direct https calls to the instance is not permitted) call to the gateway server and determine?

Thanks!!


Solution

  • I am not sure which Load balancer you are using. From the "health check" I am assuming you are using Elastic Load Balancer.

    Create a health check with tcp protocol. It will only check whether those port are open or not. If the knox is not running those instances will go to out of service and the incoming requests will be re directed to the instances which are in service .

    PFB the screenshots for the same. enter image description here enter image description here enter image description here