Comment by attilaolah
3 days 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.
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.
Yeah Clan does have some rough edges. And the website is indeed like that, especially the bits about disko / partitioning, etc.
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.
We have come full circle back to inetd, only systemd is a little maze of twisty little passages in comparison
How does 20 minutes of idling work? Is that jellyfin shutting itself down?
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...
To be clear, it will shut down Jellyfin after 20 minutes of inactivity on the socket. It may as well be that Jellyfin is doing some background work like re-indexing videos, so it is not perfect, but it is the next best thing until Jellyfin supports first-class socket activation.
I see so it's not shutting down your computer and using WOL to wake it up?