DO NOT MERGE: QQ AZ awareness#16739
Draft
mkuratczyk wants to merge 5 commits into
Draft
Conversation
434baeb to
7f350f5
Compare
7f350f5 to
fb8fefd
Compare
This should be completely transparent for most users. However, this allows easily testing AZ-aware quorum queue placement in a local environment.
Introduce `rabbit_db_node_metadata` to store generic node-specific metadata in Khepri and query it locally via an ETS-backed projection.
Introduce a pluggable quorum queue member placement strategy behaviour and implement `rabbit_member_placement_az` to distribute replicas across distinct values of a configured node tag, querying tags locally from Khepri.
Include the availability zone (AZ) of each replica in the quorum_status output when a member placement tag is configured on the queue.
Expose the `x-member-placement-tag` argument in the management UI for quorum queues, operator policies, and user policies.
fb8fefd to
b68723a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements AZ-aware membership placement for quorum queues.
Until now, if there's more nodes than QQ members requested, we put one member locally (where the queue is declared) and the other members would be assigned randomly to other nodes, preferring nodes running at the time of declaration.
With this change, you can tag nodes using the existing node_tags feature and specify the tag used as the az information.
For example:
AZ awareness can be enabled:
rabbit.quorum_queue_member_placement_tag=azmember-placement-tag=azx-member-placement-tag=azWhen either of these is in effect, we'll make sure that members are evenly spread between nodes with different tag values.
For example, with 7 nodes, 3 tagged with
az = az1, 2 withaz = az2and 2 withaz = az3, all 3-member quorum queues will have one member in az1, one in az2 and one in az3. The distribution of members between nodes within the same AZ remains as before: up to the limit (default of 1000 queues), we make it perfectly even, and if there's more queues - we start to assign nodes randomly (still taking AZ into consideration to be clear).