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

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.

主站蜘蛛池模板: 泉州市| 东台市| 海淀区| 平度市| 兴仁县| 大兴区| 双鸭山市| 浦北县| 秦皇岛市| 尼木县| 康保县| 阜新| 饶河县| 安福县| 潢川县| 桓台县| 卫辉市| 本溪市| 宜宾市| 凌云县| 宿迁市| 平顶山市| 大连市| 民丰县| 土默特左旗| 富锦市| 博乐市| 仁寿县| 九江县| 高淳县| 岚皋县| 常熟市| 汉源县| 杨浦区| 叶城县| 张家港市| 新丰县| 通辽市| 阳东县| 乃东县| 沿河|