Jetty and Dropwizard Metrics: High-Throughput Timer Overhead
0 reputation · 29 Dec 2025, 08:07 UTC
Dropwizard integrates the Metrics library with the Jetty handler chain to automatically track request-response cycles. This instrumentation relies on Timers to capture latency distributions and percentiles, which are essential for identifying performance bottlenecks in resource endpoints.
When monitoring extremely high-throughput, low-latency endpoints, there is a concern regarding the CPU and memory overhead introduced by high-precision timer collection. If the cost of measuring the request exceeds the execution time of the logic itself, the instrumentation may skew the resulting p99 latency data.
- Does the default Jetty integration in Dropwizard provide a mechanism to sample timer events rather than tracking every request?
- What is the expected performance impact on the Jetty thread pool when tracking a high volume of distinct resource timers?