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
The Node.js Scalability Myth
Search
Felix Geisendörfer
March 16, 2012
Programming
18k
16
Share
The Node.js Scalability Myth
Presentation given at the BerlinJS user group on March 15, 2012.
Felix Geisendörfer
March 16, 2012
More Decks by Felix Geisendörfer
See All by Felix Geisendörfer
tus.io - Resumable File Uploads (Lightning Talk)
felixge
2
820
Programming flying robots with JavaScript
felixge
2
1k
Programming flying robots with JavaScript
felixge
0
650
Programming an AR Drone Firmware with JS (de)
felixge
1
650
Faster than C?
felixge
1
1.3k
Flying robots over a 10.000 mile distance with JavaScript.
felixge
0
540
Faster than C?
felixge
1
700
The power of node.js (with quadcopters)
felixge
0
540
Faster than C?
felixge
0
470
Other Decks in Programming
See All in Programming
Vibe NLP for Applied NLP
inesmontani
PRO
0
580
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
300
Explore CoroutineScope
tomoeng11
0
150
의존성 주입과 모듈화
fornewid
0
160
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
170
空間オーディオの活用
objectiveaudio
0
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
100
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
130
Back to the roots of date
jinroq
0
660
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
160
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
410
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
240
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
160
Side Projects
sachag
455
43k
It's Worth the Effort
3n
188
29k
Rails Girls Zürich Keynote
gr2m
96
14k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
730
The Pragmatic Product Professional
lauravandoore
37
7.2k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
210
Code Review Best Practice
trishagee
74
20k
The Cult of Friendly URLs
andyhume
79
6.9k
Transcript
The Node.js Scalability Myth Felix Geisendörfer 15.03.2012 at BerlinJS user
group
(@)felixge(.de)
transloadit.com (using node since v0.0.6)
core contributor
I need to build an über-scalable web service. It will
be the next big thing!
Easy! I will use node.js and MongoDB!
Easy! I will use node.js and MongoDB!
Because node.js is “scalable”, right?
None
Audience?
Backend Developers?
Are you measuring app performance in production?
1000 req / s
100 req / s
10 req / s
10 requests / per second = 864000 requests / day
10 req / s
Scalability
None
The Node.js Scalability Myth • Threads don’t scale • Event
loops do
The Node.js Scalability Myth • Threads don’t scale • Event
loops do (Probably) not true in 2012 (Very likely) not relevant
More relevant • Understanding scalability • Using the right tool
for the job
Vertical Scalability
Adding more resources to a single node
None
Vertical Scalability • CPU • GPUs • Memory • Disk
• Network
CPU
Computers of the future will have hundreds of cores!
CPU • Node is single threaded (runs on a single
CPU) • Using multiple CPUs requires multiple node processes (usually via prefork) • No shared memory
CPU (v8) • V8 compiles JS to Assembly • Just-in-time
compilation (JIT) • Does reasonably well in those language “benchmarks”
GPUs
GPUs • No support in node itself • node-cuda addon
by Kashif Rasul
Memory
Memory • No hard memory limit on 64 bit (since
node-0.6 / v8-3.6.5) • JS is a garbage collected language (avoid huge heaps) • Buffers do not count towards heap
Network
Network • Node’s network stack is a thin layer on
top of underlaying system calls • Good at fully saturating network interfaces
Disk
Disk • Done in thread pool • Unfortunately along with
DNS at this point • Throughput ok, but not ideal yet
Horizontal Scalability
Adding more nodes to a system
Horizontal Scalability • Node has no horizontal scaling specific features,
but ... • Fast networking & JSON / Buffers -> DIY
Horizontal Scalability • Simple stack (requires only build tools, python)
• Deployable without container server • Good package management via npm
Horizontal Solution “I have the full solution ...”
Horizontal Solution “... but unfortunately it did not fit on
this slide”
tl;dr • Know your requirements • There are no silver
bullets
Questions? Slides will be available at felixge.de
Thanks