summaryrefslogtreecommitdiff
path: root/man/systemd-socket-proxyd.xml
diff options
context:
space:
mode:
authorEric Anderson <ejona86@gmail.com>2020-05-02 15:54:24 -0700
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-06 13:58:57 +0200
commit9e12d5bf6368de78243a8de11d7739d2c89c1378 (patch)
treed371e92aca8d305549a1070d2c5c86a98a558c73 /man/systemd-socket-proxyd.xml
parentc28904dae0bc314622150f3ff58ae7b8217167bf (diff)
downloadsystemd-9e12d5bf6368de78243a8de11d7739d2c89c1378.tar.gz
socket-proxy: Support exit-on-idle
This adds the --exit-idle-time argument that causes systemd-socket-proxyd to exit when there has been an idle period. An open connection prevents the idle period from starting, even if there is no activity on that connection. When combined with another service that uses StopWhenUnneeded=, the proxy exiting can trigger a resource-intensive process to exit. So although the proxy may consume minimal resources, significant resources can be saved indirectly. Fixes #2106
Diffstat (limited to 'man/systemd-socket-proxyd.xml')
-rw-r--r--man/systemd-socket-proxyd.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/man/systemd-socket-proxyd.xml b/man/systemd-socket-proxyd.xml
index a72ac1bbc6..58b26aad87 100644
--- a/man/systemd-socket-proxyd.xml
+++ b/man/systemd-socket-proxyd.xml
@@ -67,6 +67,13 @@
<listitem><para>Sets the maximum number of simultaneous connections, defaults to 256.
If the limit of concurrent connections is reached further connections will be refused.</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--exit-idle-time=</option></term>
+
+ <listitem><para>Sets the time before exiting when there are no connections, defaults to
+ <constant>infinity</constant>. Takes a unit-less value in seconds, or a time span value such
+ as <literal>5min 20s</literal>.</para></listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<refsect1>
@@ -115,6 +122,9 @@ server {
<programlisting><![CDATA[# systemctl enable --now proxy-to-nginx.socket
$ curl http://localhost:80/]]></programlisting>
</example>
+ <para>If <filename>nginx.service</filename> has <varname>StopWhenUnneeded=</varname> set, then
+ passing <option>--exit-idle-time=</option> to <command>systemd-socket-proxyd</command> allows
+ both services to stop during idle periods.</para>
</refsect2>
<refsect2>
<title>Namespace Example</title>