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
Monitoring on a budget
Search
C J Silverio
June 03, 2016
Programming
2
300
Monitoring on a budget
How npm does monitoring & metrics on a budget.
C J Silverio
June 03, 2016
Tweet
Share
More Decks by C J Silverio
See All by C J Silverio
The economics of package management
ceejbot
4
1.6k
The future of (javascript) modules (in node)
ceejbot
1
300
Keeping JavaScript safe
ceejbot
3
470
ceej's how to solve it
ceejbot
6
770
work-life balance at npm
ceejbot
5
790
hash functions and you!
ceejbot
2
360
The accidental noder
ceejbot
2
160
Design Patterns & Modularity in the npm Registry
ceejbot
3
200
Cheating Gall's Law: MediterraneaJS edition
ceejbot
4
340
Other Decks in Programming
See All in Programming
GoLab2025 Recap
kuro_kurorrr
0
790
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
4.9k
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
12
2.9k
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
230
Go コードベースの構成と AI コンテキスト定義
andpad
0
150
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2k
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
7
4.2k
Graviton と Nitro と私
maroon1st
0
160
Grafana:建立系統全知視角的捷徑
blueswen
0
270
JETLS.jl ─ A New Language Server for Julia
abap34
2
470
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
180
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
280
Featured
See All Featured
It's Worth the Effort
3n
187
29k
Unsuck your backbone
ammeep
671
58k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
160
The Invisible Side of Design
smashingmag
302
51k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.2k
Fireside Chat
paigeccino
41
3.8k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
130
Building the Perfect Custom Keyboard
takai
2
670
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
0
1k
Transcript
monitoring on a budget
a few animated gifs with the Twelfth Doctor (0 cats)
C J Silverio vp of engineering, @ceejbot
let's talk npm by the numbers
205 million packages Tuesday 10K requests/sec
npm is 25 people 4 of us run the registry
when the company was formed 5 people total
you outsource many services when you're tiny
you pull them back in-house when you succeed
success is sometimes a catastrophe
npm's scale: runaway success npm's staff: wouldn't this be neat
mission: know this on a budget
None
2 questions: is the registry up? how well is it
performing?
is the registry up? monitoring
how well is it performing? metrics
monitoring
monitoring == pull ask questions that you know the right
answers for
Is this host up? Is this cert about to expire?
Is the DB replication keeping up?
if you get the wrong answer somebody gets paged
nagios state of the art in free
None
It's okay. We never look at it. It just triggers
Pager Duty.
nagios’s virtues: reliability & custom checks
goal: never page anybody
self-healing checks automate the fix if you can!
monitoring == unit tests a ratchet for continuous improvement
external monitoring ping services
you must monitor but that's just the start
monitoring tells you what it doesn't tell you why
metrics
Q: What's a metric? A: A name + a value
+ a time.
counter: it happened N times gauge: it's Y-sized right now
rate: it's happening N times/second timing: it took X milliseconds
metrics == push the app gives you numbers
emit from a service store in timeseries db query &
graph
the usual stack statsd ➜ graphite ➜ grafana
None
None
statsd uses UDP
Q: Why not send metrics over UDP? A: You care
about receiving them.
just try to install graphite
for-pay/SAAS services exist but I can't afford them
monitoring 400 processes right now 12+ GB of log data
a day
interlude: when should you pay?
convert the £$€ cost into engineer hours/month
pay when it's cheaper than investing an engineer (be honest
about the cost)
numbat was born “How hard can it be?” I said.
None
https://github.com/ numbat-metrics numbat - powered metrics
None
npm’s stack numbat ➜ influxdb ➜ grafana
var Emitter = require('numbat-emitter'); var emitter = new Emitter({ uri:
'tcp://localhost:3333', app: 'www', }); process.emit('metric', { name: 'request.latency', value: 30 }); process.emit('metric', { name: 'disk.used.percent', value: 36 }); process.emit('metric', { name: 'login' });
so easy to emit a metric that we just do
it any time something interesting happens
4000 metrics/sec from the registry
None
None
None
None
metrics ➜ alerts
Server handling expected traffic? Latency higher than normal? Error rate
higher than usual?
metrics comprise a data stream send the stream to more
than one place!
anomaly detection
recap time!
your web apps are backed by something
what's it up to? how do you know?
get data on what your services are up to
what: monitoring yes/no questions
why: metrics data changing over time
next: anomaly detection predictions & trends
automate don't require humans
npm install -g npm@latest @ceejbot on all the things npm
loves you