Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Alternative Fluentd implementation in Go
Search
Shinji Tanaka
December 13, 2013
Technology
6.4k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Alternative Fluentd implementation in Go
http://github.com/moriyoshi/ik
Shinji Tanaka
December 13, 2013
More Decks by Shinji Tanaka
See All by Shinji Tanaka
Mackerel loves Machine Learnings
stanaka
0
3.2k
How to Contribute Go
stanaka
4
19k
Introduction to Mackerel
stanaka
0
1.2k
Upcoming features in 2016, Mackerel
stanaka
0
3.6k
Mackerel's first year and onward
stanaka
0
3.2k
Mackerel's first year and onward (in English)
stanaka
0
460
Blue-Green Deployment with ECS and monitoring
stanaka
0
660
Mackerel Meetup #4 (in Eng)
stanaka
0
640
Mackerel Meetup #4
stanaka
0
3.5k
Other Decks in Technology
See All in Technology
発表と総括 / Presentations and Summary
ks91
PRO
0
170
AI Coding Agent時代のcdk-nagガードレール 〜組織ルールを強制CIで守り抜く設計の挑戦〜
mhrtech
3
480
Type-safe IaC for Dart
coborinai
0
180
変更し続けられるシステムをどう保つか — AI時代のSSoTという設計原則
kawauso
1
990
シンガポールで登壇してきます
yama3133
0
340
OPENLOGI Company Profile for engineer
hr01
1
74k
第67回コンピュータビジョン勉強会CVPR2026読会前編
tsukamotokenji
0
160
そのドキュメント、自動化しませんか?
yuksew
1
390
Making sense of Google’s agentic dev tools
glaforge
1
300
SRENEXT_2026_Chairs__Talks_in_Tamachi.sre.pdf
srenext
1
120
キャリアLT会#3
beli68
1
220
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
280
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
57k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
320
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
390
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
440
Automating Front-end Workflow
addyosmani
1370
210k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
KATA
mclloyd
PRO
35
15k
Skip the Path - Find Your Career Trail
mkilby
1
170
Discover your Explorer Soul
emna__ayadi
2
1.2k
Transcript
A l t e r n a t i v
e F l u e n t d i m p l e m e n t a t i o n i n G o i d : s t a n a k a / @ s t a n a k a D e c e m b e r 1 2 , 2 0 1 3
id:stanaka / @stanaka • Shinji TANAKA • CTO at Hatena
Co., Ltd. • LTSV .. Labeled Tab-Separated Values • immutable infrastructure / Docker
fluentd in Hatena
Go Programming Language
Go Programming Language • 2009 released • Rob Pike, Ken
Thompson, Robert Griesemer • 2012 Mar … Go 1.0 • 2013 Jun … Go 1.1 • 2013 Dec … Go 1.2
about Go #1 • Compiler language • Static Typed with
type inference • Garbage Collection • Concurrency model (goroutine, channel)
about Go #2 • High performance • Small footprint •
Embedded support function like build, format, test, documentation • Various standard libraries (over 147)
Performance of Go • REST API server benchmark • Faster
than Perl/Ruby • blog.stanaka.org/entry/2013/10/17/093259
Major products by Go • Docker • Packer • Devops
guys like Go
Go v1.2 • released on Dec 2013 • Pre-emption in
the scheduler • Performance improvement • Library updates
Fluentd Go implementation • “Proof of Concept” level • developed
by @moriyoshit • and @stanaka • https://github.com/moriyoshi/ik
ik
Current status • Suit for leaf nodes • Support only
less plugins • in_forward, out_forward, out_stdout • only one executable file
Configuration • support v10 conf file. • v11?? <source>
type forward port 24224 </source> ! <match **> type stdout </match>
Plugin system • Need to build whole plugins • Need
register codes for plugins engine := ik.NewEngine(logger, scoreKeeper) engine.RegisterInputFactory(plugins.GetForwardInputFactory()) engine.RegisterOutputFactory(plugins.GetStdoutOutputFactory()) engine.RegisterOutputFactory(plugins.GetForwardOutputFactory())
in_forward • treat incoming connection with goroutine func (in *ForwardInput)
Start() error { in.running = true // XXX: RACE go func () { for in.running { conn, err := in.listener.Accept() if err != nil { in.logger.Fatal(err.Error()) continue } go newForwardClient(in, in.logger, conn, in.codec).handle() } }() return nil }
out_forward • Periodically flush with goroutine and channel func (output
*ForwardOutput) run_flush(interval int) { ticker := time.NewTicker(time.Duration(interval) * time.Second) go func() { for { select { case <-‐ ticker.C: output.flush() } } }() }
Installation • Quite easy • wget http://repository/bin/ik
footprint comparison (trivial) • RSS size just after execution •
with in_forward, out_forward plugin RSS ik (Go) 3224 fluentd (ruby) 19940 *1 *1: size of the bigger process
Performance • “ik” is UNDER development • not tuned for
performance yet • has primitive buffering (bytes/buffer)
Conclusion • “ik” alternative implementation of fluentd by Go •
small footprint / easy installation • high performance? (future works) • Code: https://github.com/moriyoshi/ik