Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃挕 FEATURE REQUEST]: Configuration to UNIX socket permissions #1789

Open
Starfox64 opened this issue Nov 26, 2023 · 3 comments
Open

[馃挕 FEATURE REQUEST]: Configuration to UNIX socket permissions #1789

Starfox64 opened this issue Nov 26, 2023 · 3 comments
Assignees
Labels
C-feature-request Category: feature requested, but need to be discussed help-heeded-medium Call for participation: Experience needed to fix: Medium / intermediate

Comments

@Starfox64
Copy link

Plugin

None

I have an idea!

Add a configuration option to set the file permissions and ownership of UNIX sockets created for RPC, FastCGI, etc.

Right now it simply uses de default umask of the system which makes the socket inaccessible to non owners.

@Starfox64 Starfox64 added the C-feature-request Category: feature requested, but need to be discussed label Nov 26, 2023
@rustatian
Copy link
Member

Hey @Starfox64 馃憢
Yeah, currently, RR uses the parent (RoadRunner's) process permissions to create sockets.
RPC... hm, are you working with RPC/FCGI via UNIX sockets?

@Starfox64
Copy link
Author

Yes, I've switched to unix sockets for RPC and FastCGI, the performance increase is quite significant.

In my setup I have NGINX talking to RR's FastCGI and on the PHP side I use the KV plugin as a Laravel cache store:

  • TCP: 220 rqps
  • UDS: 306 rqps

Side note: I was quite surprised by this, as before I was using a Redis Sentinel cluster over the network (may have been on the same node, I didn't get to verify) was even faster (~320 rqps). I think there might be some improvement oportunities in the KV implementation.

@rustatian
Copy link
Member

Ah, got u @Starfox64 馃憤
Yeah, UNIX sockets are faster than TCP, and fastcgi handler is generally faster than a proxy_pass. I'll think about precise configuration of the permissions. Most likely, I'll spread the server.uid/server.gid options to all external file descriptors created by RR.

@rustatian rustatian added the help-heeded-medium Call for participation: Experience needed to fix: Medium / intermediate label Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: feature requested, but need to be discussed help-heeded-medium Call for participation: Experience needed to fix: Medium / intermediate
Projects
Status: 馃搵 Backlog
Development

No branches or pull requests

2 participants