Skip to content

Support socket fd inheritance for systemd socket activation #7939

Description

@runleveldev

What is your suggestion?

Implement a CLI argument to specify a file descriptor to bind to instead of directly binding to a inet or unix socket.

Why do you want this feature?

systemd allows services to be activated by sockets managed by itself keeping resource usage as none until needed. For this to work properly, the service has to accept a file descriptor specified by LISTEN_FDS environment variable (but predictibly starting at 3) instead of creating it's own listen socket.

Are there any workarounds to get this functionality today?

systemd-socket-proxyd should work but it creates a requirement of 2 new systemd units and an extra tcp port. Implementing a socket-fd parameter makes this a lot simpler.

Are you interested in submitting a PR for this?

yes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions