SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
THE PATTERNS OF DISTRIBUTED LOGGING
AND CONTAINERS
CloudNativeCon Europe 2017
March 30, 2017
Satoshi Tagomori (@tagomoris)
Treasure Data, Inc.
SATOSHI TAGOMORI
(@tagomoris)
Fluentd, MessagePack-Ruby, Norikra, ...
Treasure Data, Inc.
1. Microservices, Containers and Logging
2. Scaling Logging Platform
3. Patterns: Source/Destination -side Aggregation
4. Patterns: Scaling Up/Out Destination
5. Practices
MICROSERVICES,
CONTAINERS AND LOGGING
Logging in Industries
• Service Logs
• Web access logs
• Ad logs
• Commercial transaction logs for analytics (EC, Game, ...)
• System Logs
• Syslog and other OS logs
• Audit logs
• Performance metrics
Logs for
Business Growth
Logs for
Service Stability
Microservices and Logging
Users
LAMP/Rails/MEAN/... Apps
Logs
Users
Search
Logs
Recommendation Shopping cart Reviews Ads ...
Monolithic service Microservices
Microservices and Containers
• Microservices
• Isolated dependencies
• Agile deployment
• Containers
• Isolated environments & resources
• Simple pull&restart deployment
• Less overhead, high density
Logging Challenges with Microservices/Containers
• Containerization changes everything:
• No permanent storages
• No fixed physical/network addresses
• No fixed mapping between servers and roles
Logging Challenges with Microservices/Containers
• Containerization changes everything:
• No permanent storages
• No fixed physical/network addresses
• No fixed mapping between servers and roles
Transfer Logs to Anywhere ASAP
Logging Challenges with Microservices/Containers
• Containerization changes everything:
• No permanent storages
• No fixed physical/network addresses
• No fixed mapping between servers and roles
Push Logs From Containers
Logging Challenges with Microservices/Containers
• Containerization changes everything:
• No permanent storages
• No fixed physical/network addresses
• No fixed mapping between servers and roles
Label Logs With Service Names/Tags
Logging Challenges with Microservices/Containers
• Containerization changes everything:
• No permanent storages
• No fixed physical/network addresses
• No fixed mapping between servers and roles
Label Logs With Service Names/Tags
Parse Logs & Label Values At Source
Structured Logs
Structured Logs: tag, time, key-value pairs
Original log:
the customer put an item to cart: item_id=101, items=10, client=web
Structured log:
ec_service.shopping_cart
2017-03-30 16:35:37 +0100
{
"container_id": "bfdd5b9....",
"container_name": "/infallible_mayer",
"source": "stdout",
"event": "put an item to cart",
"item_id": 101,
"items": 10,
"client": "web"
}
tag
timestamp
record
How to Ship Logs from Docker Containers
nginx, mysql, ....
log files
agents
read files,
parse plain texts
apps, middleware
json log files
agents
read files,
parse json lines
applications
agents
just receive
transferred logs
apps, middleware
agents
just receive
transferred logs
Using
mounted volume
Using
container json logs
Sending logs
to agents directly
Using
logging drivers
+ disk I/O penalty
+ mount points
+ disk I/O penalty
+ logger code
+ agent config 😃
SCALING LOGGING PLATFORM
Core Architecture: Distributed Logging
Source (Container + Agent)
Transferring/Aggregation layer
Destination (Storage, Database, Service)
Distributed Logging Workflow
• Retrieve raw logs: file system / network
• Parse log content
Collector
Aggregator
Destination
• Get data from multiple sources
• Split/merge incoming data into streams
• Retrieve structured logs from Aggregator
• Store formatted logs
Scaling Logging
• Network Traffic
• Split heavy log traffic into traffics to nodes
• CPU Load
• Distribute processing to nodes about parsing/formatting logs
• High Availability
• Switch traffic from a node to another for failures
• Agility
• Reconfigure whole logging layer to modify destinations
PATTERNS:
SOURCE/DESTINATION -SIDE
AGGREGATION
Source Side Aggregation
Destination
Side
Aggregation
NO
YES
YESNO
Now I'm Talking About:
Source
Transferring
Aggregation
Destination
Source Side
Destination Side
Source-side Aggregation Patterns
Without
Source-side Aggregation
With
Source-side Aggregation
Collector
Destination-side
Aggregate
Container
Aggregation Pattern without Source-side Aggregation
• Pros:
• Simple configuration
• Cons:
• Fixed aggregator (destination endpoint) address

configured in containers
• Many network connections
• High load in aggregator / destination
Aggregation Pattern with Source-side Aggregation
• Pros:
• Less connections
• Lower load in aggregator / destination
• Less configurations in containers
• More agility

(aggregate containers can be reconfigured)
• Cons:
• Need more resources (+1 container per host)
Aggregate
Container
Destination-side Aggregation Patterns
Without
Destination-side Aggregation
With
Destination-side Aggregation
Aggregator
Node
Source-side
Destination
Aggregation Pattern without Destination-side Aggregation
• Pros:
• Less nodes
• Simpler configuration
• Cons:
• Destination changes affects all source nodes
• Worse performance:

many small write requests on destination(storage)
• Pros:
• Destination changes does NOT affect source nodes
• Better performance:

destination aggregator can merge write operations
• Cons:
• More nodes
• More complex configuration
Aggregation Pattern with Destination-side Aggregation
Aggregator
Node
PATTERNS:
SCALING UP/OUT DESTINATION
HOW TO SCALE HERE
Source
Transferring
Aggregation
Destination
Now I'm Talking About:
Scaling Destination Patterns
Scaling Up
Aggregator/Destination Endpoints
Scaling Out
Aggregator/Destination Endpoints
Destination-side
Aggregator
or
Destination
Load balancer
or
Huge queue
Backend
nodes
Collector
nodes
Using HTTP Load Balancer
or Huge Queues
Using Round Robin Clients
• Pros:
• Simple configuration:

specifying load balancer only

in collector nodes
• Cons:
• Upper limits about scaling up

on Load balancer (or queue)
Scaling Up Destination
Backend
nodes
Load balancer
or
Huge queue
Scaling Out Destination
• Pros:
• Unlimited scaling by adding nodes
• Cons:
• Complex configuration in collector nodes
• Client feature required for round-robin
• Unavailable for traffic over Internet
Destination-side Aggregation and Destination Scaling
Destination Side Aggregation
Scaling Up
Destination
Endpoints
YESNO
Scaling Out
Destination
Endpoints
Early Stage Systems
Collect Logs over
Internet
or
Using Queues
Collect Logs
in Data Center
All Collector Nodes Must Know
All Destination Nodes
↓
Uncontrollable
PRACTICES
Practices: Docker + Fluentd
• Docker Fluentd Logging Driver
• Docker containers can send these logs to Fluentd directly,

with less overhead
• Fluentd's Pluggable Architecture
• Various destination systems (storage/database/service) are available

by changing configuration
• Small Memory Footprint
• Source aggregation requires +1 container per hosts:

less additional resource usage is fine!
Practice 1: Source-side Aggregation + Scaling Up
• Kubernetes: Fluentd + Elasticsearch
• a.k.a EFK stack (inspired by ELK stack)
• Elasticsearch - Fluentd - Kibana
https://kubernetes.io/docs/tasks/debug-application-cluster/logging-elasticsearch-kibana/
apps, middleware
json log files
Practice 2: Source-side Aggregation + Scaling Up
• Containerized Applications
• w/ Google Stackdriver for Monitoring
• w/ Treasure Data for Analytics
Google Stackdriver Logging
apps, middleware
Practice 3: Source/Destination-side Aggregation + Scaling Out
• Containerized Application
• w/ Log processing on Hadoop
• writing files on HDFS via WebHDFS
• Hadoop HDFS prefers large files on HDFS:
• Destination-side aggregation works well
apps, middleware
Practice 4: Source/Destination-side Aggregation + Scaling Out
• Containerized Application
• w/ Log processing on Google BigQuery
• putting logs via HTTPS
• BigQuery has quota about write requests:
• Destination-side aggregation works well
apps, middleware
Best practices?
• Source aggregation: do it
• it makes app containers free from logging problems (buffering, HA, ...)

• Destination aggregation: it depends
• no need for cloud logging services/storages
• may need for self-hosted distributed filesystems/databases
• may need for cloud services which charges per requests

• Destination scaling: it depends on destinations
Make Logging Scalable,
Service Stable & Business Growing.
Happy Logging!
@tagomoris

Contenu connexe

Tendances

Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to RedisDvir Volk
 
Fluentd Overview, Now and Then
Fluentd Overview, Now and ThenFluentd Overview, Now and Then
Fluentd Overview, Now and ThenSATOSHI TAGOMORI
 
Monitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_TutorialMonitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_TutorialTim Vaillancourt
 
Introduction to Prometheus
Introduction to PrometheusIntroduction to Prometheus
Introduction to PrometheusJulien Pivotto
 
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...Flink Forward
 
Apache Spark on K8S Best Practice and Performance in the Cloud
Apache Spark on K8S Best Practice and Performance in the CloudApache Spark on K8S Best Practice and Performance in the Cloud
Apache Spark on K8S Best Practice and Performance in the CloudDatabricks
 
MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)Lucas Jellema
 
Flink powered stream processing platform at Pinterest
Flink powered stream processing platform at PinterestFlink powered stream processing platform at Pinterest
Flink powered stream processing platform at PinterestFlink Forward
 
Where is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkWhere is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkFlink Forward
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusGrafana Labs
 
Deep Dive into Building Streaming Applications with Apache Pulsar
Deep Dive into Building Streaming Applications with Apache Pulsar Deep Dive into Building Streaming Applications with Apache Pulsar
Deep Dive into Building Streaming Applications with Apache Pulsar Timothy Spann
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy Docker, Inc.
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With PrometheusKnoldus Inc.
 
Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...Flink Forward
 
Best practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultBest practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultDataWorks Summit
 
Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12N Masahiro
 
Log management with ELK
Log management with ELKLog management with ELK
Log management with ELKGeert Pante
 

Tendances (20)

Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Fluentd Overview, Now and Then
Fluentd Overview, Now and ThenFluentd Overview, Now and Then
Fluentd Overview, Now and Then
 
Monitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_TutorialMonitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_Tutorial
 
Introduction to Prometheus
Introduction to PrometheusIntroduction to Prometheus
Introduction to Prometheus
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
 
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
 
Apache Spark on K8S Best Practice and Performance in the Cloud
Apache Spark on K8S Best Practice and Performance in the CloudApache Spark on K8S Best Practice and Performance in the Cloud
Apache Spark on K8S Best Practice and Performance in the Cloud
 
MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)
 
Flink powered stream processing platform at Pinterest
Flink powered stream processing platform at PinterestFlink powered stream processing platform at Pinterest
Flink powered stream processing platform at Pinterest
 
Where is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkWhere is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in Flink
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
Deep Dive into Building Streaming Applications with Apache Pulsar
Deep Dive into Building Streaming Applications with Apache Pulsar Deep Dive into Building Streaming Applications with Apache Pulsar
Deep Dive into Building Streaming Applications with Apache Pulsar
 
Prometheus design and philosophy
Prometheus design and philosophy   Prometheus design and philosophy
Prometheus design and philosophy
 
Log analytics with ELK stack
Log analytics with ELK stackLog analytics with ELK stack
Log analytics with ELK stack
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
 
Logstash
LogstashLogstash
Logstash
 
Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...Building a fully managed stream processing platform on Flink at scale for Lin...
Building a fully managed stream processing platform on Flink at scale for Lin...
 
Best practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultBest practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at Renault
 
Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12
 
Log management with ELK
Log management with ELKLog management with ELK
Log management with ELK
 

En vedette

Modern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldModern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldSATOSHI TAGOMORI
 
How To Write Middleware In Ruby
How To Write Middleware In RubyHow To Write Middleware In Ruby
How To Write Middleware In RubySATOSHI TAGOMORI
 
How to Make Norikra Perfect
How to Make Norikra PerfectHow to Make Norikra Perfect
How to Make Norikra PerfectSATOSHI TAGOMORI
 
Fighting API Compatibility On Fluentd Using "Black Magic"
Fighting API Compatibility On Fluentd Using "Black Magic"Fighting API Compatibility On Fluentd Using "Black Magic"
Fighting API Compatibility On Fluentd Using "Black Magic"SATOSHI TAGOMORI
 
Open Source Software, Distributed Systems, Database as a Cloud Service
Open Source Software, Distributed Systems, Database as a Cloud ServiceOpen Source Software, Distributed Systems, Database as a Cloud Service
Open Source Software, Distributed Systems, Database as a Cloud ServiceSATOSHI TAGOMORI
 
20160730 fluentd meetup in matsue slide
20160730 fluentd meetup in matsue slide20160730 fluentd meetup in matsue slide
20160730 fluentd meetup in matsue slidecosmo0920
 
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05都元ダイスケ Miyamoto
 
