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
KubeCon2019_NA_Recap__NATS_.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yosshi_
December 10, 2019
Technology
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
KubeCon2019_NA_Recap__NATS_.pdf
yosshi_
December 10, 2019
More Decks by yosshi_
See All by yosshi_
From Vanilla Kubernetes to a Batteries-Included Platform: Developer Experience at 1,300+ Clusters
yosshi_
0
730
From 5 to 1,300+ Clusters: Declarative Scaling for Private Kubernetes
yosshi_
1
93
Scaling In Kubernetes Safely on On-Prem KaaS Across 1,300+ Clusters and 40,000+ Nodes
yosshi_
1
160
Getting Started with Kubernetes Observability
yosshi_
8
2.8k
PromQL_Compatibility_Testing_Recap
yosshi_
1
1.2k
プロダクト誕生の背景から学ぶ PrometheusとGrafana Loki
yosshi_
11
3.9k
これから学ぶKubernetesのReconciliation Loop
yosshi_
16
5.4k
伝統的なエンプラ企業で取り組むインフラの設計書のモダナイゼーション.pdf
yosshi_
13
6.4k
“Running Apache Samza on Kubernetes” Recap : KubeCon2019@NA
yosshi_
3
1.3k
Other Decks in Technology
See All in Technology
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
33
30k
SREの視点で考えるSIEM活用術 〜AWS環境でのセキュリティ強化〜
cscengineer
PRO
0
160
現場で役立つ技術負債の効果的な返済方法
masuda220
PRO
10
5k
AI de Idea
kawaguti
PRO
2
130
積み重なった技術負債への挑戦 〜初手としての全社ゴト化〜
techtekt
PRO
0
1.5k
AIエージェントを最高のパートナーに育てる方法|評価と判断軸を育てる5つのステップ
koichiaoki
1
160
開発投資の期待値を上げるプロダクトロードマップづくり ~プロダクトエンジニアが越境して事業を伸ばす~
kekekenta
1
240
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
170
俺の仕事は AIに奪われないし、たぶんその BIも要らない
hikaruri
0
540
リアーキテクチャ後の障害ゼロを目指したShadow Testingの取り組み
nihonbuson
PRO
1
170
おい、エージェントを使って終わらせろ
nwiizo
2
850
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
430
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
410
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
710
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Are puppies a ranking factor?
jonoalderson
2
3.9k
The Spectacular Lies of Maps
axbom
PRO
1
1k
Prompt Engineering for Job Search
mfonobong
0
460
Docker and Python
trallard
47
4.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
380
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Transcript
ç “NATS: Past, Present and the Future” Recap : KubeCon2019@NA
Cloud Native Meetup Tokyo #11 KubeCon Recap@CyberAgent @yosshi_
• 吉村 翔太 • NTTコミュニケーションズ所属 • データサイエンスチーム • インフラエンジニア/データエンジニアリング •
Kurbernetes 、Prometheus etc • 趣味:ボードゲーム • コミュニティ活動 “Cloud Native Developers JP” @yosshi_ 自己紹介 “Prometheus Meetup Tokyo”
取り上げるセッション 参考< https://sched.co/UdIm > Keynote: NATS: Past, Present and the
Future Derek Collison, Founder and CEO, Synadia(p42) 参考< https://sched.co/UdIm > Deploy Secure and Scalable Services Across Kubernetes Clusters with NATS(p81)
What is NATS?
Sample of NATS Clients
Use Case
Some NATS Users
Netlify(1/3)
Netlify(2/3)
Netlify(3/3) 参考< https://www.slideshare.net/RyanNeal10/nats-and-netlify >
tinder(1/2)
tinder(2/2) • 要件 – アプリから更新が無いか2秒に1回ポーリングをやめたい • 他のユーザから自分宛に新規のメッセージが来ていないか等の確認 • ポーリングは電池の消費も激しいし、 NWも使う
参考< https://medium.com/tinder-engineering/how-tinder-delivers-your-matches-and-messages-at-scale-504049f22ce0 >
Pub/Sub 基礎
Pub/Subのよくある使い方 • 急激な負荷の吸収 – スマホのアプリ、IoTからのデータの収集 – 負荷が予想しづらい、スケールしやすいもの • 分配 –
同じ入力データを複数の用途で使う – 分析基盤に多い • イベント駆動 – データを作る部分と、使う部分の処理を分けてたい PUB SUB
Subscribeのやり方 • Push型 • Pull型 SUB SUB PUB PUB
QoS(送信の保証) • At Most Once – メッセージが一度だけ送られる – 重複は無いが、欠損はありうる •
At Least Once – メッセージが届くまで送られる – 重複はありうるが欠損は無い。 • Exactly Once – メッセージは一度だけ必ず送られる – “At Least Once”なプロダクトを使用する際にメッセージにIDを入れて、重複削除したり することで実現することが多い。
設計のポイント • スケーラビリティ – 水平スケールをどうできるか? – リバランスできる? • 可用性 –
ノード障害時の挙動 • レイテンシ – データを入れるのにかかる時間 – データを取り出す時間、取り出した後に処理にかかる時間
NATS 基礎
1:1の基本的な構成
1:N(Subject-Based Messaging) 送る側で Subject “foo”をつける 受ける側でもSubjectを持っていて “foo”の該当者が受け取る
Wildcard Subscribers Subjectは “.”で階層化できる Subjectに “*”が付けれる
Subject Hierarchies • Subjectは”.”で階層化出来るので 必要なとこにだけメッセージが届く構成が取れる
Load Balanced Queues 受ける側をグループ化出来る どれか1つにだけランダムで送られる 受け手側の負荷分散が出来る
Securing Connections • Authenticating – User and Password – Token
– NKeys which uses Ed25519 signing – Credentials File • Encrypting Connections with TLS
NATSの構成の話
NATS Cluster この1個がServer 相互接続されたServerの塊が Cluster ClientはどれかのServerに 所属してるイメージ
Supercluseters “Gateway Connections”で Cluster間を接続できる
Leaf Nodes • Leaf nodes allow you to bridge separate
security domains.
調べてて思ったこと・・・電話みたい 離島 関東エリア 関西エリア エリア間通信
KafkaとNATSの使い分け • 要件が”At-Most-Once”の時は – ”NATS” • 要件が”At-Least-Once”の時は – ”Kafka”
KafkaとNATSの使い分け • NATS – シンプルで軽量 – スケールしやすい – Push型 –
(ディスクを意識しなくていいので楽:Core-NATSの話) • Kafka – 耐障害性が重要(レプリケーションがある) – 入れるデータに保管期間が必要(ディスクに入れる) – Pull型 – (NATS StreamingならAt-Least-Onceも可能)
NATS Streaming Moduleを追加 NATS Serverのみの構成を”Core NATS”と呼ぶ
Sample Dashboard(1/3)
Sample Dashboard(2/3)
Sample Dashboard(3/3)
Roadmap 直近は、”NATS Streaming”絡みが多い MQTT、Websocket対応