Allow multiple protocols in protocol listener health check#13871
Merged
michaelklishin merged 2 commits intomainfrom May 8, 2025
Merged
Allow multiple protocols in protocol listener health check#13871michaelklishin merged 2 commits intomainfrom
michaelklishin merged 2 commits intomainfrom
Conversation
This is a minor change that avoids a cluster-wide query for active listeners. The old code called `rabbit_networking:active_listeners/0` and then filtered the results by ones available on the local node. This caused an RPC and concatenation of all other cluster members' listeners and then in the next line filtered down to local nodes. Equivalently we can use `rabbit_networking:node_listeners(node())` which dumps a local ETS table. This is not a very impactful change but it's nice to keep the latency of the health-check handlers low and reduce some unnecessary cluster noise.
This updates the health check for protocol listeners to accept a set of protocols, comma-separated. The check only returns 200 OK when all requested protocols have active listeners.
Collaborator
|
@the-mikedavis thank you, I'm on it. FYI, the HTTP API reference was moved to the website. It's fine to update the bits in this repo, of course, but the plan is to eventually only have a website link. |
Collaborator
|
|
Collaborator
Author
|
Ah I see that in the website repo now. I'll add the updates for this and #13872 (and the future health-check PRs) in some PRs to the website repo too 👍 |
michaelklishin
approved these changes
May 8, 2025
12 tasks
michaelklishin
added a commit
that referenced
this pull request
May 8, 2025
Allow multiple protocols in protocol listener health check (backport #13871)
lukebakken
added a commit
to lukebakken/rmq-rabbitmq-server
that referenced
this pull request
Mar 17, 2026
Original patch file: 52b2868.patch PRs: * rabbitmq#13871 * rabbitmq#13872
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.
Proposed Changes
This covers the optional part of #13782: updating
GET /api/health/checks/protocol-listener/{protocol}to accept multiple protocols, comma-separated. The check only returns200 OKwhen all of the request protocols have listeners available.Connects #13782.
Types of Changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that applyNOTE: the field in the error response
missingis updated to a list. I'm not sure if we should consider this as a breaking change or not.Checklist
Put an
xin the boxes that apply.You can also fill these out after creating the PR.
If you're unsure about any of them, don't hesitate to ask on the mailing list.
We're here to help!
This is simply a reminder of what we are going to look for before merging your code.
CONTRIBUTING.mddocumentFurther Comments
This PR also adds a commit which changes the helper used to look for active listeners from
rabbit_networking:active_listeners/0torabbit_networking:node_listeners(node())- this eliminates some unnecessary RPC calls. It's unrelated to the feature part of this change.