I am not sure if I understand your question, here's the reasons for
introducing a new scheme for ATS remap rules:

I have a use case that needs to distinguish requests received on an IP
interface and ones received on a Unix Domain Socket. Having different remap
rules for those two allows me to use different remap plugin settings. Does
that make sense?

Unix Domain Socket is different from one for TCP/IP. There isn't a port
number for it. As far as I know, there is no standardized way to indicate
the use of Unix Domain Socket, and I think the scheme portion is the only
field that we can use without violating RFC 3986. Although the new scheme
"http+uds" is not standardized, external libraries for parsing/generating
URLs should be able to handle it.

I hope these answers your questions.

Thanks,
Masakazu


On Wed, Aug 20, 2025 at 2:24 PM Randy DuCharme <radio.ad...@gmail.com>
wrote:

> APIs can be anything.  There's hundreds of ports available.  Why
> standardize the unstandard?
>
> Randall DuCharme (Radio *AD5GB*)
> Powered by Open Source software.
>
>
> On Wed, Aug 20, 2025, 15:22 Randy DuCharme <radio.ad...@gmail.com> wrote:
>
> > Why?
> >
> > Randall DuCharme (Radio *AD5GB*)
> > Powered by Open Source software.
> >
> >
> > On Wed, Aug 20, 2025, 15:21 Masakazu Kitajo <mas...@apache.org> wrote:
> >
> >> Hi,
> >>
> >> I recently proposed a way to support remap rules that only match with
> >> requests that are made on Unix Domain Socket, and I'd like to request
> for
> >> comments.
> >> https://github.com/apache/trafficserver/pull/12338
> >>
> >> My proposal is to introduce a special URL scheme "http+uds" (and
> >> https+uds)
> >> and use it with map_with_recv_port keyword (the keyword is uncommon but
> >> not
> >> new).
> >>
> >> Example:
> >> map_with_recv_port http+uds://service.example http://origin.example/
> >>
> >> I originally thought of using a special port number/string instead of
> the
> >> new scheme, but it didn't seem practical to me because it'd require a
> lot
> >> of changes in code. In a nutshell, having characters at the port portion
> >> of
> >> a URL is not allowed by the standard, and we'd have to change the URL
> >> parser and also the data structure, which affects cache data. With that
> >> said, that is a difficulty in the implementation. I'd appreciate and
> >> respect comments from users as well.
> >>
> >> Thanks,
> >> Masakazu
> >>
> >
>

Reply via email to