UDS please! (Unix Domain Socket)

UDS local connections are much faster and are more secure than TCP/UDP ones currently used by Lucee. Everything else uses them (databases, reverse proxys, webservers, PHP, etc.)
Since Java 17 it is available for via NIO connections as well.

Please make it available/integrated into Lucee as well, at least for databases (MySQL, Postgres, MariaDB) and for connecting with the webserver/reverse proxy, instead of AJP.

2 Likes

Update: managed to create an UnixDdomainSocket in Tomcat (v9.0.71), it’s pretty straight forward, in the server.xml :

<Connector protocol="org.apache.coyote.http11.Http11NioProtocol" unixDomainSocketPath="/tmp/lshttpd/cfm.sock" unixDomainSocketPathPermissions="rwxrwxrwx" connectionTimeout="20000" maxThreads="100" URIEncoding="UTF-8" />

Success: Tomcat actually creates (and manages) the cfm.sock file above, except it is always empty (0 bytes)

Configuration in the LiteSpeed WebAdmin Console is also straight forward, basically copied the SAPI connector settings for PHP - except not set the socket to be created by LS, as Tomcat already does that:

Name: tomcatUDS
Address: UDS://tmp/lshttpd/cfm.sock

And when I restart everything I get a 503 error - service unavailable. No other errors in the logs, Tomcat establishes the socket successfully.
All I can deduce is that there is a need to also have a UDS connection between Tomcat & Lucee, not just the webserver/revproxy (Litespeed in this case) and Tomcat. Something like the DB connectors that need to be added in the Lucee Admin console in order to connect them with Lucee? Any suggestion is appreciated.