Skip to main content

Overview

Server groups enforce placement policies that determine how a set of instances is distributed across physical compute hosts. Use server groups to guarantee high availability through host separation, improve performance through co-location, or meet compliance requirements for workload isolation.
Prerequisites
  • An active Xloud project with member or admin role
  • At least two compute hosts available (required for anti-affinity enforcement)
  • CLI users: Xloud CLI configured and credentials sourced

Placement Policies

PolicyBehaviorFailure Mode
anti-affinityEach instance placed on a different physical hostLaunch fails if insufficient distinct hosts are available
affinityAll instances placed on the same physical hostLaunch fails if the target host cannot accommodate the instance
soft-anti-affinityPrefer different hosts; allow same host if no alternative existsLaunch succeeds even when distinct hosts are unavailable
soft-affinityPrefer the same host; allow different hosts if requiredLaunch succeeds even when co-location is not possible
Use anti-affinity for production replicated services (web tiers, application clusters, database replicas) where a single host failure must not take down all instances simultaneously. Use soft-anti-affinity when you want best-effort separation without hard placement failures.

Use Cases

Launch two or more application instances in an anti-affinity group. If one physical host fails, only the instances on that host are affected — the remaining instances on other hosts continue serving traffic.Recommended policy: anti-affinity
Place the primary database instance and its synchronous replica in an anti-affinity group. This ensures the replica survives a host failure that takes down the primary, allowing automatic failover.Recommended policy: anti-affinity
Place tightly coupled services (e.g., a cache layer and its application server) in an affinity group to minimize inter-process network latency by ensuring they run on the same physical host.Recommended policy: affinity
When you want instances on separate hosts but cannot guarantee it (e.g., in a small cluster during maintenance), use soft-anti-affinity. Instances spread out when possible, but the launch never fails due to placement constraints.Recommended policy: soft-anti-affinity

Create a Server Group

Navigate to Server Groups

Log in to the Xloud Dashboard (https://connect.<your-domain>) and navigate to Project → Compute → Server Groups.

Create the group

Click Create Server Group. Fill in the fields:
FieldDescription
NameDescriptive name, e.g. web-ha-group, db-separation
PolicySelect from the four placement policy options
Click Submit to create the group.
The server group appears in the list with the selected policy.

Launch Instances into a Server Group

Open the Launch Instance dialog

Navigate to Project → Compute → Instances and click Launch Instance.

Select the server group

On the Server Groups tab, locate the target group in the All Server Groups list and click + to move it to Selected Server Groups.
Only one server group can be assigned per instance. The placement policy applies relative to all other instances already in the group.

Complete and launch

Complete the remaining tabs (Source, Flavor, Networks, Security Groups, Key Pair) and click Launch Instance.
The instance is placed according to the group’s policy. For anti-affinity, verify that the new instance landed on a different host than existing group members.

Next Steps

Launch an Instance

Full launch workflow including server group assignment at creation time

Availability Zones

Combine zone placement with server groups for rack-level fault isolation

Resize an Instance

Adjust vCPU and RAM allocation for instances in your server group

Compute User Guide

Overview of all compute operations and instance lifecycle management