作者paulyanzi (消失)
看板Python
标题[问题] Flask 怎麽同时接收多个 request
时间Mon Nov 10 22:20:56 2014
最近学习使用 Flask Web framework
感觉如果有某个 HTTP request 要处理比较久的时间的话
新的 request 则会等到前一个处理完才会做
这样是 single thread 的概念?
是否有办法让他同时间处理多个 request 呢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.243.183.8
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/Python/M.1415629259.A.A68.html
※ 编辑: paulyanzi (111.243.183.8), 11/10/2014 22:36:17
1F:推 kkc: 搜索nginx+uwsgi, 顺便确认一下你的program是不是cpu-bound 11/10 23:06
2F:推 darkgerm: app.run(threaded=True) 11/11 10:10
3F:推 stonehomelaa: 可以用 gunicorn 11/11 20:31
4F:推 timTan: gunicorn 较简单 11/11 20:48
查到
http://flask.pocoo.org/docs/0.10/deploying/wsgi-standalone/
Gunicorn / Tornado / Gevent / Twisted Web 这四个都是吗?选一个用就好?
不知道各有无优缺点呢?
※ 编辑: paulyanzi (111.243.183.8), 11/11/2014 23:28:17