doc: Notes about worker keepalive support

This commit is contained in:
Tuukka Mustonen 2017-06-15 20:10:06 +03:00 committed by Berker Peksag
parent fc0d973416
commit 0e4e0779e6
3 changed files with 20 additions and 2 deletions

View File

@ -34,6 +34,10 @@ as any errors will affect at most a single request. Though as we describe below
only processing a single request at a time requires some assumptions about how
applications are programmed.
``sync`` worker does not support persistent connections - each connection is
closed after response has been sent (even if you manually add ``Keep-Alive``
or ``Connection: keep-alive`` header in your application).
Async Workers
-------------

View File

@ -234,7 +234,14 @@ keepalive
The number of seconds to wait for requests on a Keep-Alive connection.
Generally set in the 1-5 seconds range.
Generally set in the 1-5 seconds range for servers with direct connection
to the client (e.g. when you don't have separate load balancer). When
Gunicorn is deployed behind a load balancer, it often makes sense to
set this to a higher value.
.. note::
``sync`` worker does not support persistent connections and will
ignore this option.
Security
--------

View File

@ -760,7 +760,14 @@ class Keepalive(Setting):
desc = """\
The number of seconds to wait for requests on a Keep-Alive connection.
Generally set in the 1-5 seconds range.
Generally set in the 1-5 seconds range for servers with direct connection
to the client (e.g. when you don't have separate load balancer). When
Gunicorn is deployed behind a load balancer, it often makes sense to
set this to a higher value.
.. note::
``sync`` worker does not support persistent connections and will
ignore this option.
"""