Skip to content

Server groups

Service description

Server groups are a feature that enable you to organize and manage virtual machine (VM) instances with certain policies or behaviors. Server groups are used to apply scheduling policies that influence how instances are placed on the compute hosts within the cloud environment.

Features

  • Affinity and Anti-Affinity policies, for improving communication performance between instances or for ensuring that related workloads are kept close together
  • Soft Affinity and Soft Anti-Affinity policies, so you can attempt to fulfill policies, but they are not strictly enforced, allowing for more flexibility in instance placement
  • Group management, so you can create, list, show details of, and delete server groups (when creating a server group, you specify the desired policy and can then add instances to the group when launching them
  • Scheduling influence, so you are making decisions about where to place new instances

Key concepts

Server groups are commonly used in scenarios where workload performance, availability, or data locality are important considerations. For example, deploying a distributed database with anti-affinity can help ensure that each database node is on a separate host, reducing the impact of a host failure.

How it works

  1. Create a server group and specify a policy, such as "affinity" or "anti-affinity." The "affinity" policy ensures that all instances in the group are scheduled on the same compute host, while the "anti-affinity" policy ensures that instances are spread across different hosts.
  2. When launching instances, specify the server group to which the instances should belong. Compute service scheduler takes the server group's policy into account when deciding where to place the instances.
  3. The scheduler uses the server group policy to influence its placement decisions. For example, with an anti-affinity policy, the scheduler will attempt to place instances on different hosts to reduce the risk of simultaneous failures.
  4. You can list, show details of, and delete server groups. However, once a server group is created and instances are associated with it, the policy cannot be changed. To apply a different policy, a new server group must be created.

Server groups are useful for scenarios such as:

  • Ensuring high availability by spreading instances across different hosts (anti-affinity).
  • Improving performance by keeping related instances on the same host (affinity), which can reduce network latency and increase cache effectiveness.

Server groups console

Command line tools

API methods