You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Ryan Schmitt <rs...@apache.org> on 2025/05/29 22:44:16 UTC

Re: Unix domain socket support

Do we have any existing integration test coverage for socket and
connection timeouts? I only see mock-based unit tests.

On Fri, Apr 25, 2025 at 1:04 PM Oleg Kalnichevski <ol...@apache.org> wrote:
>
> On Thu, 2025-04-24 at 13:04 -0700, Ryan Schmitt wrote:
> > > UDS looks like a route / connection property, not a request one. So
> > > RequestConfig would likely be a bad choice. ConnectionConfig would
> > > make
> > > a better choice in my option. Better yet, it could be a method, say
> > > #useUnixSocket, in the `PoolingHttpClientConnectionManagerBuilder`
> > > that
> > > would make the connection manager use a special UDS based
> > > `HttpClientConnectionOperator`. This would be pretty much
> > > equivalent to
> > > the `curl --unix-socket` option.
> >
> > I think that a Unix domain socket is conceptually a proxy: you're
> > connecting to `localhost` but proxying the request through an IPC
> > mechanism. And I think it's awkward to say that a route property is
> > not a request property for two reasons:
> >
> > 1. There is currently a `proxy` field defined on `RequestConfig`
> > (admittedly deprecated)
> > 2. The `HttpRoutePlanner` computes the route entirely from
> > request-scoped information: the target, the HttpContext, and the
> > HttpRequest itself.
>
> Hi Ryan
>
> You are right. The route for a request gets determined based on
> properties of the request or some applicable defaults.
>
> I am fine with using `RequestConfig` to contain UDS properties as well.
> In this case we should also un-deprecate the `proxy` property in
> `RequestConfig` to be consistent.
>
> Oleg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: Unix domain socket support

Posted by Arturo Bernal <ab...@apache.org>.
Hi Ryan,

A concrete driver for AF_VSOCK is the microVM / confidential-computing
space (e.g., Nitro Enclaves) where vsock is the standard host↔guest
channel, and also Kata Containers where vsock is used for host/agent comms.

Thanks,
Arturo


On Sat, Feb 14, 2026 at 12:48 PM Michael Osipov <mi...@apache.org> wrote:

> Guys, not forget AF_HYPERV :-D
>
> Sample impl from Microsoft:
> https://github.com/freebsd/freebsd-src/blob/625dc44832cd760be3d7242d8e21a530c7e32bfc/sys/dev/hyperv/hvsock/hv_sock.c#L110
>
> On 2026/02/13 16:36:42 Ryan Schmitt wrote:
> > There are lots of exotic socket types, including various non-portable
> > subtypes of Unix domain sockets. What are people actually asking for? In
> > the docker-java client for example, we found... aftermarket support for
> > both Unix domain sockets and named pipes (as a kind of ersatz UDS for
> older
> > versions of Windows), but no AF_VSOCK.
> >
> > On Thu, Feb 12, 2026 at 10:38 AM Arturo Bernal <ab...@apache.org>
> wrote:
> >
> > > Hi Ryan,
> > >
> > > Now that UDS support is in, do you think it makes sense to also
> upstream
> > > AF_VSOCK as an optional follow-up?
> > >
> > > I’m thinking: same route/pool-key + custom connection-operator
> pattern, but
> > > gated behind a builder flag and backed by JUnixSocket’s vsock module
> (so
> > > “JUnixSocket-only”, Linux/VM focused).
> > >
> > > Thanks,
> > >
> > >
> > > On Fri, May 30, 2025 at 9:33 PM Ryan Schmitt <rs...@pobox.com>
> wrote:
> > >
> > > > OK, I'll do it.
> > > >
> > > > On Fri, May 30, 2025 at 2:27 AM Oleg Kalnichevski <ol...@apache.org>
> > > > wrote:
> > > > >
> > > > > On Thu, 2025-05-29 at 15:44 -0700, Ryan Schmitt wrote:
> > > > > > Do we have any existing integration test coverage for socket and
> > > > > > connection timeouts? I only see mock-based unit tests.
> > > > > >
> > > > >
> > > > > We do not. Timeouts are quite difficult to test reliably and up to
> now
> > > > > no one stepped forth to put efforts into building them.
> > > > >
> > > > > Oleg
> > > > >
> > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > > > > For additional commands, e-mail: dev-help@hc.apache.org
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > > > For additional commands, e-mail: dev-help@hc.apache.org
> > > >
> > > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>

Re: Unix domain socket support

Posted by Michael Osipov <mi...@apache.org>.
Guys, not forget AF_HYPERV :-D

Sample impl from Microsoft: https://github.com/freebsd/freebsd-src/blob/625dc44832cd760be3d7242d8e21a530c7e32bfc/sys/dev/hyperv/hvsock/hv_sock.c#L110

