Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Norikraを非リアルタイムなデータ集計に使う試み
Search
yunazuno
July 09, 2014
Technology
6.7k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Norikraを非リアルタイムなデータ集計に使う試み
yunazuno
July 09, 2014
More Decks by yunazuno
See All by yunazuno
eXpress Data Path (XDP) の概要とLINEにおける利活用 / Brief summary of XDP and use-case at LINE
yunazuno
10
3.4k
自作ロードバランサ開発 / JANOG40 SP6LB
yunazuno
0
190
Other Decks in Technology
See All in Technology
Claude Code本って、 読む必要あるの?
oikon48
2
370
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
130
Screen Lens - 今見てる画面を翻訳する
komagata
0
220
多層防御と最⼩権限で実現する、安全なAIエージェント設計パターン
lycorptech_jp
PRO
1
250
AI時代に顧客へ最速で価値を 届けるための試行錯誤 〜「AI × マネジメント」領域におけるmentoのケース〜
posterkeisuke
0
110
module Synths; end
asonas
1
130
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
1
490
振り返りこそエンジニアの本領
negima
0
360
Deploying a Full-Stack Bun-Native Framework on Cloudflare Workers
7nohe
0
130
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/6 - 2026/8
oracle4engineer
PRO
0
140
AIに丸投げしないトイル削減 / Eliminating Toil Without Leaving It All to AI
kohbis
4
1.1k
Driving AI Adoption Using In-House GPUs to Serve Qwen
po3rin
2
470
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
Between Models and Reality
mayunak
4
450
Why Our Code Smells
bkeepers
PRO
340
58k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
230
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
45k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
420
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Un-Boring Meetings
codingconduct
0
410
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
400
Transcript
Norikraを非リアルタイムな データ集計に使う試み Norikra meetup #1 Yohei KANEMARU @yunazuno
誰? • 金丸 洋平 (かねまる ようへい) • @yunazuno • ネットワークまわり担当
at LINE Corp. – BGP, CDN, DNS, ロードバランサ周辺 – たまにツール書いたり • 主にPython 2
非リアルタイム ログ集計 + 3
ユースケース: トラフィック集計 4 R1 R2 R3 R4 R5 R6 NW
A NW B • NW A → Bのトラフィックが, R3-5のどれにどのくらい流れ ているか知りたい • ログはR1,R2で個別にCSVで エクスポート可能
「CSVでエクスポート」 • 割とスキーマレス • 外部サービスやアプライアンスが絡むと, 唯一のログ取得手段な場合も – API欲しいけども... • サービスや機器を跨いだ集計は自分で
頑張る 5
6
他の手段を考えてみた 1. スクリプトで全部頑張る? – CSVパース + ひたすら足し算 – 書く手間はそんなに無さそう 2.
DBに入れてから集計? – CSVパース + insert + select – クエリ書くのつらい 7
他の手段を考えてみた 1. スクリプトで全部頑張る? – CSVパース + ひたすら足し算 – 書く手間はそんなに無さそう 2.
DBに入れてから集計? – CSVパース + insert + select – クエリ書くのつらい 3. Norikraで集計! 8
9 From http://norikra.github.io/query.html
win:time_batch 10 “Publisher” Norikra Internal time Wall-clock time Norikraがeventを受け取った時刻を基準に処理 send
send send send send [{name: …, value: …, …}]
win:ext_time_batch 11 “Publisher” Norikra Internal time Wall-clock time eventに含まれるタイムスタンプを基準に処理 send
send send send send Buffer (Delay) [{timestamp: 1396278060000, name: …, value: …, …}]
全体像 12 csv2json.py … traffic_stats.py norikra- client-python 1. CSVをタイムスタンプ順に JSONに詰める
CSVファイルはタイムスタンプで ソートされている ASSUMPTION 2. クエリ登録 3. send 4. fetch 5. クエリとtargetを削除 6. CSVに出力 Query 1: aggregate Query 2: max/avg
Query 1: 複数ファイルの集約 13 input = [{timestamp:1400511600, src_nw: “NW_A”, dst_nw:
“NW_B”, traffic_out: 10.0}] timestamp (in msec) time window time reference 後段のクエリの targetを指定
Query 2: MAX/AVG集計 14 output = [{timestamp:1400511000, traffic_out_daily_avg: 42.34, traffic_out_daily_max:
130.25}]
Q. 「それNorikraじゃなくても いいよね?」 15
A. Yes. 16
あえてNorikraな理由 • 意外と気軽に使える – 入力フォーマットや対象メトリックが変わる たびにスクリプトやDBに手を加えるのは割と 辛い – クエリ編集だけで大抵事足りる >
Norikra – hoge2json部分だけ用意すればよい • xml2json, rrd2json, … 17
まとめ • Excelで開けない辛いデータも割と気軽に 扱えるようになる – 気軽さ大事 • 最近fluent-plugin-netflowとかいう素敵 なものが登場した –
ネットワーク+リアルタイムな話は#2で? 18