V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
jwu
V2EX  ›  Python

bottle的WSGIRefServer()开发环境服务器能否承载10+小时20人以内每秒<10次的Request?

  •  
  •   jwu · 2013-02-04 23:57:28 +08:00 · 3759 次点击
    这是一个创建于 4111 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我的内部系统算是给写好了,一个简单的数据库web管理系统,由于是在公司内网中使用,python也是才学习的,对部属这块完全不清楚,打算先用bottle自带的WSGIRefServer顶上,请问对于我在标题中提到的访问量会有问题吗? 即使有出了问题,重新在命令行下面python app.py即可,也倒是方便
    6 条回复    1970-01-01 08:00:00 +08:00
    ritksm
        1
    ritksm  
       2013-02-05 00:01:42 +08:00   ❤️ 1
    bottle.run(app=APP, server="cherrypy")
    Livid
        2
    Livid  
    MOD
       2013-02-05 00:03:27 +08:00   ❤️ 1
    你用测试工具测一下就知道了。

    根据你这个需求,每个 request 的处理时间在 100ms 之内就没问题了(如果是单核 CPU 的话)。
    est
        3
    est  
       2013-02-05 08:51:30 +08:00
    WSGIRefServer有性能问题。不过补丁也很简单,就这一行:

    __import__('BaseHTTPServer').BaseHTTPRequestHandler.address_string = lambda x:x.client_address[0]

    骂人在这里 http://blog.est.im/post/34288214582
    jwu
        4
    jwu  
    OP
       2013-02-05 08:58:53 +08:00
    非常感谢大家~

    @ritksm 下个项目一定试试cherrypy,这个项目我想尽可能依赖少些

    @Livid 那我去学习学习怎么做压力测试

    @est 虽然看不太懂但感激五体投地
    ericFork
        5
    ericFork  
       2013-02-05 12:26:02 +08:00
    用 gunicorn 也很方便的
    ritksm
        6
    ritksm  
       2013-02-05 22:51:20 +08:00
    @jwu 其实只作为wsgi server的话也还好。。。。gunicorn确实也不错
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3218 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 13:57 · PVG 21:57 · LAX 06:57 · JFK 09:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.