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
memberoradminrole - At least two compute hosts available (required for
anti-affinityenforcement) - CLI users: Xloud CLI configured and credentials sourced
Placement Policies
| Policy | Behavior | Failure Mode |
|---|---|---|
anti-affinity | Each instance placed on a different physical host | Launch fails if insufficient distinct hosts are available |
affinity | All instances placed on the same physical host | Launch fails if the target host cannot accommodate the instance |
soft-anti-affinity | Prefer different hosts; allow same host if no alternative exists | Launch succeeds even when distinct hosts are unavailable |
soft-affinity | Prefer the same host; allow different hosts if required | Launch succeeds even when co-location is not possible |
Use Cases
High availability — web or application tier
High availability — web or application tier
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-affinityDatabase primary and replica separation
Database primary and replica separation
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-affinityLow-latency co-located services
Low-latency co-located services
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: affinityBest-effort distribution across limited hosts
Best-effort distribution across limited hosts
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-affinityCreate a Server Group
- Dashboard
- CLI
Navigate to Server Groups
Log in to the Xloud Dashboard (
https://connect.<your-domain>) and navigate to
Project → Compute → Server Groups.Launch Instances into a Server Group
- Dashboard
- CLI
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.
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