Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Compute Cloud
  • Getting started
    • Overview
    • Creating a Linux VM
    • Creating a Windows VM
    • Creating instance groups
  • Step-by-step instructions
    • All instructions
    • Creating VMs
      • Creating a Linux VM
      • Creating a Windows VM
      • Creating a VM from a set of disks
      • Creating a VM with disks restored from snapshots
      • Creating a VM from a custom image
      • Creating a preemptible VM
      • Creating a VM with a GPU
    • DSVM
      • Overview
      • Creating a VM from a public DSVM image
    • Placement groups
      • Creating a placement group
      • Deleting a placement group
      • Creating a VM in a placement group
      • Adding a VM to a placement group
      • Removing a VM instance from a placement group
    • Images with pre-installed software
      • Creating a VM from a public image
      • Configuring software
      • Working with a VM based on a public image
      • Getting a list of public images
    • Getting information about a VM
      • Getting information about a VM
      • Viewing serial port output
    • Managing VMs
      • Stopping and starting a VM
      • Attaching a disk to a VM
      • Detaching a disk from a VM
      • Moving a VM to a different availability zone
      • Making a VM's public IP address static
      • Updating a VM
      • Changing VM computing resources
      • Deleting a VM
    • Working on VMs
      • Connecting to a VM via SSH
      • Connecting to a VM via RDP
      • Working with Yandex.Cloud from inside a VM
      • Installing NVIDIA drivers
    • Creating new disks
      • Creating an empty disk
      • Create an empty disk with a large block
    • Disk management
      • Creating a disk snapshot
      • Updating a disk
      • Deleting a disk
      • Deleting a disk snapshot
    • Creating new images
      • Uploading your image
    • Managing images
      • Deleting a disk image
    • Managing the serial console
      • Getting started
      • Connecting to a serial console via SSH
      • Connecting to a serial console via CLI
      • Start your terminal in the Windows SAC
      • Disabling access to the serial console
    • Creating instance groups
      • Creating a fixed-size instance group
      • Creating a fixed-size instance group with a network load balancer
      • Creating an automatically scaled instance group
      • Creating an instance group from Container Optimized Image
    • Getting information about instance groups
      • Getting a list of instance groups
      • Getting information about an instance group
      • Getting a list of instances in a group
    • Managing instance groups
      • Editing an instance group
      • Configuring application health check on the VM
      • Updating a instance group
        • Incremental updates
        • Uninterrupted updates
      • Stopping an instance group
      • Starting an instance group
      • Deleting an instance group
    • Dedicated hosts
      • Creating a VM in a group of dedicated hosts
      • Creating a VM on a dedicated host
  • Yandex Container Optimized Solutions
  • Scenarios
    • Configuring NTP time synchronization
    • Running instance groups with auto scaling
  • Concepts
    • Relationship between resources
    • Virtual machines
      • Overview
      • Platforms
      • vCPU performance levels
      • Graphics accelerators (GPUs)
      • Preemptible VMs
      • Network on a VM
      • Live migration
      • Placement groups
      • Statuses
      • Metadata
    • Disks
      • Overview
      • Disk snapshots
    • Images
    • Instance groups
      • Overview
      • Access
      • Instance template
      • Variables in an instance template
      • Policies
        • Overview
        • Allocation policy
        • Deployment policy
        • Scaling policy
      • Scaling types
      • Auto-healing
      • Updating
        • Overview
        • Allocating instances across zones
        • Deployment algorithm
        • Rules for updating instance groups
      • Statuses
    • Dedicated host
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1 to May 1, 2019
  • Compute API reference
    • Authentication in the API
    • gRPC
      • Overview
      • DiskPlacementGroupService
      • DiskService
      • DiskTypeService
      • HostGroupService
      • HostTypeService
      • ImageService
      • InstanceService
      • PlacementGroupService
      • SnapshotService
      • ZoneService
      • InstanceGroupService
      • OperationService
    • REST
      • Overview
      • Disk
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • DiskPlacementGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listDisks
        • listOperations
        • update
      • DiskType
        • Overview
        • get
        • list
      • HostGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listHosts
        • listInstances
        • listOperations
        • update
      • HostType
        • Overview
        • get
        • list
      • Image
        • Overview
        • create
        • delete
        • get
        • getLatestByFamily
        • list
        • listOperations
        • update
      • Instance
        • Overview
        • addOneToOneNat
        • attachDisk
        • create
        • delete
        • detachDisk
        • get
        • getSerialPortOutput
        • list
        • listOperations
        • removeOneToOneNat
        • restart
        • start
        • stop
        • update
        • updateMetadata
        • updateNetworkInterface
      • PlacementGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listInstances
        • listOperations
        • update
      • Snapshot
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • Zone
        • Overview
        • get
        • list
      • Operation
        • Overview
        • get
      • InstanceGroup
        • Overview
        • createFromYaml
        • update
        • list
        • get
        • delete
        • start
        • stop
        • create
        • listAccessBindings
        • setAccessBindings
        • updateFromYaml
        • listLogRecords
        • listInstances
        • updateAccessBindings
        • listOperations
  • Questions and answers
    • General questions
    • Virtual machines
    • Disks and snapshots
    • Licensing
    • All questions on the same page
  1. Step-by-step instructions
  2. Managing instance groups
  3. Configuring application health check on the VM

