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
200
Other Decks in Technology
See All in Technology
エージェントはローカル、検証はMicroVM — Lambda MicroVMsでつくるServerless CI
fujioka6789
3
850
Databricksメトリクスビューはじめてのもくもく会
taka_aki
0
110
IR Today: Theory, Practice, and Agents
dtunkelang
0
180
Antigravity SDK for the Java Developer
glaforge
0
220
手を動かして実感する、Kiro が変える開発体験
inariku
0
400
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
7
800
AIに書かせて、プラットフォームで縛る ― EKSプラットフォームで実践した責任境界と権限設計
elmodev09
1
920
【ゲームメーカーズスクランブル2026】『Shadowverse: Worlds Beyond』UIとアニメーションで実現する最高のユーザー体験を叶えるプロトタイピング
cygames
PRO
1
670
Harness Engineering on Rails
joelq
0
700
AIは推し活である。
kurazuuuuuu
2
1k
10年欲しかった音楽管理アプリを、AIと一緒に作りはじめた
judau
1
160
AIに会社の文脈を理解させる技術~上流工程・非エンジニアにも広げるハーネスエンジニアリング実践~
ochtum
0
160
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
How STYLIGHT went responsive
nonsquared
100
6.3k
The Invisible Side of Design
smashingmag
301
52k
What's in a price? How to price your products and services
michaelherold
247
13k
Mobile First: as difficult as doing things right
swwweet
225
10k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
580
Marketing to machines
jonoalderson
1
5.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Speed Design
sergeychernyshev
33
2.1k
The Language of Interfaces
destraynor
162
27k
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