推荐学习书目
› 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
asfdasf32
V2EX  ›  Python

请问一个设计需求是否合理?

  •  
  •   asfdasf32 · Apr 16, 2018 · 3245 views
    This topic created in 3083 days ago, the information mentioned may be changed or developed.

    场景:在一个 celery 分布式队列场景下,任务已经分配到各个节点。 方案 1:每个客户端节点我起来 10 个 docker 去执行这个任务;方案 2:我每个客户端开 10 个线程去执行这个任务

    想请问开 10 个 docker 的这种方式真的会快吗,再考虑性能消耗等方面,这样合理吗?

    4 replies  •  2018-04-16 19:53:08 +08:00
    3IOhG7M0knRu5UlC
        1
    3IOhG7M0knRu5UlC  
       Apr 16, 2018 via Android
    看规模吧,用 docker 可以无视机器大规模部署调整,相反如果你只有几台机器就随便跑吧
    xpresslink
        2
    xpresslink  
       Apr 16, 2018
    你说这些没有,选用哪个方式在于任务的性质,是网络 IO 密集还是 CPU 密集,并发用户等因素要综合考虑。
    更多时候要通过测试对比。
    asfdasf32
        3
    asfdasf32  
    OP
       Apr 16, 2018
    @xpresslink 比如大规模的端口扫描,网络 IO 密集
    vincenttone
        4
    vincenttone  
       Apr 16, 2018
    个人认为 docker 主要是在环境部署和资源利用上有优势,弹性比较好。
    如果只有几台机器,环境又没啥大问题,感觉怎么跑都可以。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   859 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 20:16 · PVG 04:16 · LAX 13:16 · JFK 16:16
    ♥ Do have faith in what you're doing.