How Do I Monitor the Health Status of the Data Center?
About this task
This use case explains how to track and monitor the health status of the data centers in the consistent hash ring using the REST API GET /rest/apigateway/dataspace/status. The status can be GREEN, YELLOW, or RED.
If the health status is GREEN, then all the data centers are able to communicate with one another without any problem.
If the health status is YELLOW, then it indicates that this data center is unable to communicate with one or more of the data centers in the ring. This might be because one or more data centers in the ring is down temporarily as it is getting restarted. It could also be permanently down because of connection issue or the API Gateway instance is down. The API Gateway waits for a certain period of time, as configured in the pg_Dataspace_TimeToFail, before marking the data center as down. Once the data center is marked as down, it will be marked as failed data center and health status will be marked as YELLOW. The node gets marked as YELLOW until the time configured in the pg_Dataspace_WarmupTime property gets elapsed.
If the data center is not up even after the time specified in the pg_Dataspace_WarmupTime property, then the health status is marked as RED.
The following flow chart explains how the health of the data center is monitored using the GET /rest/apigateway/dataspace/status REST API:

For example, assume that you have three data centers DC 1, DC 2, and DC 3 in the following landscape:
Data Center Name | Host Name | Region |
---|---|---|
DC 1 | uk.myhost.com | United Kingdom |
DC 2 | us.myhost.com | United States |
DC 3 | in.myhost.com | India |
In general, the active-active mode can accommodate any number of data centers in the consistent hash ring. But in the hot standby mode there are only two nodes in the ring.
To track the health status of the data centers