Azure Stack HCI enables you to define the affinity and anti-affinity controls for VMs in a cluster. An affinity rule ensures that two VMs reside in the same site to ensure locality. For example, the web tier of an application and its database are in the same zone. An anti-affinity rule ensures that two VMs stay on separate sites, for example when hosting two domain controllers on separate sites.