Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Monitoring socket states #103

Open
elimisteve opened this issue Apr 22, 2024 · 1 comment
Open

Feature Request: Monitoring socket states #103

elimisteve opened this issue Apr 22, 2024 · 1 comment

Comments

@elimisteve
Copy link

How awesome would it be to if we could have systemd's socket activation functionality without the bloat of systemd? What if we just needed lunatik to listen for socket connections on certain ports then spin up the appropriate process to handle that request?!

I would love to see this!

We'd need to monitor netlink and eBPF events, it sounds like? Details: https://chat.openai.com/share/1b9e204d-14ad-493d-9ba3-cd54162aaa74

@lneto
Copy link
Contributor

lneto commented Apr 22, 2024

hi @elimisteve, I'm not that familiar with systemd, but if I got it correctly you want something like an in-kernel inetd, right? I think it would be quite possible and the missing part for being able to doing this on Lunatik is the ability to spawn a process. We could even have an init.lua (something that I've though in the past actually). I think a good starting point would be to bind fork/clone. However, if you want to spawn the process from the user space itself, we just lack the ability to dup the socket's fd and attribute it to the service process. I can help you (or anyone else that would like to tackle this); however, I don't have time now to do this by myself.

We'd need to monitor netlink and eBPF events, it sounds like?

I don't think we would need neither; we could use AF_UNIX, which is already supported by Lunatik.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants