On Sat, Sep 14, 2019 at 12:24 AM Bert JW Regeer <[email protected]> wrote: > There's upsides and downsides to all of them. Pre-fork is great if you want > to save some memory and have the ability to kill processes in the future, > prefork + threaded allows you to handle many requests with a single forked > child, and just threaded means you have a single process and let Python deal > with spreading the load across threads (which in most web applications is > fine, because they are going to be spending an inordinate amount of clock > time just waiting on IO answers).
The number of processes also matters if you have a lot of modules, long intiialization routines, or keep a lot of things in memory shared between requests -- a multiprocess server will have a copy in each process while a multithreaded server will have one copy. Regarding performance, I usually use Waitress but I hvae one application that's higher-volume than the others and it bogged down in stress tests but when we switched it to uWSGI the problems went away. The downside is uWSGI is C so it's harder to install: it may be easy on one server/OS but not on another, and if the environment doesn't have the C build tools you have to install them. Recently we migrated the application to Docker although I don't think we migrated uWSGI so it may be back to Waitress. I started thinking about looking at Docker uWSGI options but haven't pursued it yet. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAH9f%3Dup4vdrUq8oER-vgx%2BQh0KOoC1WJo7mA2HasGTkkYAb%3D4Q%40mail.gmail.com.
