Search code examples
jettyembedded-jettyjetty-9

Use of Jetty Request Statistics in Production


From the Jetty documentation - http://www.eclipse.org/jetty/documentation/current/statistics-handler.html, it looks like enabling Connector statistics should be very cautiously used and should NOT be enabled for production use.

However, I wanted to know whether Request statistics (enabled by adding statistics handler) should be enabled or NOT for production use ?


Solution

  • This question is better suited for serverfault.com, as its not a programming question (which stackoverflow is for).

    That documentation is written with a broad definition of what "Production" means.

    The statistics gathering could work just fine on your production environment, but that depends on your environment, your http requests profile, networking capability, etc.

    The group that maintains Jetty, tends to err on the side of high-traffic, high-load, websites, where that kind of statistics gathering is problematic, so a general warning is the most prudent approach when documenting it. (Note: even the terms "high-traffic" and "high-load" mean different things to different people)

    There are many that consider any performance decrease (even as little as 10ns per request) to be out of the question, while others feel its ok.

    Know however, that the statistics are just long values that just keep increasing. If you have a high-traffic server that stays up for months on end, then these statistics will eventually be invalid/bad (as you exceed the Long.MAX_LONG)