5

We are using uwsgi to serve the python app behind nginx.

Can I hope that the theoretical maximum of simultaneously served client connections is equal to uwsgi processes * threads?

We are using server-sent events, so, the connections are held for a long time.

saabeilin
  • 409
  • 1
  • 4
  • 11

2 Answers2

2

yes, every single thread can manage a single request, so if you have 3 processes and 5 threads you can manage 15 concurrent requests.

roberto
  • 1,812
  • 12
  • 8
0

when hosting python behind uWSGI, it can only run as many simultaneous requests as processes there are. If you have more threads uwsgi will take more http requests but will keep them on hold until a process is freed up of a previous request.

This can be checked by doing a request that time.sleep(300) then spawn curl commands from terminals and you will see what I described above.

dnuske
  • 111
  • 4