-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP API: reduce the number of metrics served by GET /api/queues by default #9437
Comments
@michaelklishin I wonder if in many cases it can be enough to use
which already reduces a lot the datapoints returned vs
|
@dcorbacho that looks good and we can document that but in any case, serving backing queue metrics (that were never really meant to be used by the general public) does not make sense. I'd both document that combination of parameters and proceed with the rest of this issue. |
The plugin configuration is already documented in https://www.rabbitmq.com/management.html#disable-stats but there is no mention of the query parameters at all in the HTTP API docs. I'll document that part. |
@michaelklishin I would drop the fields: Also, I don't think there is any value on returning those keys with a |
This metric is being removed in > 3.12.7 and 3.13.x series See rabbitmq/rabbitmq-server#9437 for more information
How do I get such accurate values of metrics such were presented in backing_queue_status? |
GET /api/queues
is widely used and abused without pagination and often to retrieve just a single metric. In environments with 10s or 100s of thousands of queues that produces enormously large JSON responses:100K * 80 keys per queue = 8M keys and easily tens of MiBs in size)
That rendering of 80 metrics per 100K objects burns a lot of CPU and maxes out network links for no good reason.
This is true for 3rd party tools such as monitoring ones.
In order to reduce this unnecessary resource waste we can a few things:
backing_queue_status
fields, thegarbage_collection
field, fromGET /api/queues
responses/detailed
version of the endpoint that would return more metrics, or leave them to in therabbitmq-diagnostics observer
We can also introduce pagination by default but that's likely going to be very confusing at first and will affect a lot of tools. Reducing the size of the response will be a lot less disruptive,
most tools and in most environments the vast majority of metrics are ignored.
The text was updated successfully, but these errors were encountered: