推荐学习书目
› 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 · Feb 4, 2013 · 4839 views
    This topic created in 4985 days ago, the information mentioned may be changed or developed.
    我的内部系统算是给写好了,一个简单的数据库web管理系统,由于是在公司内网中使用,python也是才学习的,对部属这块完全不清楚,打算先用bottle自带的WSGIRefServer顶上,请问对于我在标题中提到的访问量会有问题吗? 即使有出了问题,重新在命令行下面python app.py即可,也倒是方便
    6 replies  •  1970-01-01 08:00:00 +08:00
    ritksm
        1
    ritksm  
       Feb 5, 2013   ❤️ 1
    bottle.run(app=APP, server="cherrypy")
    Livid
        2
    Livid  
    MOD
    PRO
       Feb 5, 2013   ❤️ 1
    你用测试工具测一下就知道了。

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

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

    骂人在这里 http://blog.est.im/post/34288214582
    jwu
        4
    jwu  
    OP
       Feb 5, 2013
    非常感谢大家~

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

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

    @est 虽然看不太懂但感激五体投地
    ericFork
        5
    ericFork  
       Feb 5, 2013
    用 gunicorn 也很方便的
    ritksm
        6
    ritksm  
       Feb 5, 2013
    @jwu 其实只作为wsgi server的话也还好。。。。gunicorn确实也不错
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   951 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 19:28 · PVG 03:28 · LAX 12:28 · JFK 15:28
    ♥ Do have faith in what you're doing.