Health checking

JLupin Edge Balancer can also be configured to perform health checking mechanism which is covering statuses returned from main server. Also external microservices running on edge balancer can provided ifnormation for health checking.

Standard health checking

Figure 1. Standard health checking.

By default health checking status is obtained from main server and is used in service repository to determine if microservice is available on node. More about controlling this status can be found in platfom docs.

Edge balancer health checking

Edge balancer can also provide health checking for microservices which are running http server (so for servlet and external microservices). Status get this way is overriding the one which is obtaines from main server.

Figure 2. Edge balancer health checking.

Enabling edge balancer health checking is done in configuration. First of all you need to set parameter healthcheckSwitch to 1. When it is set edge balancer will check if microservice parameter isExternalHealthcheck is set to true, and if so then it will try to call health check uri. If response is 200 then it is consider as available. Otherwise status is set to uavailable. Of course one wrong resonse is not enough to change status in service repository. Health checking is executed every healthcheckPeriod. Minimum number of ok responses to change status from unavailable to available is taken from healthcheckOKlimit parameter and minimum number of failed responses to change status from available to unavailable is taken from healthcheckFAILEDlimit. If microservice does not have set health check URI then default value is takien from healthcheckDefaultURI.

Parameters for servlet microservice to set external healthcheck can be found here.