Replies: 2 comments 1 reply
-
Hello, I'm also interested in supporting Redis through Unix sockets, and I'm willing to provide a patch. We already have one in the Nixpkgs distribution, which has worked without any issues. This defines a new REDIS = {
"tasks": {"URL": "unix:///run/redis-netbox/redis.sock?db=0", "SSL": False},
"caching": {"URL": "unix:///run/redis-netbox/redis.sock?db=1", "SSL": False},
} What do you all think? Would this be accepted? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@minijackson could you comment with your proposed implementation on #15962? That would be the best place to discuss. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Presently, NetBox is limited to communicating with Redis TCP port, with no support for Redis unix socket.
This limitation feels unnecessary, and for someone familiar with
settings.py
it should be fairly easy to add support for socket.For a quick-and-dirty hack, I can force NetBox to use socket instead of port by changing this line:
to
This works, but is of course horrible as it breaks existing support for TCP. (The syntax was easily gleaned from comments in the other Python scripts).
A much neater approach has been suggested before, namely in issue #4377, which seems to have been closed without any action taken. I think the outlined syntax in
configuration.py
is good, but the suggested changes tosettings.py
have of course become outdated.And so I hope this post might inspire you, dear maintainer/developer, to bring Redis socket support to NetBox! :-)
Beta Was this translation helpful? Give feedback.
All reactions