All Products
Search
Document Center

Health check

Last Updated: Feb 01, 2019

In the health check process, EDAS Agent periodically checks and reports the status of containers and applications and then sends the results to the console.Health checking can help you understand the overall condition of service operation in the cluster environment, and facilitates auditing and troubleshooting.You can configure a health check URL on the EDAS console to check whether the deployed applications are running properly.

If your business is highly sensitive to the traffic load, frequent health checking may impact normal service.You can reduce this impact by reducing the frequency of health checking or increasing the health check interval.To guarantee the service availability, we recommend that you do not disable health checking.

Health check process

You can configure health checks to monitor end nodes specified by IP address or domain name.EDAS health check automatically submits requests to your applications, servers, or other resources at a fixed interval you specify to verify whether it is accessible, available, and functional.You can also make a request similar to a user’s request by configuring a health check URL to verify the running status of the application features.

A health check is triggered every 10 seconds.The details of Steps 1 and 2 in the figure are as follows:

  1. EDAS Agent checks whether the Ali-Tomcat process for running your application is alive.

    • If the process is alive, EDAS Agent proceeds to Step 2.

    • If the process is not alive, the health check ends and the check result is “Fail”.

  2. EDAS Agent checks whether status code 200 is returned for the set URL.

    If no URL is configured, health checking stops. If you set a URL, EDAS Agent checks whether the HTTP code 200 is returned for the set URL.

Create, update, and delete health checks (console)

In the EDAS console, you can view the running status of applications (“Normal” or “Runtime Error”) and health checking process reports.For all health checks, except calculated health checks, you can also view the reasons for failure of the last health check.

You can create a health check URL when creating an application. You can also add or modify health checks on the Application Settings page after an application has been created and deployed.For ECS applications and Swarm applications, you can also click the Settings button on the Application Settings page, and set the Health Check parameters.

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. On the Applications page, click Create Application in the upper-right corner.

  3. In the Create Application dialog box, enter application information and click Next Step: Application Configurations.On the Application Configuration page, click Deployment Method and follow the instructions on the page.On the Application Configuration page, you can create Application Health Check*.

    Note: The port range is 1 to 65535.

     Create a health check

    Example: When deploying a WAR package, you can set the health check URL to http://127.0.0.1:8080/order/healthCheck.html if no other container parameters are configured. Also, you can set the health check URL to http://127.0.0.1:8081/healthcheck.html if the container path is set to the root path, the port is set to “8081”, and the WAR package contains the “healthcheck.html” file used for health status identification.

  4. After creating a health check, you can view the settings of the health check in the Application Settings area on the Application Details page.You can also click Modify to modify or delete the health check settings.

  5. On the Application Details page, click the Settings button to the right of the Application Settings area for ECS applications and Swarm applications. In the displayed Application Settings dialog box, click the Health Check tab. On the tab page that is displayed, follow the instructions in Step 3 to add, modify, or delete health check settings.

Description of health check status:

After you configure the application health check, the application displays different statuses.

  • Container Exited: displayed if EDAS Agent detects that the Ali-Tomcat process is not alive in Step 1 of the health check flow chart.

  • Application Exception: displayed when any code other than 200 is returned for the URL set in step 2 of the health check flow chart.

  • Normal: displayed if no exception occurs in steps 1 and 2 of the health check flow chart.

    If EDAS Agent detects that no URL is set, the Normal state followed by an exclamation mark is displayed. When you move the cursor over the status, the prompt “Please configure the application’s health check URL so that its running status can be reflected more accurately” is displayed.”

  • Agent Exception: displayed if EDAS Agent does not report status information to the EDAS server within 30 seconds.