Read more

load balance unix sockets to UDP destinations

Moritz Kraus
December 02, 2022Software engineer at makandra GmbH

Nginx is capable of forwarding a unix socket to UDP backend servers. This is quite handy for load balance syslog traffic.

Example nginx configuration

load_module /usr/share/nginx/modules/;

stream {
    upstream syslog_servers {
    server {
        listen unix:/run/nginx/log.sock udp;
        proxy_pass syslog_server;

Testing the connection

echo "Hello Syslog!" | socat - /run/nginx/log.sock


There are cases where nginx does not clean up the socket files after shutdown.

Systemd managed runtime dir

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show snapshot

The RuntimeDirectory configuration ensures the creation and deletion of the directory /run/nginx on startup and shutdown of the process.

# /etc/systemd/system/nginx.service.d/runtime-dir.conf
Posted by Moritz Kraus to makandra Operations (2022-12-02 12:38)