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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
C J Silverio
June 03, 2016
Programming
310
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Monitoring on a budget
How npm does monitoring & metrics on a budget.
C J Silverio
June 03, 2016
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
310
Keeping JavaScript safe
ceejbot
3
490
ceej's how to solve it
ceejbot
6
780
work-life balance at npm
ceejbot
5
810
hash functions and you!
ceejbot
2
380
The accidental noder
ceejbot
2
180
Design Patterns & Modularity in the npm Registry
ceejbot
3
210
Cheating Gall's Law: MediterraneaJS edition
ceejbot
4
360
Other Decks in Programming
See All in Programming
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
580
Performance Engineering for Everyone
elenatanasoiu
0
180
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
110
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
180
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
550
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.2k
JavaDoc 再入門
nagise
1
370
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
190
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
Oxcを導入して開発体験が向上した話
yug1224
4
320
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.4k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
270
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
WCS-LA-2024
lcolladotor
0
650
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Speed Design
sergeychernyshev
33
1.9k
We Are The Robots
honzajavorek
0
250
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
210
HDC tutorial
michielstock
2
720
Building Adaptive Systems
keathley
44
3.1k
Designing Powerful Visuals for Engaging Learning
tmiket
1
420
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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