ring

2024-06-24T21:08:35.902449Z

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.

seancorfield 2024-06-24T21:13:31.752359Z

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).

seancorfield 2024-06-24T21:15:07.048449Z

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.

seancorfield 2024-06-24T21:15:45.936369Z

(we've also run Tomcat and Undertow in production but don't have as much experience around observability with those)

2024-06-24T21:27:53.990279Z

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?

seancorfield 2024-06-24T21:43:00.584449Z

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...

2024-07-02T15:58:08.954839Z

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.

seancorfield 2024-07-02T17:18:32.166939Z

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.

2024-07-02T17:26:50.004329Z

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?

seancorfield 2024-07-02T17:41:15.164319Z

Just by adding the agent.

seancorfield 2024-07-02T17:41:54.059899Z

(`next.jdbc` is a wrapper around JDBC -- and it is JDBC itself that NR instruments)

2024-07-02T17:46:11.706399Z

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?

seancorfield 2024-07-02T17:48:03.649669Z

I'm not really sure what you're asking there...

seancorfield 2024-07-02T17:49:29.568589Z

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:

2024-07-02T17:49:46.360229Z

For instance on our wordpress site it shows top slow queries and such

2024-07-02T17:49:56.902179Z

Oh yeah thats what I meant

seancorfield 2024-07-02T17:51:07.233769Z

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.

2024-07-02T17:52:03.863369Z

Yeah ok awesome that is what I was referring to thanks!

seancorfield 2024-07-02T17:53:59.185539Z

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...

2024-07-02T18:11:25.996029Z

Thanks I appreciate that. Would love to take you up on that when we get a little closer to setting this up.

👍🏻 1