![]() (You could also take a look at uWSGI if you don't mind some more configuration.) Gevent is better, but from all the benchmarks I've looked at that involve real-world testing, meinheld seems to be the most straightforward, simplistic WSGI server. Instructions on how to modify your code accordingly are here: ![]() You can install gevent through pip with the command pip install gevent or pip3 with the command pip3 install gevent. Update (): It looks like gevent started supporting python3 5 years ago, shortly after I commented that it didn't, so you can use gevent now. Your needs may vary, but if all you're using is Flask, then I would recommend one of the following webservers. I did a bunch of research on various WSGI server performances. Install a WSGI server to be able to handle multi-threaded behavior. The solution from is technically correct, but keep in mind that the built-in WSGI server in Werkzeug (which is packaged into Flask and what it uses for app.run()) is only single-threaded.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |