Anti-affinity for Cloud Servers
Cloud Servers can be placed into server groups, and a server group can have an anti-affinity policy. Anti-affinity places the servers in a group on separate physical hosts, which reduces the risk that a single hardware failure stops all of them. The policy decides what happens when that isn't possible. It is recommended to enable anti-affinity when servers provide a redundant role, for example being members of the same load balancer backend group.
Anti-affinity policies
| Policy in the API | In the Control Panel | What it does |
|---|---|---|
strict | Required | Servers in the group are never placed on the same host. A server starts only if anti-affinity can be met. |
yes | Preferred | Servers are placed on separate hosts when possible. A server starts even if anti-affinity can't be met. |
no | Disabled | The group only organizes servers. This is the default in the API. |
Each running server in a group with anti-affinity on shows as met or unmet. Met means it doesn't share a host with another server in the group.
A server can belong to only one group. To move it to another group, remove it from its current group first.
A group with strict doesn't accept a running server that shares a host with another server in the group. Stop the server before you add it.
Unmet anti-affinity
The host is chosen each time a server starts from the stopped state. To fix an unmet server, stop it fully and start it again.