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

Support for on-demand starting #3382

Open
hadmut opened this issue May 16, 2024 · 0 comments
Open

Support for on-demand starting #3382

hadmut opened this issue May 16, 2024 · 0 comments

Comments

@hadmut
Copy link

hadmut commented May 16, 2024

Problem: Quite often a web/api/rest server is only need sometimes to run, and usually on small and older machines not packed with heaps of RAM it is reasonable to run only those processes that are actually needed, i.e. start them on demand only.

There is currently two common and well established methods to run servers on demand:

  1. The old fashioned way to start them with inetd / xinetd, which open a socket, wait for connections, and once a client connect, spawn a process to handle all incoming requests, and once the process terminates itself (e.g. due to timeout), again, wait and spawn if needed.

  2. The newer systemd, which virtually does the same, but supports two different methods of passing the socket to the server application, which is a) the traditional inetd method and b) the newer way sd_listen_fds(3), see man systemd.socket and man 3 sd_listen_fds

Would be great if it was possible to have small web servers or REST APIs, that are needed occasionally only, be able to be started on demand through systemd.

Describe alternatives you've considered
Start the server through systemd permanently (as a system task) or once the user is logged in (as a user unit). Means the server is running always, even if not needed.

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

No branches or pull requests

1 participant