Anti-Affinity Groups let you specify which instances should run on separate hosts. In case of a HA cluster for example you may wish to keep your instances on separate hypervisors to ensure a more reliable fault tolerance.
COMPUTE menu choose the
ANTI-AFFINITY sub-menu. You can then
create, delete or view the details of your groups and in the detail of a group
you can see the instances attributed to that group.
Attributing Anti-Affinity Groups during instance creation
When you create an instance you will be offered the list of your Anti-Affinity Groups. You can choose to attribute your instance to none or several groups.
Although there is no limit to how many groups you may have, an Anti-Affinity group cannot contain more than 8 instances. If a group is full it won’t be presented in the available options.
How to use the Anti-Affinity Groups
Two instances on the same group will be spawned on different hypervisors.
Once created, your instance will stay on its hypervisor during its entire life. You will probably want to define your groups in advance to define a proper distribution strategy.
An example of how Anti-Affinity Groups may prove useful would be to attribute your machines to different groups based on their role: as an example you may define an Anti-Affinity Group for the database servers and another one for the front servers. In this way any issue on one hypervisor will not affect your entire infrastructure.
If you find yourself needing more than 8 instances per group, a possible strategy would be to split a group in two to grant the best spread possible.