V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Livid
V2EX  ›  DevOps

The Twelve-Factor App

  •  1
     
  •   Livid · 2014-11-04 16:59:48 +08:00 · 4539 次点击
    这是一个创建于 3462 天前的主题,其中的信息可能已经有所发展或是发生改变。
    http://12factor.net/

    Heroku 关于架构设计和运维的知识总结。

    可以直接导入到 iBook 中阅读 http://12factor.net/12factor.epub
    5 条回复    2014-11-07 01:35:07 +08:00
    Livid
        1
    Livid  
    MOD
    OP
       2014-11-04 19:10:34 +08:00
    Livid
        2
    Livid  
    MOD
    OP
       2014-11-04 19:12:00 +08:00
    其实距离这份来自 Heroku 的 best practice 的最后更新时间已经过去两年多了,我很好奇的是,在 2014 年,是否有什么新的更好的方法论呢?
    yuankui
        3
    yuankui  
       2014-11-05 03:49:00 +08:00 via iPad
    干货!
    arbipher
        4
    arbipher  
       2014-11-06 15:08:50 +08:00
    http://12factor.net/logs 里面提到:
    A twelve-factor app never concerns itself with routing or storage of its **output stream**. It should not attempt to write to or manage logfiles. Instead, each running process writes its event stream, unbuffered, to stdout.

    In staging or production deploys, each process’ stream will be captured by the execution environment, collated together with all other streams from the app, and routed to one or more final destinations for viewing and long-term archival.

    这个意思是"我的代码中所有的Log.debug, Log.error都替换成print吗?",感觉这样很别扭啊。。。
    arbipher
        5
    arbipher  
       2014-11-07 01:35:07 +08:00
    自问自答了。。。
    [Logs Are Streams, Not Files](http://adam.herokuapp.com/past/2011/4/1/logs_are_streams_not_files/) 这篇博客算是解释了这个问题。

    “要说找到也不能说完全没有找到;概念上是理解了的样子”
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3478 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 751ms · UTC 00:52 · PVG 08:52 · LAX 17:52 · JFK 20:52
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.