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
3
6.3k
Alternative Fluentd implementation in Go
http://github.com/moriyoshi/ik
Shinji Tanaka
December 13, 2013
Tweet
Share
More Decks by Shinji Tanaka
See All by Shinji Tanaka
Mackerel loves Machine Learnings
stanaka
0
3.1k
How to Contribute Go
stanaka
4
18k
Introduction to Mackerel
stanaka
0
1.1k
Upcoming features in 2016, Mackerel
stanaka
0
3.5k
Mackerel's first year and onward
stanaka
0
3.1k
Mackerel's first year and onward (in English)
stanaka
0
420
Blue-Green Deployment with ECS and monitoring
stanaka
0
630
Mackerel Meetup #4 (in Eng)
stanaka
0
580
Mackerel Meetup #4
stanaka
0
3.4k
Other Decks in Technology
See All in Technology
「駆動」って言葉、なんかカッコイイ_Mitz
comucal
PRO
0
130
AIエージェントを5分で一気におさらい!AIエージェント「構築」元年に備えよう
yakumo
1
130
「リリースファースト」の実感を届けるには 〜停滞するチームに変化を起こすアプローチ〜 #RSGT2026
kintotechdev
0
400
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
290
AWS re:Inventre:cap ~AmazonNova 2 Omniのワークショップを体験してきた~
nrinetcom
PRO
0
120
Cloud WAN MCP Serverから考える新しいネットワーク運用 / 20251228 Masaki Okuda
shift_evolve
PRO
0
130
2025年の医用画像AI/AI×medical_imaging_in_2025_generated_by_AI
tdys13
0
280
小さく、早く、可能性を多産する。生成AIプロジェクト / prAIrie-dog
visional_engineering_and_design
0
300
松尾研LLM講座2025 応用編Day3「軽量化」 講義資料
aratako
15
4.8k
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
21k
AI with TiDD
shiraji
1
330
モノタロウ x クリエーションラインで実現する チームトポロジーにおける プラットフォームチーム・ ストリームアラインドチームの 効果的なコラボレーション
creationline
0
210
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
Odyssey Design
rkendrick25
PRO
0
450
The Language of Interfaces
destraynor
162
26k
Code Reviewing Like a Champion
maltzj
527
40k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
40
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
70
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
120
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
160
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
97
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
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