Overview
Managed node group upgrades on EKS drain nodes one after another. For a three-member quorum cluster on a StatefulSet, a drain that overlaps with a member still recovering leaves the cluster without a majority. The PodDisruptionBudget that should prevent it is only as good as the readiness signal behind it.
Challenge
Every monthly patch window caused 5 to 15 minutes of publish failures. Two of the three broker pods were sometimes scheduled into the same availability zone, and the readiness probe only checked that the AMQP port was open, so a restarted member was reported ready before it had rejoined the cluster. The drain then moved on to the next node, and engineers recovered the cluster by hand after each window.
Environment
Amazon EKS 1.34 with managed node groups across three availability zones, a three-member RabbitMQ cluster run by the RabbitMQ Cluster Operator, gp3 volumes, and Prometheus alerting.
Approach
AceMQ reproduced the failure on a staging cluster by draining nodes in sequence while watching quorum queue membership, then fixed the three layers that allowed it: scheduling, readiness and the drain procedure. Each change went through the customer's GitOps repository and was tested with a scripted drain before it reached production.
Solution
- Reproduced the quorum loss on staging with a scripted rolling drain and recorded member state at every step
- Replaced the port-open readiness check with one that confirms the member has rejoined the cluster and its quorum queues are in sync
- Added topology spread constraints and pod anti-affinity so each member sits in a different availability zone and on a different node
- Set the PodDisruptionBudget to keep two members available and verified that drains respected it
- Staggered managed node group updates with a pause between nodes sized to the measured recovery time
- Wrote a drain and recovery runbook for the platform team, including the commands that confirm member state before the next node is drained
Outcome
The next three patch windows completed without a publish failure, and the platform team now schedules node updates in working hours instead of waiting for a quiet weekend.