[
https://issues.apache.org/jira/browse/ARTEMIS-5745?focusedWorklogId=990718&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-990718
]
ASF GitHub Bot logged work on ARTEMIS-5745:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 07/Nov/25 11:27
Start Date: 07/Nov/25 11:27
Worklog Time Spent: 10m
Work Description: GChuf commented on PR #6027:
URL:
https://github.com/apache/activemq-artemis/pull/6027#issuecomment-3502005369
> Why would you want to have the option if you don't need the extra
performance (assuming the main use-case here really is related to performance)?
Maybe that was a poor choice of words ... I'll try to explain my reasoning
as best as I can. I hope you can understand the tone of the message :)
Need is a strong word. You could say that no-one needs the extra 10% when
accessing the web console. Regardless, for the sake of this argument, let's say
that I don't "need" this extra 10% at this moment, because the web console
seems to be handling things ok. It's nice to have the option! though, because I
might need it in the future. I'm expecting my broker to be under heavier loads,
and my network to degrade ... etc.
The other point I want to make is, that I'll take 2% improvement any day of
the week, if all I need to do is change my proxy configuration from "127.0.0.1"
to "/tmp/jetty.sock". From that point of view, this almost seems like a free
lunch.
> For example, 10% faster average load times for the web console using the
default configuration ... Something like a 2-3% increase probably isn't worth
the additional complexity (i.e. technical debt) here.
I thought that's what you were getting at. This is also why I wanted some
opinions. You're right, this adds additional complexity, and so the question is
if it's worth it. Since I'm not an "expert" developer I'm not entirely sure how
big the technical debt of adding this feature could potentially be.
I've been trying to benchmark this today but I'm getting wildly different
results while benchmarking the same instance - so I don't want to mention any
numbers at this moment ... But I intend to post the results here once I'm able
to reproduce them.
I agree that this could fall under "premature optimization" if there's no
real benefits of using this under heavy load on the broker and/or network ...
or the web console.
> What kind of decoupling did you have in mind?
I was referring to network traffic, if we assume that all the netty
connectors are on the same interface as jetty, but you've already mentioned
different interfaces.
> Can you elaborate on the security aspect here?
I think most people would mention linux file permissions here, but I don't
think I'm suited to defend that point of view.
Issue Time Tracking
-------------------
Worklog Id: (was: 990718)
Time Spent: 1h 10m (was: 1h)
> Add support for exposing jetty on unix sockets
> ----------------------------------------------
>
> Key: ARTEMIS-5745
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5745
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Affects Versions: 2.44.0
> Reporter: Gašper Čefarin
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> I'd like to add support for unix sockets.
> The code in the PR is open to adjustments, since this is just a "proof of
> concept" so to say, and a lot of things are not as elegant as I'd like them
> to be. I want to hear your opinions first.
>
> There's 1 major change, and that's the removal of virtual hosts, and removal
> of connector names.
> From what I understand, virtual host names should match connector names for
> jetty "routing" to work - but this only works for http and https connectors,
> not for unix sockets.
> I had the issue of unix socket being created but the /console URL returning
> 404 - and the issue was resolved when I changed this code:
> {code:java}
> webapp.setVirtualHosts(new String[]{virtualHost}){code}
> to this:
> {code:java}
> webapp.setVirtualHosts(null);{code}
> I've had some help from AI, otherwise I couldn't find the source of the 404
> "error":
> _"Using null for virtual hosts makes the context respond to all connectors,
> including Unix domain sockets."_
> Since all connector names were added to virtualHost array, and all virtual
> hosts were added to all contexts, the functionality should be the same after
> this change ... Please correct me if I'm wrong.
> You can test this PR by adding this into bootstrap.xml:
> {code:java}
> <binding name="artemis" uri="unix:///tmp/jetty.sock">
> <app name="console" url="console" war="console.war"/>
> </binding>{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact