Affinity and Anti-Affinity Rules
• Affinity and Anti-Affinity Rules, on page 1
Affinity and Anti-Affinity Rules
Affinity and anti-affinity rules create relationship between virtual machines (VMs) and hosts. The rule can
be applied to VMs, or a VM and a host. The rule either keeps the VMs and hosts together (affinity) or separated
(anti-affinity).
Policies are applied during individual VM deployment. You can deploy a single VNF or multiple VNFs
together through ESC portal by uploading an existing deployment datamodel or by creating a new deployment
datamodel. For more information, see ESC Portal Dashboard.
Affinity and anti-affinity policy streamlines the deployment process.
Affinity and anti-affinity rules are created and applied on VMs at the time of deployment. VM receives the
placement policies when the deploy workflow is initialized.
During a composite VNF deployment, if a couple of VMs need to communicate with each other constantly,
they can be grouped together (affinity rule) and placed on the same host.
If two VMs are over-loading a network, they can be separated (anti-affinity rule) and placed on different hosts
to balance the network.
Grouping or separating VMs and hosts at the time of deployment helps ESC to manage load across the VMs
and hosts in the network. Recovery and scale out of these VMs do not impact the affinity and anti-affinity
rules.
The anti-affinity rule can also be applied between VMs within the same group and on a different host. These
VMs perform similar functions and support each other. When one host is down, the VM on the other host
continues to run preventing any loss of service.
The table shows the types of affinity and anti-affinity policies in a deployment.
Table 1: Intra and Inter group affinity and anti-affinity policies
Policy Policy VM group Host Zone
affinity Intra group affinity same VM group same host same zone
Inter group affinity different VM group same host same zone
Affinity and Anti-Affinity Rules
1
Affinity and Anti-Affinity Rules
Affinity and Anti-Affinity Rules
Policy Policy VM group Host Zone
anti-affinity Intra group same VM group different host same zone
anti-affinity
Inter group different VM group different host same zone
anti-affinity
Note If the zone is not specified on OpenStack, VMs will be placed on different hosts and different zones for inter
and intra group anti-affinity rules.
Affinity and Anti-Affinity Rules
2