On 2026/02/13 16:36:42 Ryan Schmitt wrote:
> There are lots of exotic socket types, including various non-portable
> subtypes of Unix domain sockets. What are people actually asking for? In
> the docker-java client for example, we found... aftermarket support for
> both Unix domain sockets and named pipes (as a kind of ersatz UDS for older
> versions of Windows), but no AF_VSOCK.
> 
> On Thu, Feb 12, 2026 at 10:38 AM Arturo Bernal <ab...@apache.org> wrote:
> 
> > Hi Ryan,
> >
> > Now that UDS support is in, do you think it makes sense to also upstream
> > AF_VSOCK as an optional follow-up?
> >
> > I’m thinking: same route/pool-key + custom connection-operator pattern, but
> > gated behind a builder flag and backed by JUnixSocket’s vsock module (so
> > “JUnixSocket-only”, Linux/VM focused).
> >
> > Thanks,
> >
> >
> > On Fri, May 30, 2025 at 9:33 PM Ryan Schmitt <rs...@pobox.com> wrote:
> >
> > > OK, I'll do it.
> > >
> > > On Fri, May 30, 2025 at 2:27 AM Oleg Kalnichevski <ol...@apache.org>
> > > wrote:
> > > >
> > > > On Thu, 2025-05-29 at 15:44 -0700, Ryan Schmitt wrote:
> > > > > Do we have any existing integration test coverage for socket and
> > > > > connection timeouts? I only see mock-based unit tests.
> > > > >
> > > >
> > > > We do not. Timeouts are quite difficult to test reliably and up to now
> > > > no one stepped forth to put efforts into building them.
> > > >
> > > > Oleg
> > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > > > For additional commands, e-mail: dev-help@hc.apache.org
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > > For additional commands, e-mail: dev-help@hc.apache.org
> > >
> > >
> >
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: Unix domain socket support

Posted by Ryan Schmitt <rs...@apache.org>.
There are lots of exotic socket types, including various non-portable
subtypes of Unix domain sockets. What are people actually asking for? In
the docker-java client for example, we found... aftermarket support for
both Unix domain sockets and named pipes (as a kind of ersatz UDS for older
versions of Windows), but no AF_VSOCK.

On Thu, Feb 12, 2026 at 10:38 AM Arturo Bernal <ab...@apache.org> wrote:

> Hi Ryan,
>
> Now that UDS support is in, do you think it makes sense to also upstream
> AF_VSOCK as an optional follow-up?
>
> I’m thinking: same route/pool-key + custom connection-operator pattern, but
> gated behind a builder flag and backed by JUnixSocket’s vsock module (so
> “JUnixSocket-only”, Linux/VM focused).
>
> Thanks,
>
>
> On Fri, May 30, 2025 at 9:33 PM Ryan Schmitt <rs...@pobox.com> wrote:
>
> > OK, I'll do it.
> >
> > On Fri, May 30, 2025 at 2:27 AM Oleg Kalnichevski <ol...@apache.org>
> > wrote:
> > >
> > > On Thu, 2025-05-29 at 15:44 -0700, Ryan Schmitt wrote:
> > > > Do we have any existing integration test coverage for socket and
> > > > connection timeouts? I only see mock-based unit tests.
> > > >
> > >
> > > We do not. Timeouts are quite difficult to test reliably and up to now
> > > no one stepped forth to put efforts into building them.
> > >
> > > Oleg
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > > For additional commands, e-mail: dev-help@hc.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > For additional commands, e-mail: dev-help@hc.apache.org
> >
> >
>

Re: Unix domain socket support

Posted by Arturo Bernal <ab...@apache.org>.
Hi Ryan,

Now that UDS support is in, do you think it makes sense to also upstream
AF_VSOCK as an optional follow-up?

I’m thinking: same route/pool-key + custom connection-operator pattern, but
gated behind a builder flag and backed by JUnixSocket’s vsock module (so
“JUnixSocket-only”, Linux/VM focused).

Thanks,


On Fri, May 30, 2025 at 9:33 PM Ryan Schmitt <rs...@pobox.com> wrote:

> OK, I'll do it.
>
> On Fri, May 30, 2025 at 2:27 AM Oleg Kalnichevski <ol...@apache.org>
> wrote:
> >
> > On Thu, 2025-05-29 at 15:44 -0700, Ryan Schmitt wrote:
> > > Do we have any existing integration test coverage for socket and
> > > connection timeouts? I only see mock-based unit tests.
> > >
> >
> > We do not. Timeouts are quite difficult to test reliably and up to now
> > no one stepped forth to put efforts into building them.
> >
> > Oleg
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > For additional commands, e-mail: dev-help@hc.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>

Re: Unix domain socket support

Posted by Ryan Schmitt <rs...@pobox.com>.
OK, I'll do it.

On Fri, May 30, 2025 at 2:27 AM Oleg Kalnichevski <ol...@apache.org> wrote:
>
> On Thu, 2025-05-29 at 15:44 -0700, Ryan Schmitt wrote:
> > Do we have any existing integration test coverage for socket and
> > connection timeouts? I only see mock-based unit tests.
> >
>
> We do not. Timeouts are quite difficult to test reliably and up to now
> no one stepped forth to put efforts into building them.
>
> Oleg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: Unix domain socket support

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2025-05-29 at 15:44 -0700, Ryan Schmitt wrote:
> Do we have any existing integration test coverage for socket and
> connection timeouts? I only see mock-based unit tests.
> 

We do not. Timeouts are quite difficult to test reliably and up to now
no one stepped forth to put efforts into building them.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org