Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Compute Cloud
    • All guides
      • Updating an instance group
      • Updating an instance group based on a YAML specification
      • Moving an instance group to a different availability zone
      • Moving an instance group with a network load balancer to a different availability zone
      • Moving an instance group with an L7 load balancer to a different availability zone
      • Configuring application health checks on a VM instance
      • Pausing an instance group
      • Resuming an instance group
      • Sequentially restarting instances in a group
      • Sequentially recreating instances in a group
      • Stopping an instance group
      • Starting an instance group
      • Configuring instance group access permissions
      • Removing an instance group from a placement group
      • Deleting an instance group
    • Viewing operations with resources
  • Yandex Container Solution
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Managing an instance group
  3. Configuring application health checks on a VM instance

Configuring application health checks on a VM instance

Written by
Yandex Cloud
Updated at May 5, 2025

By configuring app health checks on a VM instance, you can improve application availability and ensure its responsiveness. Instance Groups will run a check and automatically recover the instance if it fails it. Do not confuse this with a network load balancer health check. Learn more about automatic recovery and types of checks here.

This section describes how to configure an application health check for an existing group.

Management console
CLI
  1. In the management console, open the folder containing the instance group you need.
  2. Select Compute Cloud.
  3. In the left-hand panel, select Instance groups.
  4. Select the group to update.
  5. In the top-right corner of the page, click Edit.
  6. Under Health checks, enable Activate.
  7. Configure health check settings:
    • Type: HTTP or TCP.

    • Path (for HTTP): URL path Instance Groups will use to send HTTP check requests.

    • Port: Port in the range of 1 to 32767 Instance Groups will use to send check requests on.

      Alert

      Only HTTP/1.1 and lower are supported.

    • Timeout in sec: Response timeout in seconds.
      If you connected your group to a network load balancer, we recommend setting this parameter to a higher value than the one for the load balancer.

    • Interval in sec: Interval between app health checks run by Instance Groups, in seconds.

    • Healthy threshold: Number of successful health checks required to consider a VM instance healthy.
      If you connected your group to a network load balancer, we recommend setting this parameter to a lower value than the one for the load balancer.

    • Unhealthy threshold: Number of failed health checks required to consider a VM instance unhealthy.
      If you connected your group to a network load balancer, we recommend setting this parameter to a higher value than the one for the load balancer.

  8. Click Save.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

  1. See the description of the CLI command for updating an instance group:

    yc compute instance-group update --help
    
  2. Get a list of instance groups in the default folder:

    yc compute instance-group list
    

    Result:

    +----------------------+-----------------------+------+
    |          ID          |         NAME          | SIZE |
    +----------------------+-----------------------+------+
    | amc65sbgfqeq******** | first-instance-group  |    2 |
    +----------------------+-----------------------+------+
    
  3. Select ID or NAME of the group you need, e.g., first-instance-group.

  4. Get information about the instance group.

  5. Create a YAML file with any name, e.g., group.yaml, and define the following based on the info you get:

    • Instance template.
    • Policies.
    • Service account ID.
    • Network load balancer specification, if required.
  6. Add a health check specification to the file, e.g, for HTTP checks:

    ...
    health_checks_spec:
      health_check_specs:
        - http_options:
            port: 80
            path: /
          interval: 30s
          timeout: 10s
          unhealthy_threshold: 5
          healthy_threshold: 3
    ...
    

    Where:

    Key Value
    health_check_specs Health check specification
    http_options Settings for HTTP health checks. Only HTTP/1.1 and lower are supported.
    If you want to use TCP, specify only the port number in the tcp_options property.
    port Port in the range of 1 to 32767 Instance Groups will use to send check requests on.
    path URL path Instance Groups will use to send HTTP check requests.
    interval Interval between app health checks run by Instance Groups, in seconds.
    timeout Response timeout in seconds.
    If you connected your group to a network load balancer, we recommend setting this parameter to a higher value than the one for the load balancer.
    unhealthy_threshold Number of failed health checks required to consider a VM instance unhealthy.
    If you connected your group to a network load balancer, we recommend setting this parameter to a higher value than the one for the load balancer.
    healthy_threshold Number of successful health checks required to consider a VM instance healthy.
    If you connected your group to a network load balancer, we recommend setting this parameter to a lower value than the one for the load balancer.
  7. Update the instance group in the default folder:

    yc compute instance-group update --name first-group --file group.yaml
    

    Instance Groups will initiate instance group updating.

Was the article helpful?

Previous
Moving an instance group with an L7 load balancer to a different availability zone
Next
Rolling updates
© 2025 Direct Cursus Technology L.L.C.