To Have Own Data Analytics Platform, Or NOT To
To Have Own Data Analytics Platform, Or NOT ToTo Have Own Data Analytics Platform, Or NOT To
To Have Own Data Analytics Platform, Or NOT ToSATOSHI TAGOMORI
 
Perfect Norikra 2nd Season
Perfect Norikra 2nd SeasonPerfect Norikra 2nd Season
Perfect Norikra 2nd SeasonSATOSHI TAGOMORI
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage SystemsSATOSHI TAGOMORI
 
Fluentd v0.14 Plugin API Details
Fluentd v0.14 Plugin API DetailsFluentd v0.14 Plugin API Details
Fluentd v0.14 Plugin API DetailsSATOSHI TAGOMORI
 
Distributed Logging Architecture in Container Era
Distributed Logging Architecture in Container EraDistributed Logging Architecture in Container Era
Distributed Logging Architecture in Container EraSATOSHI TAGOMORI
 

En vedette (12)

Modern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldModern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real World
 
How To Write Middleware In Ruby
How To Write Middleware In RubyHow To Write Middleware In Ruby
How To Write Middleware In Ruby
 
How to Make Norikra Perfect
How to Make Norikra PerfectHow to Make Norikra Perfect
How to Make Norikra Perfect
 
Fighting API Compatibility On Fluentd Using "Black Magic"
Fighting API Compatibility On Fluentd Using "Black Magic"Fighting API Compatibility On Fluentd Using "Black Magic"
Fighting API Compatibility On Fluentd Using "Black Magic"
 
Open Source Software, Distributed Systems, Database as a Cloud Service
Open Source Software, Distributed Systems, Database as a Cloud ServiceOpen Source Software, Distributed Systems, Database as a Cloud Service
Open Source Software, Distributed Systems, Database as a Cloud Service
 
20160730 fluentd meetup in matsue slide
20160730 fluentd meetup in matsue slide20160730 fluentd meetup in matsue slide
20160730 fluentd meetup in matsue slide
 
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05
AWSにおけるバッチ処理の ベストプラクティス - Developers.IO Meetup 05
 
To Have Own Data Analytics Platform, Or NOT To
To Have Own Data Analytics Platform, Or NOT ToTo Have Own Data Analytics Platform, Or NOT To
To Have Own Data Analytics Platform, Or NOT To
 
Perfect Norikra 2nd Season
Perfect Norikra 2nd SeasonPerfect Norikra 2nd Season
Perfect Norikra 2nd Season
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage Systems
 
Fluentd v0.14 Plugin API Details
Fluentd v0.14 Plugin API DetailsFluentd v0.14 Plugin API Details
Fluentd v0.14 Plugin API Details
 
Distributed Logging Architecture in Container Era
Distributed Logging Architecture in Container EraDistributed Logging Architecture in Container Era
Distributed Logging Architecture in Container Era
 

Similaire à The Patterns of Distributed Logging and Containers

Distributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container EraDistributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container EraGlenn Davis
 
Realtime Analytics on AWS
Realtime Analytics on AWSRealtime Analytics on AWS
Realtime Analytics on AWSSungmin Kim
 
Gib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk MigratorGib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk MigratorDaniel Toomey
 
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...MongoDB
 
Ai big dataconference_ml_fastdata_vitalii bondarenko
Ai big dataconference_ml_fastdata_vitalii bondarenkoAi big dataconference_ml_fastdata_vitalii bondarenko
Ai big dataconference_ml_fastdata_vitalii bondarenkoOlga Zinkevych
 
Vitalii Bondarenko "Machine Learning on Fast Data"
Vitalii Bondarenko "Machine Learning on Fast Data"Vitalii Bondarenko "Machine Learning on Fast Data"
Vitalii Bondarenko "Machine Learning on Fast Data"DataConf
 
What's new in MongoDB 3.6?
What's new in MongoDB 3.6?What's new in MongoDB 3.6?
What's new in MongoDB 3.6?MongoDB
 
Breaking the Monolith Road to Containers
Breaking the Monolith Road to ContainersBreaking the Monolith Road to Containers
Breaking the Monolith Road to ContainersAmazon Web Services
 
Building real time data-driven products
Building real time data-driven productsBuilding real time data-driven products
Building real time data-driven productsLars Albertsson
 
Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageSATOSHI TAGOMORI
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!David Hoerster
 
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch ServiceBDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch ServiceAmazon Web Services
 
