Customize gunicorn worker count (#578)

This commit is contained in:
Karthik Balakrishnan 2023-05-19 22:01:44 +05:30 committed by GitHub
parent 79e1f0da14
commit 568b87dadb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,6 @@ We recommend that all installations are run behind a CDN, and
have caches configured. See below for more details on each.
Scaling
-------
@ -30,6 +29,14 @@ using more resources if you give them to it), you can:
a "celebrity" or other popular account will give Stator a lot of work as it
has to send a copy of each of their posts to every follower, separately.
* Takahe is run with Gunicorn which spawns several
[workers](https://docs.gunicorn.org/en/stable/settings.html#workers) to
handle requests. Depending on what environment you are running Takahe on,
you might want to customize this via the ``GUNICORN_CMD_ARGS`` environment
variable. For example - ``GUNICORN_CMD_ARGS="--workers 2"`` to set the
worker count to 2.
As you scale up the number of containers, keep the PostgreSQL connection limit
in mind; this is generally the first thing that will fail, as Stator workers in
particular are quite connection-hungry (the parallel nature of their internal