Configure application health check on the VM

    To make the application more available and make sure that it responds to requests, you can set up the application health check on the instance. Instance Groups will check and automatically recover the instance if it fails the check. Don't confuse this with the health check in the network load balancer. Read more about automatic recovery and types of checks.

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

    Management console
    CLI
    1. Open the folder page in the management console.

    2. Select Yandex Compute Cloud.

    3. On the Virtual machines page, go to the Instance groups tab.

    4. Select the group to update.

    5. In the Health checks section, enable the Activate option to the right.

    6. Select the protocol for the health checks: HTTP or TCP.

    7. Set up the health checks:

      • The port in the range 1-32767 to receive the check requests from Instance Groups.

      • Path (for HTTP) — The URL path for the HTTP check requests sent from Instance Groups.

        Alert

        Only HTTP/1.1 and lower are supported.

      • The response timeout in seconds.

        If you connected your instance group to a network load balancer, we recommend setting a smaller value here than in the load balancer.

      • Check interval in seconds — This is the interval for Instance Groups to wait between health checks.

      • Performance threshold — The number of successful health checks required for the managed instance to be considered healthy.

        If you have connected your instance group to a network load balancer, we recommend that you set a smaller value here than in the load balancer.

      • Failure threshold — The number of failed health checks for the managed instance to be considered unhealthy.

        If you have connected your instance group to a network load balancer, we recommend that you set a higher value here than in the load balancer.

    8. Click Save changes.

    If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

    The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

    1. View a description of the update group command in the CLI:

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

      $ yc compute instance-group list
      +----------------------+-----------------------+------+
      |          ID          |         NAME          | SIZE |
      +----------------------+-----------------------+------+
      | amc65sbgfqeqf00m02sc | first-instance-group  |    2 |
      +----------------------+-----------------------+------+
      

      Fields:

      Field Value
      ID Group ID.
      NAME Group name.
      SIZE Group size.
    3. Select the group ID or NAME (for example, first-instance-group).

    4. Get information about the instance group.

    5. Create a YAML file with any name (for example, group.yaml) and, based on the information received, describe:

      • The template of the instance.
      • The policies.
      • The service account ID.
      • The network load balancer specifications (if necessary).
    6. Add a health check specification to the file (for example, 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 specs.
      http_options Settings for HTTP health checks. Only HTTP/1.1 and lower are supported.
      If you want to use TCP, then in the tcp_options property specify the port number only.
      port The port in the range 1-32767 to receive the check requests from Instance Groups.
      path The URL path for the HTTP health check requests sent from Instance Groups.
      interval Check interval in seconds — This is the interval for Instance Groups to wait between health checks.
      timeout Response waiting time in seconds.
      If you connected your instance group to a network load balancer, we recommend setting a larger value here than in the load balancer.
      unhealthy_threshold Unhealthy threshold — The number of failed health checks after which the instance is considered inoperable.
      If you have connected your instance group to a network load balancer, we recommend that you set a higher value here than in the load balancer.
      healthy_threshold Healthy threshold — The number of successful health checks after which the instance is considered operable.
      If you have connected your instance group to a network load balancer, we recommend that you set a smaller value here than in 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 starts the operation to update the instance group.

    Language / Region
    Careers
    Privacy policy
    Terms of use
    Brandbook
    © 2021 Yandex.Cloud LLC