What are some pros and cons of the ring compatible web servers like jetty and http-kit, etc? http-kit claims to be faster, but i'm curious how true those claims are in a production scenario.
We've run both in production. The main difference we found was around observability. We use New Relic for monitoring everything in our systems, from the servers themselves up through the apps, including SQL ops, and 3rd party HTTP services, and up into the browser. Jetty is supported and can be fully instrumented. http-kit is not supported and you don't get much in the way of useful metrics or monitoring (you get almost nothing).
As far as I'm concerned, unless you can show evidence that Jetty isn't sufficient for your use case and that http-kit is sufficient, and you're willing to either give up observability or add all your own custom instrumentation, there is zero reason to choose http-kit in production.
(we've also run Tomcat and Undertow in production but don't have as much experience around observability with those)
Ok thanks yeah monitoring is important for us we are still considering options for that. Do you know of any other options besides new relic, just curious?
I can't remember what we looked at all those years back when we chose New Relic -- and they recently moved us to a new plan that more than cut our costs in half so we haven't felt inclined to look at alternatives...
Have you noticed any significant performance overhead when using new relic? I have heard that their php agent can be pretty heavy and was curious what your experience has been in Java/Clojure.
No, we haven't seen anything significant. I don't know how the PHP agent works, but the Java agent instruments the bytecode at startup -- which can add quite an overhead to startup so we exclude the clojure.lang.DynamicClassLoader class loader (by default they already exclude a couple of Groovy and Spring contexts) -- so they overhead at runtime is some additional function calls around HTTP and JDBC activity for the most part, which are already the "slow" parts. I mean, yeah, it certainly adds some performance overhead, but even if that's, say, 5%, it's worth it for the level of observability we get.
Ok thanks and does new relic automatically monitor jetty and next.jdbc just by setting up the agent or did you have to do additional config?
Just by adding the agent.
(`next.jdbc` is a wrapper around JDBC -- and it is JDBC itself that NR instruments)
Yeah I figured cool. Does that handle individual query stats as well then or did you have to setup mysql to be monitored by new relic for that?
I'm not really sure what you're asking there...
Without us needing to configure anything, and without any NR stuff running on the DB server, we can see all of this for one of our apps:
For instance on our wordpress site it shows top slow queries and such
Oh yeah thats what I meant
Yeah, it also does periodic full traces so you can see the exact query and values etc. It can also figure out distributed traces across multiple services -- full microservice stuff.
Yeah ok awesome that is what I was referring to thanks!
Happy to set up a screen share and walk you through the setup we have and answer any Qs you might have... New Relic is extremely impressive...
Thanks I appreciate that. Would love to take you up on that when we get a little closer to setting this up.