简体   繁体   中英

Why should I use `mod_wsgi` instead of launching by python?

I was wondering what is the advantages of mod_wsgi . For most python web framework, I can launch (daemon) the application by python directly and serve it in a port. Then when shall I use mod_wsgi ?

Since I answered your other question regarding Flask, I assume you are referring to using Flask's development server. The problem with that is it is single threaded.

Using mod_wsgi, you would be running behind apache, which will do process forking and allow for multiple simultaneous requests to be handled.

There are other options as well. Depending on your particular use case I would consider using eventlet's wsgi server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM