Search code examples
pythonuwsgi

How uWSGI master communicates with processes/workers?


When we do the following command

uwsgi --master --worker 4 --http-socket 0.0.0.0:8001 --wsgi-file ./examples/flaskpost.py

spawned uWSGI master process (pid: 38968) spawned uWSGI worker 1 (pid: 38969, cores: 1) spawned uWSGI worker 2 (pid: 38970, cores: 1) spawned uWSGI worker 3 (pid: 38971, cores: 1) spawned uWSGI worker 4 (pid: 38972, cores: 1)

How uWSGI master communication with workers? (signal?) What is the underlying mechanism?


Solution

  • Communication and event management are all managed by the same subsystem – the uWSGI signal framework. https://uwsgi-docs.readthedocs.io/en/latest/Signals.html