Don't perform protection checks in Unix Domain Socket mode#532
Conversation
…n OS bugs to ensure connections can be closed in time.
…ing known OS bugs to ensure connections can be closed in time." This reverts commit 8d64d9a.
|
Due to one's limited level, after my deep research, I found that it is not a simple NPE problem, but in Unix Domain Sokcet mode, there is not that OS bug, so there is no need to perform protection checks. I hope my understanding is right, hahahaha |
|
Just want to say thanks! Our initial testing shows that bypassing the TCP layer and using Unix sockets is very significant performance increase.... like a lot faster. Pretty danged cool! We'd probably terminate TCP/TLS with Haproxy then load balance to Tomcat listening on Unix sockets. We still have a few more issues to overcome, but those are separate items or perhaps bugs, for another discussion:
Anyway thank you! Very much appreciated! |
@exabrial I also noticed this problem. I found that the automatic cleaning of UDS file was implemented in NioEndpoint, and I didn't find any logic about it in AprEndpoint. |
|
The cleanup in NIO is still limited (on purpose): it is only cleaned up if the socket was created successfully by the connector, and it anything fails really badly it will stay there. |
@exabrial Aha, i found it! The cleanup function is implemented in tc-native, you can take a look at this |
Thanks for your reply. Indeed, the cleanup does have limitations. |
|
Merged manually. Thanks for the PR. |
|
Note that 8.5.x is not affected by this issue. |
See stackoverflow and #402
9.0.x, 10.0.x all have this problem.