Livid
291.9D
556.93D
V2EX  ›  DevOps

The Twelve-Factor App

  •  1
     
  •   Livid ·
    PRO
    · Nov 4, 2014 · 5167 views
    This topic created in 4247 days ago, the information mentioned may be changed or developed.
    http://12factor.net/

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

    可以直接导入到 iBook 中阅读 http://12factor.net/12factor.epub
    5 replies    2014-11-07 01:35:07 +08:00
    Livid
        1
    Livid  
    MOD
    OP
    PRO
       Nov 4, 2014
    Livid
        2
    Livid  
    MOD
    OP
    PRO
       Nov 4, 2014
    其实距离这份来自 Heroku 的 best practice 的最后更新时间已经过去两年多了,我很好奇的是,在 2014 年,是否有什么新的更好的方法论呢?
    yuankui
        3
    yuankui  
       Nov 5, 2014 via iPad
    干货!
    arbipher
        4
    arbipher  
       Nov 6, 2014
    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  
       Nov 7, 2014
    自问自答了。。。
    [Logs Are Streams, Not Files](http://adam.herokuapp.com/past/2011/4/1/logs_are_streams_not_files/) 这篇博客算是解释了这个问题。

    “要说找到也不能说完全没有找到;概念上是理解了的样子”
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5189 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 59ms · UTC 03:57 · PVG 11:57 · LAX 20:57 · JFK 23:57
    ♥ Do have faith in what you're doing.