When virtual machines are powered on in a DRS cluster, vCenter determines where the virtual machines should be placed to balance resource usage across the cluster. The DRS scheduler runs periodically to migrate virtual machines using vMotion. The main purpose of DRS is to ensure that virtual machines are receiving the resources they request and to maintain a balance of resource usage across the cluster. Affinity or anti-affinity rules can be used to control where VMs are placed within a cluster. Affinity rules keep VMs on the same physical host, reducing the load on the physical network by keeping traffic between them from leaving the host. Anti-affinity rules keep VMs separated on different physical hosts, ensuring higher availability.
One use case of an affinity rule would be to keep all of the virtual machines supporting an application...