Placing Resources Relative to other Resources
When the location of one resource depends on the location of another one, we call this colocation.
There is an important side-effect of creating a colocation constraint between two resources, that it affects the order in which resources are assigned to a node. If you think about it, its somewhat obvious. You can't place A relative to B unless you know where B is []. So when you are creating colocation constraints, it is important to consider whether you should colocate A with B or B with A.
Another thing to keep in mind is that, assuming A is collocated with B, the cluster will also take into account A's preferences when deciding which node to choose for B. For a detailed look at exactly how this occurs, see the
Colocation Explained document.