How Netflix Monitors Applications in Near Real-time w Amazon Kinesis - ABD401...
How Netflix Monitors Applications in Near Real-time w Amazon Kinesis - ABD401...How Netflix Monitors Applications in Near Real-time w Amazon Kinesis - ABD401...
How Netflix Monitors Applications in Near Real-time w Amazon Kinesis - ABD401...Amazon Web Services
 
An Azure of Things, a developer’s perspective
An Azure of Things, a developer’s perspectiveAn Azure of Things, a developer’s perspective
An Azure of Things, a developer’s perspectiveBizTalk360
 
Azure Messaging Crossroads
Azure Messaging CrossroadsAzure Messaging Crossroads
Azure Messaging CrossroadsSean Feldman
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at LifestageBATbern
 
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)Emprovise
 
IT Press Tour #17 - OpenIO & Technology
IT Press Tour #17 - OpenIO & TechnologyIT Press Tour #17 - OpenIO & Technology
IT Press Tour #17 - OpenIO & TechnologyOpenIO Object Storage
 
MongoDB Partner Program Update - November 2013
MongoDB Partner Program Update - November 2013MongoDB Partner Program Update - November 2013
MongoDB Partner Program Update - November 2013MongoDB
 

Similaire à The Patterns of Distributed Logging and Containers (20)

Distributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container EraDistributed Logging Architecture in the Container Era
Distributed Logging Architecture in the Container Era
 
Realtime Analytics on AWS
Realtime Analytics on AWSRealtime Analytics on AWS
Realtime Analytics on AWS
 
Gib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk MigratorGib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk Migrator
 
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
 
Ai big dataconference_ml_fastdata_vitalii bondarenko
Ai big dataconference_ml_fastdata_vitalii bondarenkoAi big dataconference_ml_fastdata_vitalii bondarenko
Ai big dataconference_ml_fastdata_vitalii bondarenko
 
Vitalii Bondarenko "Machine Learning on Fast Data"
Vitalii Bondarenko "Machine Learning on Fast Data"Vitalii Bondarenko "Machine Learning on Fast Data"
Vitalii Bondarenko "Machine Learning on Fast Data"
 
Serverless SQL
Serverless SQLServerless SQL
Serverless SQL
 
What's new in MongoDB 3.6?
What's new in MongoDB 3.6?What's new in MongoDB 3.6?
What's new in MongoDB 3.6?
 
Breaking the Monolith Road to Containers
Breaking the Monolith Road to ContainersBreaking the Monolith Road to Containers
Breaking the Monolith Road to Containers
 
Building real time data-driven products
Building real time data-driven productsBuilding real time data-driven products
Building real time data-driven products
 
Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby Usage
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!
 
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch ServiceBDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
BDA402 Deep Dive: Log Analytics with Amazon Elasticsearch Service
 
How Netflix Monitors Applications in Near Real-time w Amazon Kinesis - ABD401...
How Netflix Monitors Applications in Near Real-time w Amazon Kinesis - ABD401...How Netflix Monitors Applications in Near Real-time w Amazon Kinesis - ABD401...
How Netflix Monitors Applications in Near Real-time w Amazon Kinesis - ABD401...
 
An Azure of Things, a developer’s perspective
An Azure of Things, a developer’s perspectiveAn Azure of Things, a developer’s perspective
An Azure of Things, a developer’s perspective
 
Azure Messaging Crossroads
Azure Messaging CrossroadsAzure Messaging Crossroads
Azure Messaging Crossroads
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at Lifestage
 
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
 
IT Press Tour #17 - OpenIO & Technology
IT Press Tour #17 - OpenIO & TechnologyIT Press Tour #17 - OpenIO & Technology
IT Press Tour #17 - OpenIO & Technology
 
MongoDB Partner Program Update - November 2013
MongoDB Partner Program Update - November 2013MongoDB Partner Program Update - November 2013
MongoDB Partner Program Update - November 2013
 

Plus de SATOSHI TAGOMORI

Ractor's speed is not light-speed
Ractor's speed is not light-speedRactor's speed is not light-speed
Ractor's speed is not light-speedSATOSHI TAGOMORI
 
Good Things and Hard Things of SaaS Development/Operations
Good Things and Hard Things of SaaS Development/OperationsGood Things and Hard Things of SaaS Development/Operations
Good Things and Hard Things of SaaS Development/OperationsSATOSHI TAGOMORI
 
