Web+ provides you with many different types of health checks. You can use the feature to check the health status of an application. After you create health checks, Web+ performs specific actions on an application after the health status is retrieved. For example, if a health check for an ECS instance fails, Web+ restarts the ECS instance. If the health status of an application instance is abnormal, Web+ restarts the instance.

Introduction to health checks

In Web+, health checks are categorized into two types:

  • Vitality checks for application instances: checks whether the status of applications is healthy. If a health check for an application instance fails, Web+ restarts the instance. If an instance passes a health check, no action is performed.
  • Response checks for applications: checks whether the status of applications is ready. This type of health check is used to check whether instances are ready to handle client requests. Many applications may require an extended period of time to start. For example, some applications may need to load large amounts of data from disks or applications may have to wait until an external dependent module is started. In such cases, applications cannot provide services even if the related processes are running at the backend. In this scenario, you can use health checks to monitor the health status of applications.
Health checks are separated into Layer-4 checks that are provided by the TCP protocol and Layer-7 checks that are provided by the HTTP protocol.
  • A TCP health check sends SYN handshake packets to an instance to check whether the status of the instance is healthy.
  • An HTTP health check simulates the process of using a Web browser to access resources, which sends HEAD or GET requests to an instance to check whether the instance is healthy. If the value of a status code returned from a health check URL ranges from 200 to 400, it indicates a successful health check.

If your businesses are highly sensitive to traffic load, frequent health checks may impact the availability of normal services. You can use multiple methods to mitigate any impact on your businesses based on actual requirements. These methods include reducing the health check frequency, increasing the health check interval, and changing Layer-7 health checks to Layer-4 health checks. We recommend that you do not disable health checks because it may affect business continuity.

Create or update health checks

  1. Log on to the Web+ console.
  2. On the Overview page, click View All in the upper-right corner of the Last Updated Environments section.
  3. On the Applications and Environments page, click the > icon next to the name of an application to show a list of related environments.
    Note On the Environments list, the most recently updated four environments are displayed. If the required environment is displayed on the list, you can click the name of the environment to go to the Environment Details page.
  4. Click the name of an environment to go to the Overview tab of the Environment Details page.
  5. In the left-side navigation pane, click Configurations to go to the Configurations page.
  6. In the Applications section, click Health Check to configure or change the required health check settings.

    Setting Description
    Health Check Type The protocol type for health checks. Available protocol types include TCP and HTTP.
    • TCP health checks are configured to send handshake packets to instances over an IP network and open connections on a port to check whether each instance is healthy.
    • HTTP health checks are configured to send HEAD or GET requests to the specified health check URL of each instance to check whether each instance is healthy.
    Health Check URL The format of a health check URL is http://<an IP address>:<a port number>/<a directory>. The URL to which you send health check requests. You can check whether an instance is healthy based on a value returned from the specified URL. A returned value that ranges from 200 to 400 indicates a successful health check.
    Unhealthy Threshold If the number of health check retries exceeds the specified threshold, it indicates a failed health check.
    Interval (in seconds) The amount of time between a failed health check and the next health check.
    Timeout (in seconds) The amount of time to wait for a health check response. If no health check response is returned after the timeout period ends, it indicates a failed health check.
  7. After the configuration is complete, click Change Configuration to enable the update.

Disable health checks

If you want to disable health checks for an environment, you can only disable HTTP health checks. You cannot disable TCP health checks.

  1. View the Health Check section. If you select HTTP for the Health Check Type setting, you can enter a health check URL in the Health Check URL setting.
  2. Click Change Configuration in the upper-right corner to apply the update.