@nicolas_frankel
FAST LOG MANAGEMENT
For your infrastructure
@nicolas_frankel
ME, MYSELF AND I
● Developer advocate
○ Previously
developer/architect
consultant
● DevOps-minded
@nicolas_frankel
European alternative to the “big” cloud-computing
players
● Privacy-minded
● Great support
@nicolas_frankel
LOGGER.debug(
"Cart price is now {}", cart.getPrice())
The root of all evil
@nicolas_frankel
if (LOGGER.isDebugEnabled) {
LOGGER.debug(
"Cart price is now {}", cart.getPrice())
}
An improvement, but for whom?
@nicolas_frankel
if (LOGGER.isDebugEnabled) {
LOGGER.warn(
"Cart price is now {}", cart.getPrice())
}
Ooops?!
@nicolas_frankel
LOGGER.debug(formatter ->
formatter.format(
"Cart price is now {}", cart.getPrice())
)
Lazy computation for the win!
@nicolas_frankel
● SSD vs. HDD vs. NFS
● It takes time to actually
write to a file
We are bound to the physical world...
@nicolas_frankel
Writing process
1. Open the stream
2. Write bytes
3. Close the stream
@nicolas_frankel
Synchronous vs. asynchronous logging
● By default, logging is
blocking
● Most frameworks allow
asynchronous logging
@nicolas_frankel
<configuration>
<appender name="FILE" class="c.q.l.core.FileAppender">
<file>myapp.log</file>
<encoder>
<pattern>%logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="ASYNC" class="c.q.l.classic.AsyncAppender">
<appender-ref ref="FILE" />
</appender>
<root level="DEBUG">
<appender-ref ref="ASYNC" />
</root>
</configuration>
@nicolas_frankel
● Queue size
● Discarding threshold
● Never blocks:
○ Drop messages vs block
Example: Logback configuration
@nicolas_frankel
Associated meta-data
● Timestamp
● Log level
● Thread name
● Class name
● Method name
● Line number in the file
● etc.
@nicolas_frankel
Some metadata is expensive to get
● e.g. line number
● Better not compute it
○ Then, writing it explicitly
might be wrong
@nicolas_frankel
Logs aggregation
● Logs by themselves are
useless
● Centralized Logging Pattern
○ Elasticsearch
○ Splunk
○ Graylog
@nicolas_frankel
Mandatory additional metadata
● File
● Host/IP
● Cloud zone
● Environment
○ e.g. “DEV” vs “PROD”
@nicolas_frankel
Searching in logs
● Logs are not the end!
● Searches are:
○ “Find me all the logs that
happened yesterday on
JVMs in PROD”
@nicolas_frankel
Schema
On read vs. on write
@nicolas_frankel
Example architecture: the Elastic Stack
● Filebeat
○ Read log files
● Logstash
○ Parsing of log messages
@nicolas_frankel
@nicolas_frankel
2018-12-17 13:56:54.906 INFO
1 --- [ restartedMain]
c.e.configmgmt.demo.DemoAppli
cation : Started
DemoApplication in 3.833
seconds (JVM running for
4.303)
@nicolas_frankel
{
"date": [[ "18-12-17" ]],
"MONTHDAY": [[ "18" ]],
"MONTHNUM": [[ "12" ]],
"YEAR": [[ "17" ]],
"time": [[ "13:56:54.906" ]],
"HOUR": [[ "13" ]],
"MINUTE": [[ "56" ]],
"SECOND": [[ "54.906" ]],
"level": [[ "INFO" ]],
"threadName": [[ "restartedMain" ]],
"class": [[ "c.e.configmgmt.demo.DemoApplication" ]],
"message":
[[ "Started DemoApplication in 3.833 seconds (JVM running for
4.303)" ]]
}
@nicolas_frankel
We don’t actually need
Logstash if we produce JSON
directly!
Why?!
@nicolas_frankel
{
"date": "18-12-17",
"time": "13:56:54.906",
"level": "INFO",
"thread": "restartedMain",
"class":
"c.e.configmgmt.demo.DemoApplication",
"message": "Started DemoApplication in
3.833 seconds (JVM running for 4.303)"
}
@nicolas_frankel
@nicolas_frankel
● Events vs. log files
● Configuration hot reload
Food for thoughts
@nicolas_frankel
● syslog-ng
● Kafka
Logging @ Exoscale
@nicolas_frankel
@nicolas_frankel
Summary
1. Pass computations instead of results to log statements
2. Consider the physical file system to log to
3. Go asynchronous if speed counts more than reliability
4. Don’t use expensive meta-data
• Consider hot reloading configuration just in case
5. Schema on write is slower, but the alternative is worse
6. Send JSON directly
@nicolas_frankel
Takeaway
It’s everyone’s responsibility
to have fast logs:
● Developers
● Ops
● Architects
@nicolas_frankel
Takeaway #2
It’s a matter of trade-offs:
● Speed
● Reliability
● Custom context
@nicolas_frankel
THANKS!
● https://blog.frankel.ch/
● https://exoscale.com/syslog/
● @nicolas_frankel

More Related Content

PDF
Parallel computing with GPars
PDF
Introduction to InfluxDB and TICK Stack
PDF
nebulaconf
PDF
Rook: Storage for Containers in Containers – data://disrupted® 2020
PDF
Developing Ansible Dynamic Inventory Script - Nov 2017
PDF
Node in Real Time - The Beginning
PDF
Cassandra 2.1 boot camp, exercise
PDF
Cassandra 2.1 boot camp, Compaction
Parallel computing with GPars
Introduction to InfluxDB and TICK Stack
nebulaconf
Rook: Storage for Containers in Containers – data://disrupted® 2020
Developing Ansible Dynamic Inventory Script - Nov 2017
Node in Real Time - The Beginning
Cassandra 2.1 boot camp, exercise
Cassandra 2.1 boot camp, Compaction

What's hot (20)

PDF
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
PPTX
Leveraging AWS
PDF
Some Tricks in Using Terminal - KienDT
PDF
Distributed scheduler hell (MicroXChg 2017 Berlin)
PDF
How to Measure Latency
PDF
OpenNebulaConf2017EU: FairShare Scheduling by Valentina Zaccolo, INDIGO
PDF
Scaling metrics
PDF
From Zero to Hero @ PyGrunn 2014
PDF
Time Series Database and Tick Stack
PDF
Beautiful Monitoring With Grafana and InfluxDB
PDF
Logs/Metrics Gathering With OpenShift EFK Stack
PDF
Object Compaction in Cloud for High Yield
PDF
Google Dev Summit Extended Seoul - TensorFlow: Tensorboard & Keras
PDF
Container Security via Monitoring and Orchestration - Container Security Summit
PDF
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
PDF
Wikimedia Content API: A Cassandra Use-case
PDF
Wikimedia Content API: A Cassandra Use-case
PDF
Getting started with influx Db and Grafana Installation Guide
PPTX
ulimit
PDF
Distributed Timeseries Database In Go (gophercon India 17)
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Leveraging AWS
Some Tricks in Using Terminal - KienDT
Distributed scheduler hell (MicroXChg 2017 Berlin)
How to Measure Latency
OpenNebulaConf2017EU: FairShare Scheduling by Valentina Zaccolo, INDIGO
Scaling metrics
From Zero to Hero @ PyGrunn 2014
Time Series Database and Tick Stack
Beautiful Monitoring With Grafana and InfluxDB
Logs/Metrics Gathering With OpenShift EFK Stack
Object Compaction in Cloud for High Yield
Google Dev Summit Extended Seoul - TensorFlow: Tensorboard & Keras
Container Security via Monitoring and Orchestration - Container Security Summit
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
Wikimedia Content API: A Cassandra Use-case
Wikimedia Content API: A Cassandra Use-case
Getting started with influx Db and Grafana Installation Guide
ulimit
Distributed Timeseries Database In Go (gophercon India 17)
Ad

Similar to OSDC 2019 | Fast log management for your infrastructure by Nicolas Frankel (20)

PDF
OSMC 2019 | Fast logs Ingestion by Nicolas Fraenkel
PPTX
OSMC - Fast logs management
PDF
Docker Logging and analysing with Elastic Stack
PDF
Docker Logging and analysing with Elastic Stack - Jakub Hajek
PDF
Logging and ranting / Vytis Valentinavičius (Lamoda)
PDF
Elk stack @inbot
PDF
Centralized logging system using mongoDB
PPTX
Log management system for Microservices
PDF
Logging Application Behavior to MongoDB
PDF
Logging logs with Logstash - Devops MK 10-02-2016
PDF
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
PDF
How to ditch the debugger and use logging instead - devwinter 2015
PDF
Log Management: AtlSecCon2015
KEY
London devops logging
PPTX
Centralized log-management-with-elastic-stack
PPTX
How fluentd fits into the modern software landscape
PDF
Security Events Logging at Bell with the Elastic Stack
PDF
VMworld 2013: Deep Dive into vSphere Log Management with vCenter Log Insight
PPT
ELK stack at weibo.com
KEY
Message:Passing - lpw 2012
OSMC 2019 | Fast logs Ingestion by Nicolas Fraenkel
OSMC - Fast logs management
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Logging and ranting / Vytis Valentinavičius (Lamoda)
Elk stack @inbot
Centralized logging system using mongoDB
Log management system for Microservices
Logging Application Behavior to MongoDB
Logging logs with Logstash - Devops MK 10-02-2016
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
How to ditch the debugger and use logging instead - devwinter 2015
Log Management: AtlSecCon2015
London devops logging
Centralized log-management-with-elastic-stack
How fluentd fits into the modern software landscape
Security Events Logging at Bell with the Elastic Stack
VMworld 2013: Deep Dive into vSphere Log Management with vCenter Log Insight
ELK stack at weibo.com
Message:Passing - lpw 2012
Ad

Recently uploaded (20)

PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PDF
E-Commerce Website Development Companyin india
PPTX
Airline CRS | Airline CRS Systems | CRS System
PPTX
"Secure File Sharing Solutions on AWS".pptx
PPTX
Download Adobe Photoshop Crack 2025 Free
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PPTX
Cybersecurity-and-Fraud-Protecting-Your-Digital-Life.pptx
PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
PPTX
GSA Content Generator Crack (2025 Latest)
PPTX
Tech Workshop Escape Room Tech Workshop
DOC
UTEP毕业证学历认证,宾夕法尼亚克拉里恩大学毕业证未毕业
PPTX
Trending Python Topics for Data Visualization in 2025
PPTX
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
PDF
MCP Security Tutorial - Beginner to Advanced
PDF
CCleaner 6.39.11548 Crack 2025 License Key
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
E-Commerce Website Development Companyin india
Airline CRS | Airline CRS Systems | CRS System
"Secure File Sharing Solutions on AWS".pptx
Download Adobe Photoshop Crack 2025 Free
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
Wondershare Recoverit Full Crack New Version (Latest 2025)
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
Cybersecurity-and-Fraud-Protecting-Your-Digital-Life.pptx
How Tridens DevSecOps Ensures Compliance, Security, and Agility
GSA Content Generator Crack (2025 Latest)
Tech Workshop Escape Room Tech Workshop
UTEP毕业证学历认证,宾夕法尼亚克拉里恩大学毕业证未毕业
Trending Python Topics for Data Visualization in 2025
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
MCP Security Tutorial - Beginner to Advanced
CCleaner 6.39.11548 Crack 2025 License Key

OSDC 2019 | Fast log management for your infrastructure by Nicolas Frankel