What are uwsgi streams used for?

In the uwsgi.ini file, I see the configuration

[uwsgi]
socket = 127.0.0.1:3031
chdir = /home/foobar/myproject/
wsgi-file = myproject/wsgi.py
processes = 4
threads = 2
stats = 127.0.0.1:9191

I understand that each request is submitted in a different process. Then what are streams used for?

+4
source share
1 answer

Both processes and threads can be used to increase concurrency. Threads are cheaper than processes and use fewer resources, but may not always run in parallel due to the Python GIL .

Also, citing the uWSGI documentation :

. . , processes = 2 * cpucores . . uwsgitop .

+4

Source: https://habr.com/ru/post/1619221/


All Articles