How to configure Zammad to use Unix sockets?

Infos:

  • Used Zammad version: 3.1.0
  • Used Zammad installation source:
  • Operating system: CentOS Linux release 7.7.1908 (Core)
  • Browser + version: 70.0 (64-Bit), Fedora Linux 30

Expected behavior:

  • A configuration option to define where Zammad binds zammad-railsserver and/or zammad-websocket to use a Unix socket (and then use unix:/run/... in NGINX to forward).
    • Saving latency and TCP overhead.
    • Even having one of these two servers on a Unix socket would be a win.

Actual behavior:

  • Did not find any configuration option yet to influence Zammads behavior
    • and don’t want to mess with the RPM package – but: any hints how to patch manually / where to influence?

Steps to reproduce the behavior:

Cheers,
Andreas

Hey @bitshift - welcome to the community!

Zammad is actually more or less a standard Rails application in this regards. You should be able to use the the bind CLI option to bind the application to the UNIX socket as described e.g. here. The websocket server uses the event machine WebSocket gem and I haven’t found any information on if it’s possible to bind to a UNIX socket or not. However, there is a bind CLI option available as well. It looks like it is expecting an IP address. I’m not sure how it will handle UNIX sockets.

I’m not entirely sure how how packager.io (the service that builds the Zammad OS packages) handles application init script generation but IIRC it is based on the application Procfile. So you could influence it by setting the matching ENV variable(s) (ZAMMAD_BIND_IP, …) via zammad config:set ....

Hope this helps in any way…

1 Like

Hi,

thank you for your input, quite good starting points for tinkering something out. This helps a lot, especially pointing to the option parser.

Will look into it and post results here.

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.