http://m.imilky.cn/index-wap2.php?p=599
结果太令人惊讶了,Gevent的性能和Fapws相差5%左右,但提供了完整的HTTP1.1支持,更好的高并发访问的稳定性,当然一旦你用上 nginx做前端反向代理,性能还是会再下降30%左右。如果是生产环境的话在fapws没有完整的支持HTTP1.1之前Gevent绝对是最好的选 择!
现在看来使用uwsgi是有点鲁莽
Cherokee ¶
The uWSGI support is officially included in the Cherokee webserver. Cherokee is fast and lightweight, has a beatiful admin interface and a great community. Their support for uWSGI has been awesome since the begining and we recommend its use in every situation. The userbase of the Cherokee uWSGI handler is probably the biggest of all the others choice. It is commercialy supported by Unbit.
Nginx ¶
The module is included in the official Nginx distribution from the 0.8.40 release. A 0.7.x version is maintained in the uWSGI package. This is a stable handler commercially supported by Unbit.
Flask deploy ¶
Flask is an amazing microframework. Deploying it on uWSGI is super-fast/super-easy
(call it myapp.py)
from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return "Hello World!" if __name__ == '__main__': app.run()
./uwsgi -s /tmp/mysock.sock --module myapp --callable app
or
./uwsgi -s /tmp/mysock.sock -w myapp:app