[Flask] Flask Deployment on Tornado
David Lord
davidism at gmail.com
Tue Apr 12 13:22:58 EDT 2016
The Tornado section was removed from the docs in master.
https://github.com/pallets/flask/pull/1187
On 04/12/2016 10:20 AM, errata at gmx.com wrote:
>
> The Flask docs include this snippet for deploying a Flask app on Tornado:
> http_server = HTTPServer(WSGIContainer(app))
> http_server.listen(5000)
> IOLoop.instance().start()
>
> But the Tornado docs have this to say about deploying WSGI apps using
> WSGIContainer:
>
>
>> Warning
>>
>> WSGI is a/synchronous/interface, while Tornado’s concurrency model is
>> based on single-threaded asynchronous execution. This means that
>> running a WSGI app with Tornado’s|WSGIContainer|
>> <http://www.tornadoweb.org/en/stable/wsgi.html#tornado.wsgi.WSGIContainer>is/less
>> scalable/than running the same app in a multi-threaded WSGI server
>> like|gunicorn|or|uwsgi|. Use|WSGIContainer|
>> <http://www.tornadoweb.org/en/stable/wsgi.html#tornado.wsgi.WSGIContainer>only
>> when there are benefits to combining Tornado and WSGI in the same
>> process that outweigh the reduced scalability.
>>
>
> So, is the consensus opinion to stick with gunicorn or uwsgi for
> deployment?
>
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160412/78f7bbc6/attachment.html>
More information about the Flask
mailing list