Comparison
Availability zonevsPod anti-affinity
Availability zone
one datacentre lost power and a third of your instances went with it, which is the unit this is designed around.
An isolated datacentre or group of them within a region, with independent power, cooling and network, connected to its siblings over a low-latency link. It is the smallest unit of correlated failure a cloud offers, which makes it the unit you spread replicas across. Because the link between zones is fast but not free, spreading across them costs latency in single digits of milliseconds and real money in cross-zone data transfer.
Full entry →Pod anti-affinity
all three replicas were on one node and one reboot took the service down, which is exactly what this rule prevents.
A rule that keeps copies of the same workload apart — on different nodes, racks or zones — expressed relative to other workloads rather than to node labels. Without it a scheduler optimising for packing will cheerfully place every replica of a service on the same machine, and the redundancy you are paying for is imaginary. Required anti-affinity across zones also caps your replica count at the number of zones, which is a surprise the first time autoscaling hits it.
Full entry →