Invitation to the dark side of Ruby
Invitation to the dark side of RubyInvitation to the dark side of Ruby
Invitation to the dark side of RubySATOSHI TAGOMORI
 
Hijacking Ruby Syntax in Ruby (RubyConf 2018)
Hijacking Ruby Syntax in Ruby (RubyConf 2018)Hijacking Ruby Syntax in Ruby (RubyConf 2018)
Hijacking Ruby Syntax in Ruby (RubyConf 2018)SATOSHI TAGOMORI
 
Make Your Ruby Script Confusing
Make Your Ruby Script ConfusingMake Your Ruby Script Confusing
Make Your Ruby Script ConfusingSATOSHI TAGOMORI
 
Hijacking Ruby Syntax in Ruby
Hijacking Ruby Syntax in RubyHijacking Ruby Syntax in Ruby
Hijacking Ruby Syntax in RubySATOSHI TAGOMORI
 
Lock, Concurrency and Throughput of Exclusive Operations
Lock, Concurrency and Throughput of Exclusive OperationsLock, Concurrency and Throughput of Exclusive Operations
Lock, Concurrency and Throughput of Exclusive OperationsSATOSHI TAGOMORI
 
Data Processing and Ruby in the World
Data Processing and Ruby in the WorldData Processing and Ruby in the World
Data Processing and Ruby in the WorldSATOSHI TAGOMORI
 
Planet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: BigdamPlanet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: BigdamSATOSHI TAGOMORI
 
Technologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessTechnologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessSATOSHI TAGOMORI
 
Overview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data ServiceOverview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data ServiceSATOSHI TAGOMORI
 
Hive dirty/beautiful hacks in TD
Hive dirty/beautiful hacks in TDHive dirty/beautiful hacks in TD
Hive dirty/beautiful hacks in TDSATOSHI TAGOMORI
 
Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageSATOSHI TAGOMORI
 
Tale of ISUCON and Its Bench Tools
Tale of ISUCON and Its Bench ToolsTale of ISUCON and Its Bench Tools
Tale of ISUCON and Its Bench ToolsSATOSHI TAGOMORI
 
Data-Driven Development Era and Its Technologies
Data-Driven Development Era and Its TechnologiesData-Driven Development Era and Its Technologies
Data-Driven Development Era and Its TechnologiesSATOSHI TAGOMORI
 
Engineer as a Leading Role
Engineer as a Leading RoleEngineer as a Leading Role
Engineer as a Leading RoleSATOSHI TAGOMORI
 

Plus de SATOSHI TAGOMORI (18)

Ractor's speed is not light-speed
Ractor's speed is not light-speedRactor's speed is not light-speed
Ractor's speed is not light-speed
 
Good Things and Hard Things of SaaS Development/Operations
Good Things and Hard Things of SaaS Development/OperationsGood Things and Hard Things of SaaS Development/Operations
Good Things and Hard Things of SaaS Development/Operations
 
Maccro Strikes Back
Maccro Strikes BackMaccro Strikes Back
Maccro Strikes Back
 
Invitation to the dark side of Ruby
Invitation to the dark side of RubyInvitation to the dark side of Ruby
Invitation to the dark side of Ruby
 
Hijacking Ruby Syntax in Ruby (RubyConf 2018)
Hijacking Ruby Syntax in Ruby (RubyConf 2018)Hijacking Ruby Syntax in Ruby (RubyConf 2018)
Hijacking Ruby Syntax in Ruby (RubyConf 2018)
 
Make Your Ruby Script Confusing
Make Your Ruby Script ConfusingMake Your Ruby Script Confusing
Make Your Ruby Script Confusing
 
Hijacking Ruby Syntax in Ruby
Hijacking Ruby Syntax in RubyHijacking Ruby Syntax in Ruby
Hijacking Ruby Syntax in Ruby
 
Lock, Concurrency and Throughput of Exclusive Operations
Lock, Concurrency and Throughput of Exclusive OperationsLock, Concurrency and Throughput of Exclusive Operations
Lock, Concurrency and Throughput of Exclusive Operations
 
Data Processing and Ruby in the World
Data Processing and Ruby in the WorldData Processing and Ruby in the World
Data Processing and Ruby in the World
 
Planet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: BigdamPlanet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: Bigdam
 
Technologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessTechnologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise Business
 
