In City Cloud OpenStack you can use server groups to control the scheduling of a group of servers. A server group can have two different policys - affinity and anti-affinity.
A server group with policy affinity will make sure that all the server in that group will be placed at the same compute host (hypervisor). A suitable use case for this can be when hosting services that are tightly connected and frequently communicating with each other.
A server group with the policy set to anti-affinity will make sure that none of the servers within that server group always will be placed at different compute host (hypervisor). This is a suitable use case for services that requires high availability, for example a database cluster, where a potential problem of one of the hypervisors won't affect the uptime of the service if self.
Step-by-step guide using OpenStack Client
Create server group and set policy
openstack server group create --policy <policy (affinity/anti-affinity)> <name>
Apply server group to server group at creation
openstack server create --image <image> --flavor <flavor> --network <network> --hint group=<server group name> <server name>