Enable /metrics compression/gzip response

70 views
Skip to first unread message

Daniel Sandberg

unread,
Feb 3, 2022, 6:30:51 PM2/3/22
to WildFly
Wildfly 25 and 26

Currently the /metrics endpoint does not compress the response.
This causes about 1MB to be transferred on each scrape, per instance. With 20 instances this eats up a LOT of bandwidth and causes slow scrapes.

How do we enable gzip for metrics?

jme...@redhat.com

unread,
Feb 4, 2022, 10:20:59 AM2/4/22
to WildFly

At the moment, this is not possible to enable Gzip compression on this endpoint but that sounds a reasonable RFE.

We could add a "gzip-enabled" attribute to the metrics / microprofile-metrics-smallrye subsystem. When it is enabled, we would wrap the metrics HTTP handler in a EncodingHandler for gzip (that should be similar to the code in org.wildfly.extension.undertow.filters.GzipFilter).

@Jason, what do you think?

Jason Lee

unread,
Feb 4, 2022, 10:25:12 AM2/4/22
to WildFly
That does sound like a reasonable request. I'll try to file an RFE for that today. I can't promise on WHEN it will ship, but I'll get it on the list.

Daniel Sandberg

unread,
Feb 18, 2022, 6:38:52 PM2/18/22
to WildFly
Hi. I'm sorry I missed the responses.

If you can do any of that it sounds amazing!
Do you have any ref to a ticket at issues.redhat.com?

Reply all
Reply to author
Forward
0 new messages