Fluentd 101
Fluentd 101Fluentd 101
Fluentd 101
 
Overview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data ServiceOverview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data Service
 
Hive dirty/beautiful hacks in TD
Hive dirty/beautiful hacks in TDHive dirty/beautiful hacks in TD
Hive dirty/beautiful hacks in TD
 
Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby Usage
 
Tale of ISUCON and Its Bench Tools
Tale of ISUCON and Its Bench ToolsTale of ISUCON and Its Bench Tools
Tale of ISUCON and Its Bench Tools
 
Data-Driven Development Era and Its Technologies
Data-Driven Development Era and Its TechnologiesData-Driven Development Era and Its Technologies
Data-Driven Development Era and Its Technologies
 
Engineer as a Leading Role
Engineer as a Leading RoleEngineer as a Leading Role
Engineer as a Leading Role
 

Dernier

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 

Dernier (20)

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 

The Patterns of Distributed Logging and Containers

  • 1. THE PATTERNS OF DISTRIBUTED LOGGING AND CONTAINERS CloudNativeCon Europe 2017 March 30, 2017 Satoshi Tagomori (@tagomoris) Treasure Data, Inc.
  • 3.
  • 4.
  • 5. 1. Microservices, Containers and Logging 2. Scaling Logging Platform 3. Patterns: Source/Destination -side Aggregation 4. Patterns: Scaling Up/Out Destination 5. Practices
  • 7. Logging in Industries • Service Logs • Web access logs • Ad logs • Commercial transaction logs for analytics (EC, Game, ...) • System Logs • Syslog and other OS logs • Audit logs • Performance metrics Logs for Business Growth Logs for Service Stability
  • 8. Microservices and Logging Users LAMP/Rails/MEAN/... Apps Logs Users Search Logs Recommendation Shopping cart Reviews Ads ... Monolithic service Microservices
  • 9. Microservices and Containers • Microservices • Isolated dependencies • Agile deployment • Containers • Isolated environments & resources • Simple pull&restart deployment • Less overhead, high density
  • 10. Logging Challenges with Microservices/Containers • Containerization changes everything: • No permanent storages • No fixed physical/network addresses • No fixed mapping between servers and roles
  • 11. Logging Challenges with Microservices/Containers • Containerization changes everything: • No permanent storages • No fixed physical/network addresses • No fixed mapping between servers and roles Transfer Logs to Anywhere ASAP
  • 12. Logging Challenges with Microservices/Containers • Containerization changes everything: • No permanent storages • No fixed physical/network addresses • No fixed mapping between servers and roles Push Logs From Containers
  • 13. Logging Challenges with Microservices/Containers • Containerization changes everything: • No permanent storages • No fixed physical/network addresses • No fixed mapping between servers and roles Label Logs With Service Names/Tags
  • 14. Logging Challenges with Microservices/Containers • Containerization changes everything: • No permanent storages • No fixed physical/network addresses • No fixed mapping between servers and roles Label Logs With Service Names/Tags Parse Logs & Label Values At Source Structured Logs
  • 15. Structured Logs: tag, time, key-value pairs Original log: the customer put an item to cart: item_id=101, items=10, client=web Structured log: ec_service.shopping_cart 2017-03-30 16:35:37 +0100 { "container_id": "bfdd5b9....", "container_name": "/infallible_mayer", "source": "stdout", "event": "put an item to cart", "item_id": 101, "items": 10, "client": "web" } tag timestamp record
  • 16. How to Ship Logs from Docker Containers nginx, mysql, .... log files agents read files, parse plain texts apps, middleware json log files agents read files, parse json lines applications agents just receive transferred logs apps, middleware agents just receive transferred logs Using mounted volume Using container json logs Sending logs to agents directly Using logging drivers + disk I/O penalty + mount points + disk I/O penalty + logger code + agent config 😃
  • 18. Core Architecture: Distributed Logging Source (Container + Agent) Transferring/Aggregation layer Destination (Storage, Database, Service)
  • 19. Distributed Logging Workflow • Retrieve raw logs: file system / network • Parse log content Collector Aggregator Destination • Get data from multiple sources • Split/merge incoming data into streams • Retrieve structured logs from Aggregator • Store formatted logs
  • 20. Scaling Logging • Network Traffic • Split heavy log traffic into traffics to nodes • CPU Load • Distribute processing to nodes about parsing/formatting logs • High Availability • Switch traffic from a node to another for failures • Agility • Reconfigure whole logging layer to modify destinations
  • 23. Now I'm Talking About: Source Transferring Aggregation Destination Source Side Destination Side
  • 24. Source-side Aggregation Patterns Without Source-side Aggregation With Source-side Aggregation Collector Destination-side Aggregate Container
  • 25. Aggregation Pattern without Source-side Aggregation • Pros: • Simple configuration • Cons: • Fixed aggregator (destination endpoint) address
 configured in containers • Many network connections • High load in aggregator / destination
  • 26. Aggregation Pattern with Source-side Aggregation • Pros: • Less connections • Lower load in aggregator / destination • Less configurations in containers • More agility
 (aggregate containers can be reconfigured) • Cons: • Need more resources (+1 container per host) Aggregate Container
  • 27. Destination-side Aggregation Patterns Without Destination-side Aggregation With Destination-side Aggregation Aggregator Node Source-side Destination
  • 28. Aggregation Pattern without Destination-side Aggregation • Pros: • Less nodes • Simpler configuration • Cons: • Destination changes affects all source nodes • Worse performance:
 many small write requests on destination(storage)
  • 29. • Pros: • Destination changes does NOT affect source nodes • Better performance:
 destination aggregator can merge write operations • Cons: • More nodes • More complex configuration Aggregation Pattern with Destination-side Aggregation Aggregator Node
  • 31. HOW TO SCALE HERE Source Transferring Aggregation Destination Now I'm Talking About:
  • 32. Scaling Destination Patterns Scaling Up Aggregator/Destination Endpoints Scaling Out Aggregator/Destination Endpoints Destination-side Aggregator or Destination Load balancer or Huge queue Backend nodes Collector nodes Using HTTP Load Balancer or Huge Queues Using Round Robin Clients
  • 33. • Pros: • Simple configuration:
 specifying load balancer only
 in collector nodes • Cons: • Upper limits about scaling up
 on Load balancer (or queue) Scaling Up Destination Backend nodes Load balancer or Huge queue
  • 34. Scaling Out Destination • Pros: • Unlimited scaling by adding nodes • Cons: • Complex configuration in collector nodes • Client feature required for round-robin • Unavailable for traffic over Internet
  • 35. Destination-side Aggregation and Destination Scaling Destination Side Aggregation Scaling Up Destination Endpoints YESNO Scaling Out Destination Endpoints Early Stage Systems Collect Logs over Internet or Using Queues Collect Logs in Data Center All Collector Nodes Must Know All Destination Nodes ↓ Uncontrollable
  • 37. Practices: Docker + Fluentd • Docker Fluentd Logging Driver • Docker containers can send these logs to Fluentd directly,
 with less overhead • Fluentd's Pluggable Architecture • Various destination systems (storage/database/service) are available
 by changing configuration • Small Memory Footprint • Source aggregation requires +1 container per hosts:
 less additional resource usage is fine!
  • 38. Practice 1: Source-side Aggregation + Scaling Up • Kubernetes: Fluentd + Elasticsearch • a.k.a EFK stack (inspired by ELK stack) • Elasticsearch - Fluentd - Kibana https://kubernetes.io/docs/tasks/debug-application-cluster/logging-elasticsearch-kibana/ apps, middleware json log files
  • 39. Practice 2: Source-side Aggregation + Scaling Up • Containerized Applications • w/ Google Stackdriver for Monitoring • w/ Treasure Data for Analytics Google Stackdriver Logging apps, middleware
  • 40. Practice 3: Source/Destination-side Aggregation + Scaling Out • Containerized Application • w/ Log processing on Hadoop • writing files on HDFS via WebHDFS • Hadoop HDFS prefers large files on HDFS: • Destination-side aggregation works well apps, middleware
  • 41. Practice 4: Source/Destination-side Aggregation + Scaling Out • Containerized Application • w/ Log processing on Google BigQuery • putting logs via HTTPS • BigQuery has quota about write requests: • Destination-side aggregation works well apps, middleware
  • 42. Best practices? • Source aggregation: do it • it makes app containers free from logging problems (buffering, HA, ...)
 • Destination aggregation: it depends • no need for cloud logging services/storages • may need for self-hosted distributed filesystems/databases • may need for cloud services which charges per requests
 • Destination scaling: it depends on destinations
  • 43. Make Logging Scalable, Service Stable & Business Growing. Happy Logging! @tagomoris