r/openstack • u/mattparlane • Aug 29 '21
Affinity AND Anti-Affinity?
Hi all... I did some Googling but can't find the answer to this:
Is it possible to have both Affinity and Anti-Affinity? I shall explain...
I have four servers, two DB and two web. I want each set of (DB/web) to be physically proximate, but each pair to be physically separate from the other pair.
Something like:
| Group 1 (Affinity) | Group 2 (Affinity) |
|---|---|
| DB 1 | DB 2 |
| Web 1 | Web 2 |
Possible? I know I can create two Affinity groups, but that won't guarantee that they're on separate hosts, and vice-versa: I can create two Anti-Affinity groups, but that won't guarantee that the DB and web servers are on the same host.
7
Upvotes
2
u/cheaphomemadeacid Aug 29 '21
I'd use anti-affinity +
aggregatesavailability zones for that