Top Banner
Cloud Native Logging OpenShift Commons Briefing, April 20th 2017 Eduardo Silva @edsiper [email protected]
59

Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Apr 16, 2018

Download

Documents

dinhthuan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Cloud Native Logging

OpenShift Commons Briefing, April 20th 2017Eduardo Silva @[email protected]

Page 2: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

“Logging... Why?”

Page 3: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Logging: Why ?

Analyze Applications Behavior

Page 4: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Logging: Why ?

Analyze Applications Behavior

Page 5: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Logging: Why ?

Page 6: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Logging: Why ?

Page 7: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Logging Pipeline

Page 8: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Logging Pipeline

Page 9: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Logging Pipeline

Page 10: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

It’s a mess

Page 11: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

“Logging... Why?”(Micro Services)

Page 12: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

OK, Where’s My Log in Container Era?

Page 13: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Logging hasNever Been Easier

Page 14: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes
Page 15: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

About Fluentd

● Invented by

● Now hosted at

Page 16: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Logging Pipeline

Page 17: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

How Fluentd Simplifies Logging Pipeline

Page 18: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

How Fluentd Simplifies Unified Logging Layer

Page 19: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

About Fluentd

● More than 600 plugins available

● Pluggable Architecture

● Built-in Reliability

● Full integration with Docker and Kubernetes

● Written in Ruby + C

Page 20: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd Plugin Ecosystem

Page 21: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd Modular Architecture

Page 22: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd Structured Logging

Page 23: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd at Scale

Page 24: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Kubernetes & Fluentd

Page 25: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd Deployment: DaemonSet

Page 26: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Kubernetes: Fluentd Log Collection

Page 27: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd: Enrich Logs with Kubernetes Metadata

Page 28: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Storing the Logs

Page 29: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Example: Logs from the Container

Page 30: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Logs Stored by Fluentd

Page 31: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd: Error Handling

Page 32: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd: Retrying

Page 33: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd: Kubernetes DaemonSet

Page 34: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd Real WorldUse Cases

Page 35: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes
Page 36: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Extending the Fluentd Ecosystem

Page 37: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluentd Modes

● Log Forwarder

● Log Aggregator

Page 38: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Log Aggregator = (Forwarder + Buffering Capabilities)

Page 39: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Edge Nodes / Forward to Aggregators

App

Node 1

DB

App DB

Page 40: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Edge Nodes & Costs

Page 41: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Edge Nodes & Costs

● Fluentd requires ~40MB as minimum

● Deploying a few hundred could be expensive

● Can we make Forward cheaper ?

Page 42: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Forwarder & Aggregator

Log Forwarder Log Aggregator

Page 43: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes
Page 44: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

About Fluent Bit

● Written in C

● Pluggable Architecture

● Built-in Reliability

● Event Driven - Async I/O

Page 45: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Why Fluent Bit as a Forwarder

● Features

○ Input, Filter and Output Plugins

○ Built-in parsing support

○ Minimum memory required 450KB

Page 46: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Edge Nodes / Forward to Aggregators

Page 47: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Cheap Forwarding

Page 48: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Cloud Native Features

● Backpressure

Page 49: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Cloud Native Features

● Backpressure

Page 50: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Cloud Native Features

● Backpressure

Page 51: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Cloud Native Features

● Backpressure

Page 52: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Cloud Native Features

● Backpressure Solved

Page 53: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Cloud Native Features

● Backpressure Handling

● Security

● Kubernetes Metadata Filter

● Timestamps w/Nanoseconds (upcoming v0.12)

Page 54: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluent Bit, what else ?

Networking and Co-routines

Easier implementation of output plugins that interact with networking operations like socket(), connect(), read(), write(), etc.

Fluent Bit provides non-blocking networking API that uses the event-loop with co-routines to implement:

● Network I/O● TLS/SSL usage● HTTP Client

Page 55: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluent Bit Kubernetes DaemonSet

Github Repository

● https://github.com/fluent/fluent-bit-kubernetes-daemonset

Docker Hub Image

● fluent/fluent-bit-kubernetes-daemonset

Page 56: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Fluent Bit

Project information

● Web site fluentbit.io ● Github fluent/fluent-bit

Contact / Community

● Slack http://slack.fluentd.org

Page 57: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes
Page 58: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes
Page 59: Cloud Native Logging - OpenShift Blog · About Fluentd More than 600 plugins available Pluggable Architecture Built-in Reliability Full integration with Docker and Kubernetes

Questions?

Anurag Gupta - Product Manager Fluentd Enterprise - [email protected] Eduardo Silvia - Open Source Engineer - [email protected]

Interested in Fluentd Enterprise?

https://www.treasuredata.com/fluentd-enterprise/

Resources for Fluentd Open Source

http://www.fluentd.org

Community

http://slack.fluentd.org