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

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.

主站蜘蛛池模板: 泽普县| 玛纳斯县| 陆川县| 阿城市| 雷山县| 浮梁县| 兴业县| 和龙市| 玉林市| 莲花县| 个旧市| 尤溪县| 泸定县| 乌拉特后旗| 安宁市| 怀宁县| 资源县| 芒康县| 汉源县| 韶关市| 唐山市| 沙河市| 贵定县| 伊金霍洛旗| 根河市| 霍城县| 息烽县| 化州市| 财经| 兴仁县| 武山县| 南江县| 临猗县| 环江| 钟山县| 华亭县| 房产| 盘山县| 包头市| 颍上县| 海门市|