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
June 16, 2012
Programming
6
1.2k
The Node.js Scalability Myth
Talk given at the Munich Node.js Meetup on 14.06.2012.
Felix Geisendörfer
June 16, 2012
Tweet
Share
More Decks by Felix Geisendörfer
See All by Felix Geisendörfer
tus.io - Resumable File Uploads (Lightning Talk)
felixge
2
700
Programming flying robots with JavaScript
felixge
2
870
Programming flying robots with JavaScript
felixge
0
530
Programming an AR Drone Firmware with JS (de)
felixge
1
570
Faster than C?
felixge
1
1.2k
Flying robots over a 10.000 mile distance with JavaScript.
felixge
0
430
Faster than C?
felixge
1
540
The power of node.js (with quadcopters)
felixge
0
440
Faster than C?
felixge
0
360
Other Decks in Programming
See All in Programming
Async Await: Mastering Python's Time-Bending Tricks - EuroPython2024
yanbo
1
290
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
81k
大規模マルチテナントを解決するYugabyteDBという選択肢
nnaka2992
1
250
feature環境をGitHub ActionsとCloudFormationでいい感じに管理する
nealle
2
310
Folding Cheat Sheet #7
philipschwarz
PRO
0
150
【Go言語】golangci-lintの使い方
tomo1227
0
280
DDDを志して3年経ったら「DDDの皮を被ったクリーンアーキテクチャ」になった話【デブサミ2024夏】
texmeijin
1
620
ぼっちを避けて楽しむためのアノテコノテ / Various Tips and Tricks to Avoid Loneliness and Have Fun
nrslib
3
1.7k
SDCon2024: Enabling DevOps and Team Topologies thru architecture: architecting for fast flow
cer
PRO
0
780
Temporalを取り巻く仕様を整理する
sajikix
0
120
「2024年版 Kotlin サーバーサイドプログラミング実践開発」の補講 〜O/Rマッパー編〜
n_takehata
2
260
CSC307 Lecture 05
javiergs
PRO
0
210
Featured
See All Featured
How GitHub Uses GitHub to Build GitHub
holman
471
290k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
360
22k
Web development in the modern age
philhawksworth
203
10k
What's new in Ruby 2.0
geeforr
338
31k
StorybookのUI Testing Handbookを読んだ
zakiyama
15
4.9k
A designer walks into a library…
pauljervisheath
201
24k
Building Adaptive Systems
keathley
34
2k
The Language of Interfaces
destraynor
151
23k
Unsuck your backbone
ammeep
666
57k
Fashionably flexible responsive web design (full day workshop)
malarkey
399
65k
How GitHub (no longer) Works
holman
305
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
42
2.7k
Transcript
The Node.js Scalability Myth Felix Geisendörfer 14.06.2012 at Munich node.js
user group
None
Felix Geisendörfer
transloadit.com
core contributor
npm modules
node-formidable
node-mysql
~50 modules total
(@)felixge(.de)
Background
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
This Talk
#1 Consider Reality
Using node for performance reasons?
Measuring performance in production?
1000 req / s
100 req / s
10 req / s 10 req / s
~1 million requests per day
~1 million units of value
None
#2 Node Scales Vertically
Adding more resources to a single node
None
CPU
Google V8
JS -> Assembly
Crankshaft JIT
Fast
Single Threaded* * For most parts
Computers of the future will have hundreds of cores!
Node’s Multi-Core Story
Pre-fork
IPC
Like Ruby, Python, PHP, etc.
But ... shared memory?
Your problem requires shared memory?
JavaScript is not your language
Good Luck
Memory
No hard limit on 64bit (since node-0.6 / v8-3.7)
However
Avoid huge heaps
Disk
Done in thread pool
Along with DNS
No sendfile()
None
Network
None
Non-blocking I/O
tl;dr
pre-fork & non-blocking i/o
#3 Horizontal Scaling is hard
CAP
Network Partitions
Consistency
Availability
Some Tips
Shared Nothing
Messaging
Monitoring
The Node.js Scalability Myth
Threads do not scale Node.js scales
Threads do not scale Node.js scales
Node is a tool
None
None
None
If you can’t duc it F#@k it
Questions? Slides will be available at felixge.de
Thanks
Tool Demo