You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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.
The text was updated successfully, but these errors were encountered:
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:
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.
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.
The text was updated successfully, but these errors were encountered: