Customize gunicorn worker count (#578)

pull/585/head
Karthik Balakrishnan 2023-05-19 22:01:44 +05:30 zatwierdzone przez GitHub
rodzic 79e1f0da14
commit 568b87dadb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -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. have caches configured. See below for more details on each.
Scaling 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 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. 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 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 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 particular are quite connection-hungry (the parallel nature of their internal