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
290
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
290
Keeping JavaScript safe
ceejbot
3
460
ceej's how to solve it
ceejbot
6
760
work-life balance at npm
ceejbot
5
790
hash functions and you!
ceejbot
2
350
The accidental noder
ceejbot
2
160
Design Patterns & Modularity in the npm Registry
ceejbot
3
190
Cheating Gall's Law: MediterraneaJS edition
ceejbot
4
340
Other Decks in Programming
See All in Programming
The Missing Link in Angular's Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
130
Bakuraku E2E Scenario Test System Architecture #bakuraku_qa_study
teyamagu
PRO
0
760
問題の見方を変える「システム思考」超入門
panda_program
0
270
What's New in Web AI?
christianliebel
PRO
0
130
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
39
12k
MCPサーバー「モディフィウス」で変更容易性の向上をスケールする / modifius
minodriven
8
1.5k
例外処理を理解して、設計段階からエラーを見つけやすく、起こりにくく #phpconfuk
kajitack
12
6.2k
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
13
12k
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
460
ゼロダウンタイムでミドルウェアの バージョンアップを実現した手法と課題
wind111
0
180
Java_プロセスのメモリ監視の落とし穴_NMT_で見抜けない_glibc_キャッシュ問題_.pdf
ntt_dsol_java
0
210
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.1k
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Code Review Best Practice
trishagee
72
19k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Making Projects Easy
brettharned
120
6.5k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
The Language of Interfaces
destraynor
162
25k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
11
930
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
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