Summary: | Add support to tomcat for JEP380: Unix domain sockets | ||
---|---|---|---|
Product: | Tomcat 10 | Reporter: | Graham Leggett <minfrin> |
Component: | Connectors | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | ------ | ||
Hardware: | PC | ||
OS: | All |
Description
Graham Leggett
2020-10-26 19:01:50 UTC
This could have happened years ago with https://github.com/kohlschutter/junixsocket. Do you plan to use with mod_proxy UDS support? Tomcat doesn't use the StandardProtocolFamily enum. All casts to InetSocketAddress are preceded by a check that the cast is valid. Supporting the configuration of a unix domain socket would require changes but I don't see anything here that would break the existing code. Moving this to an enhancement. I'll note that Tomcat support will need to wait until there is at least an EA release with an implementation and that support in Tomcat will need to be optional until the minimum Java version required by Tomcat includes this feature. I honestly don't see the point of using UDS in Tomcat, ever. I'm not going to stop anyone from trying it, but: 1. UDS only works within a single kernel (so no inter-host communication) 2. TCP localhost is *really fast* and essentially boils down to shared kernel buffers I'm sure performance data show that you can pump more bps through a UDS than you can through TCP, but how many one-box-wonders are there still out there that need to go REALLY FAST? If you are that concerned about latency and throughput, remove the reverse proxy and go straight to Tomcat. (In reply to Christopher Schultz from comment #3) > If you are that concerned about latency and > throughput, remove the reverse proxy and go straight to Tomcat. Performance is largely irrelevant in this case. Unix domain sockets give you the unix permissions model, something you don't get with TCP. (In reply to Michael Osipov from comment #1) > This could have happened years ago with > https://github.com/kohlschutter/junixsocket. Do you plan to use with > mod_proxy UDS support? Yes. Right now given that APR v1.6 and above support unix domain sockets it's possible that tomcat-native either supports this now already, or can be made to support this will minimal changes. On the case working out what changes are needed. The purpose of this ticket is to make sure Tomcat supports JEP380 when it's ready. For reference, unix domain socket support has been proposed to tomcat-native here: https://bz.apache.org/bugzilla/show_bug.cgi?id=64942 Thank you to @rmaucher - support for UDS now available for NIO: https://github.com/apache/tomcat/commit/0d276556881446aa499fefd496d567606bc0ddec Tomcat-native v1.2.26 released with UDS support. New patch proposed for APR here: https://github.com/apache/tomcat/pull/401 No idea there was a BZ. Implemented in Tomcat 10.0.1 and 9.0.42. |