官术网_书友最值得收藏!

Externalizing logs

A Twelve-Factor App never attempts to store or ship log files. In a cloud, it is better to avoid local I/Os or file systems. If the I/Os are not fast enough in a given infrastructure, they could create a bottleneck. The solution to this is to use a centralized logging framework. Splunk, greylog, Logstash, Logplex, Loggly are some examples of log shipping and analysis tools. The recommended approach is to ship logs to a central repository by tapping the logback appenders and write to one of the shipper's endpoints.

In a microservices ecosystem, this is very important, as we are breaking a system into a number of smaller services, which could result in decentralized logging. If they store logs in a local storage, it would be extremely difficult to correlate logs between services:

In development, microservice may direct the log stream to stdout, whereas, in production, these streams will be captured by the log shippers and sent to a central log service for storage and analysis.

主站蜘蛛池模板: 杭锦旗| 伊金霍洛旗| 清河县| 嘉峪关市| 永善县| 蓬安县| 广宗县| 荆门市| 盐津县| 长宁县| 遂平县| 绥棱县| 会理县| 上犹县| 大名县| 乌什县| 高要市| 秦安县| 井冈山市| 楚雄市| 平舆县| 巴南区| 色达县| 南雄市| 平果县| 察雅县| 革吉县| 米易县| 民丰县| 五莲县| 巨野县| 南京市| 长垣县| 海门市| 鄂托克前旗| 平罗县| 黄陵县| 永兴县| 哈尔滨市| 和田县| 大田县|