You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2020/10/26 19:01:50 UTC

[Bug 64850] New: Add support to tomcat for JEP380: Unix domain sockets

https://bz.apache.org/bugzilla/show_bug.cgi?id=64850

            Bug ID: 64850
           Summary: Add support to tomcat for JEP380: Unix domain sockets
           Product: Tomcat 10
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connectors
          Assignee: dev@tomcat.apache.org
          Reporter: minfrin@apache.org
  Target Milestone: ------

Native Java unix domain sockets are coming:

https://openjdk.java.net/jeps/380

It appears Tomcat needs to either support the following description, or be
careful to not do anything that would break this description:

Description

To support Unix-domain socket channels we will add the following API elements:

A new socket address class, java.net.UnixDomainSocketAddress;

A UNIX constant value in the existing java.net.StandardProtocolFamily enum;

New open factory methods on SocketChannel and ServerSocketChannel that specify
the protocol family

Updates to the SocketChannel and ServerSocketChannel specifications to specify
how channels to Unix domain sockets behave.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64850] Add support to tomcat for JEP380: Unix domain sockets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64850

--- Comment #5 from Graham Leggett <mi...@apache.org> ---
(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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64850] Add support to tomcat for JEP380: Unix domain sockets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64850

--- Comment #4 from Graham Leggett <mi...@apache.org> ---
(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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64850] Add support to tomcat for JEP380: Unix domain sockets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64850

Michael Osipov <mi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Michael Osipov <mi...@apache.org> ---
This could have happened years ago with
https://github.com/kohlschutter/junixsocket. Do you plan to use with mod_proxy
UDS support?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64850] Add support to tomcat for JEP380: Unix domain sockets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64850

--- Comment #6 from Graham Leggett <mi...@apache.org> ---
For reference, unix domain socket support has been proposed to tomcat-native
here: https://bz.apache.org/bugzilla/show_bug.cgi?id=64942

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64850] Add support to tomcat for JEP380: Unix domain sockets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64850

--- Comment #3 from Christopher Schultz <ch...@christopherschultz.net> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64850] Add support to tomcat for JEP380: Unix domain sockets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64850

--- Comment #7 from Graham Leggett <mi...@apache.org> ---
Thank you to @rmaucher - support for UDS now available for NIO:

https://github.com/apache/tomcat/commit/0d276556881446aa499fefd496d567606bc0ddec

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64850] Add support to tomcat for JEP380: Unix domain sockets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64850

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64850] Add support to tomcat for JEP380: Unix domain sockets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64850

--- Comment #8 from Graham Leggett <mi...@apache.org> ---
Tomcat-native v1.2.26 released with UDS support.

New patch proposed for APR here:

https://github.com/apache/tomcat/pull/401

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64850] Add support to tomcat for JEP380: Unix domain sockets

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64850

Remy Maucherat <re...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Remy Maucherat <re...@apache.org> ---
No idea there was a BZ. Implemented in Tomcat 10.0.1 and 9.0.42.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org