Remix.run Logo
▲ attilaolah 7 hours ago

I also used to run everything on K8s (hybrid Talos / Alpine+k0s on nodes too small for Talos). It is a fun exercise, but with many small nodes eventually I realised I was burning a quarter of my fleet's CPU on just monitoring and routing services.

Eventually I switched to Systemd only, Clan-managed NixOS instances on bare metal.

The killer feature for me is socket activation. It even works with Jellyfin, wrapped in systemd-socket-proxyd. I have Jellyfin listen on a UDS, and Systemd will activate it when my TV connects. The downside is a few more seconds of waiting when I open Jellyfin on the TV. The upside is, after 20 minutes of idling, it is fully powered down.

This allows packing even more services on smaller machines, provided you don't e.g. play Minecraft and watch Jellyfin at the same time.

▲gf000 22 minutes ago | parent | next [-]

How does 20 minutes of idling work? Is that jellyfin shutting itself down?

▲attilaolah 2 minutes ago | parent [-]

No it doesn't support that, but systemd-socket-proxyd does. So my Systemd service exec line looks like this:

ExecStart = /path/to/systemd/lib/systemd/systemd-socket-proxyd --exit-idle-time=20min /path/to/jellyfin.socket;

https://github.com/attilaolah/dotfiles/blob/144d1711755d7a9e...

▲bengalister 5 hours ago | parent | prev | next [-]

Yes i will probably end up using systemd services when I will hit resource limits. So far everything works just fine on my LG16 32 GB i7 laptop and consumes around 15w.

▲apexalpha 7 hours ago | parent | prev | next [-]

Just looked up Clan since I'm a big fan of Nix but currently run my cluster with k3s, which indeed has some overhead.

It seems however that Clan is one of those classic projects where the website and the docs assume that everyone already knows what it is and how it works and goes straight to the benefits of doing it this (whatever 'this' is) way.

After reading both the site, docs and guides I am now scouring Reddit and YouTube for an actual explanation of whatever the hell it is and how it works.

▲dv_dt 4 hours ago | parent | prev [-]

We have come full circle back to inetd, only systemd is a little maze of twisty little passages in comparison