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
    • Start testing with double trial credits
    • 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
  • Yandex Container Solution
    • Resource relationships
    • Graphics processing units (GPUs)
    • Images
      • Overview
      • Access
      • YAML specification
      • Instance template
      • Variables in an instance template
      • Scaling types
      • Instance health checks and automatic recovery
        • Overview
        • Allocating instances across zones
        • Deployment algorithm
        • Rules for updating instances
        • Updating secondary disks in an instance template
      • Integrating with network and L7 load balancers
      • Handling a stateful workload
      • Stopping and pausing an instance group
      • Sequentially restarting and recreating instances in a group
      • Statuses
    • Dedicated host
    • Encryption
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Concepts
  2. Instance groups
  3. Updating
  4. Deployment algorithm

Deployment algorithm

Written by
Yandex Cloud
Updated at November 21, 2024

The deployment algorithm switches an instance group from one state to another using short iterative changes. Each iteration takes into account the restrictions set by the user.

A feature of the deployment algorithm is that before deleting and updating an instance using update, the algorithm always stops the instance using a separate stop call. Delete or update is run during the next iteration.

The attributes that do not require the instance to stop (such as the description fields) are updated simultaneously for all running instances, because this does not violate any restrictions.

Note

If the user rolls back the group settings to their previous values while the instance is stopped, the algorithm may restart the instance.

Algorithm exampleAlgorithm example

Let's say you have a group of two instances. You need to expand it to three instances and update the two old instances based on a new specification. By setting max_expansion = 1, you can create an additional instance during deployment.

Algorithm behavior:

  1. Two new instances are created and started.

    At this point, the group will contain two old instances running and two new instances.

  2. One of the old instances is stopped by calling stop in Compute Cloud. One old instance and two new instances are running, one old instance is stopped.

    The target group size is 3, i.e., at least three instances must be running at the same time. Therefore, you cannot stop the second old instance at this point.

  3. You should update the old instance using the update call in Compute Cloud (if allowed), or delete and create it again.

    Let's assume that a simpler scenario with the update call came into action. When the update is complete, the group will contain one old instance, one new instance stopped, and two new instances running.

  4. The updated stopped instance starts. Now the group contains one old running instance and three new running instances.

  5. The last old instance is deleted.

The algorithm met the restrictions: three instances were running in the group at any given time.

Was the article helpful?

Previous
Allocating instances across zones
Next
Rules for updating instances
© 2025 Direct Cursus Technology L.L.C.