Getting HTTP service statuses
Correct balancing of web services requires the user to constantly and accurately transmit the status of processes. IN order to achieve this, special API requests to process status handlers are implemented.
The status requests are as follows:
/${AK-SERVICE-NAME}/health
/${AK-SERVICE-NAME}/readiness
where ${AK-SERVICE-NAME} is a name of the platform service: webcontrol, webadmin, webapi, trkaction, trkwebctrl or cookiesaver.
List of requests
| Request | Name of a service | Description |
|---|---|---|
GET /webcontrol/health | webcontrol | Checks if the webcontrol service is running |
GET /webadmin/health | webadmin | Checks if the webadmin |
GET /webapi/health | webapiapi | Checks if the webapiapi |
GET /trkaction/health | trkaction | checks if the trkaction |
GET /trkwebctrl/health | trkwebctrl | Checks if the trkwebctrl |
GET /cookiesaver/health | cookiesaver | Checks if the cookiesaver |
GET /webcontrol/readiness | webcontrol | Checks if the webcontrol service is ready to accept traffic |
GET /webadmin/readiness | webadmin | Checks if the webadmin service is ready to accept traffic |
GET /webapi/readiness | webapi | Checks if the webapi service is ready to accept traffic |
GET /trkaction/readiness | trkaction | Checks the trkaction service to see if it is ready to accept traffic |
GET /trkwebctrl/readiness | trkwebctrl | Checks the trkwebctrl service to see if it is ready to accept traffic |
GET /cookiesaver/readiness | cookiesaver | Checks if the cookiesaver service is ready to accept traffic |
Response to request
Requests of type /health always return the code 200 with the text "OK" in the response.
If there are no problems, /readiness requests return the code 200 and the following response:
{
"status": "OK"
}
If there are any problems, the code 503 (Service not available) and the response will be returned:
{
"status": "FAIL",
"failed": ["<name of an error>"]
}
The following errors can be specified in the "failed" array:
- started - the service startup has not been completed yet
- mongo - the service does not have access to Mongo
- rmq-alive - the service does not have access to RabbitMQ
- rpc-procrpc - no RPC access to ProcRPC service or ProcRPC service does not have access to Mongo
- rpc-proctask - no RPC access to ProcTask service or ProcTask service does not have access to Mongo
More information about the occured errors can be found in the logs of services.