Synthetic testing
Why is the HTTP health check result unhealthy even though I can get HTTP responses from the application?
There are many possible reasons why the HTTP health check result is unhealthy. In most cases, the health check is unhealthy because the HTTP health check configuration is not consistent with the HTTP request or response. The HTTP health check by default uses HTTP GET method (i.e. No Connection). For this kind of HTTP health check, you will need to check whether below configurations are consistent with the HTTP request and response:
- The “Sending String” field contains the correct url that matches the request url
- If you use the “HTTP HEAD” method, the health check is successful if the status code returned in response matches the code in “Status Code” field. Therefore, you will need to check whether the code in “Status Code” is expected. Typically, you use status code 200 (OK). Other status codes indicate errors.
- If you use the “HTTP Get” method, the health check result is determined by the “Match Type” option and its associated fields “Receive String” and/or “Status Code”.
- In the case of “Match String” option, the health check is successful if the string specified “Receive String” can be found in the HTTP response. So you will need to check whether the string specified in “Receive String” exists in the response returned by application.
- In the case of “Match Status” option, the health check is successful if the status code returned in response matches the code in “Status Code” field. Therefore, you will need to check whether the code in “Status Code” is correct.
- If “Match all” option is chosen, the health check is successful when the status code matches the “Status Code” field, while the string specified “Receive String” can be found in the HTTP response. Thus you will need to check both of the fields are consistent with response.
Why is the DNS health check result unhealthy even though I can get DNS responses from the application?
If the DNS reply is as expected while the health check is unhealthy, in many cases, it is due to the misconfiguration on DNS health check. You will need to check whether the “Domain Name” in DNS health check is correct, and the IP address in “Host address” field matches the host IP address returned in DNS response.