rabbitmq-server/deps/rabbitmq_peer_discovery_aws
Ben Nguyen c20c06c9bc
AWS peer discovery: ensure consistent hostname path ordering (#14557)
* AWS peer discovery: ensure consistent hostname path ordering

AWS EC2 API returns networkInterfaceSet and privateIpAddressesSet in
arbitrary order, causing non-deterministic hostname resolution during
peer discovery. This leads to inconsistent cluster formation.

Changes:
- Sort network interfaces by deviceIndex (0 first for primary ENI)
- Sort private IP addresses by primary flag (primary=true first)
- Add debug logging to show hostname path selection and sorting results
- Add comprehensive unit tests for sorting behavior

The sorting ensures deviceIndex=0 and primary=true IPs are consistently
selected first, making peer discovery deterministic across deployments.

* AWS peer discovery: ensure consistent hostname path ordering (address feedback on debug logs and sorting helper functions)
2025-09-24 15:05:17 -04:00
..
priv/schema Bump (c) line year 2025-01-01 17:54:10 -05:00
src AWS peer discovery: ensure consistent hostname path ordering (#14557) 2025-09-24 15:05:17 -04:00
test AWS peer discovery: ensure consistent hostname path ordering (#14557) 2025-09-24 15:05:17 -04:00
.gitignore Cleanup .gitignore files for the monorepo 2024-06-28 12:00:52 +02:00
CODE_OF_CONDUCT.md Replace files with symlinks 2022-04-15 06:04:29 -07:00
CONTRIBUTING.md Replace files with symlinks 2022-04-15 06:04:29 -07:00
LICENSE Replace @rabbitmq.com addresses with rabbitmq-core@groups.vmware.com 2023-06-20 15:40:13 +04:00
LICENSE-MPL-RabbitMQ Revert drop of Exhibit B on MPL 2.0 2020-07-20 17:01:58 +01:00
Makefile Update Erlang.mk and switch to new xref code 2022-05-31 13:51:12 +02:00
README.md Bump (c) line year 2025-01-01 17:54:10 -05:00

README.md

RabbitMQ Peer Discovery AWS

This is an AWS-based implementation of RabbitMQ peer discovery interface (new in 3.7.0, previously available in the rabbitmq-autocluster plugin by Gavin Roy).

This plugin only performs peer discovery and most basic node health monitoring using AWS (EC2) APIs as data source. Please get familiar with RabbitMQ clustering fundamentals before attempting to use it.

While it may seem at times that this is a RabbitMQ cluster management solution, it is not. Cluster provisioning and most of Day 2 operations such as proper monitoring are not in scope for this plugin.

Supported RabbitMQ Versions

This plugin requires RabbitMQ 3.7.0 or later.

For a AWS-based peer discovery and cluster formation mechanism that supports 3.6.x, see rabbitmq-autocluster.

Installation

This plugin ships with supported RabbitMQ versions. There is no need to install it separately.

As with any plugin, it must be enabled before it can be used. For peer discovery plugins it means they must be enabled or preconfigured before first node boot:

rabbitmq-plugins --offline enable rabbitmq_peer_discovery_aws

Documentation

See RabbitMQ Cluster Formation guide.

Contributing

See CONTRIBUTING.md and our development process overview.

License

Licensed under the MPL, same as RabbitMQ server.

(c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.