Opened 4 years ago

Last modified 14 months ago

#1893 new enhancement

Support Linux abstract namespace socket?

Reported by: ng.hong.quan@… Owned by:
Priority: minor Milestone:
Component: nginx-core Version:
Keywords: Cc:
uname -a: Linux Ermine 5.3.0-23-generic #25-Ubuntu SMP Tue Nov 12 09:22:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.16.1 (Ubuntu)
built with OpenSSL 1.1.1c 28 May 2019
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-cVmHmM/nginx-1.16.1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-compat --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module

Description

Please support Linux abstract namespace socket, which is like Unix domain socket, but doesnot create a file.

My special setup is that, we have many websites in the same machine, each website can have 2 socket files to be connected by Nginx (one for HTTP, one for WebSocket).

Because of the large amount of websites, we don't use port number, which is difficult to maintain (after a while, we cannot remember which website holds which port), so we use unix domain socket, shared the name with the web app.

There is small problem with Unix domain socket is that, the file creation needs permission, and problem with file deletion. So it would be nice if Nginx support Linux's abstract namespace socket.

Change History (2)

comment:2 by bes.internal@…, 14 months ago

For the record:
Nginx Unit support abstract sockets on linux since Unit 1.28.0, 13 Sep 2022

Note: See TracTickets for help on using tickets.