Hacker News new | ask | show | jobs
by pavs 4790 days ago
I tried your suggestions listen backlog and somaxconn, are they dependent on unix socket or do I get benefit from it either way?

Thanks.

1 comments

Both TCP and UDS depend on it. UDS uses an API that follows the BSD sockets standard. However, TCP makes sense when you use nginx as load balancer between multiple PHP-FPM backends. A really tricky setup if you ask me. For UDS, besides lower latency, the namespace is cleaner (filesystem paths vs numeric ports - much easier to automate the configuration), and (at least under Linux) they follow the filesystem ACL. For example, under my setup, only nginx's user is allowed to read / write to the PHP-FPM sockets.