tencent cloud

Feedback

Health Check

Last updated: 2024-01-09 12:40:53

    Overview

    During the running of an application instance, the process may exit due to an exception, or the instance may run abnormally because the running environment disk is too full, and so on. In such cases, you need to restart the application instance.
    In addition, the application instance may be temporarily unable to receive new requests due to database and other access exceptions. In that case, you need to remove the exceptional instance from the load balancer and add the instance to the load balancer when the instance recovers.
    For the above two types of OPS requirements, TEM provides two types of health checks to meet the requirements of automatic OPS:
    Liveness check: check whether an application instance is running properly. If not, restart the instance.
    Readiness check: check whether an application instance is ready. If not, stop forwarding traffic to the instance.
    Overall process
    TEM provides the HTTP request method for health checks, and the corresponding HTTP APIs need to be provided by the application itself. Therefore, the overall process of using the health check feature consists of two steps:

    Directions

    Step 1: implement health check HTTP APIs in the application

    The application needs to implement the health check HTTP APIs based on the development language and framework used. The following are some common examples in the industry:
    The application needs to implement two health check HTTP APIs to handle liveness and readiness checks separately (in this example, the request paths for the liveness and readiness checks are set to /livez and /healthz respectively).

    Step 2: configure the health check feature when deploying the application on the TEM platform

    If no environment is created, create an environment.
    Create and deploy an application as follows (a JAR package is used in this example):
    1. Select the application deployment region at the top of the Application Management page in the TEM console.
    2. Click Create to access the New application page and enter the application information.
    
    
    
    3. Click Submit and click OK in the pop-up window to deploy the application.
    4. On the Deploy Application page, configure the relevant parameters as needed.
    Set Request Path and Port to the HTTP API path and port number for health check respectively.
    
    
    
    5. Click Deploy Application. The platform automatically manages the application according to the health check configuration.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support