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.3k
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
760
Programming flying robots with JavaScript
felixge
2
940
Programming flying robots with JavaScript
felixge
0
580
Programming an AR Drone Firmware with JS (de)
felixge
1
600
Faster than C?
felixge
1
1.2k
Flying robots over a 10.000 mile distance with JavaScript.
felixge
0
470
Faster than C?
felixge
1
620
The power of node.js (with quadcopters)
felixge
0
480
Faster than C?
felixge
0
400
Other Decks in Programming
See All in Programming
趣味全開のAITuber開発
kokushin
0
200
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
170
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
4
1.1k
タイムゾーンの奥地は思ったよりも闇深いかもしれない
suguruooki
1
720
Being an ethical software engineer
xgouchet
PRO
0
210
エンジニアが挑む、限界までの越境
nealle
1
270
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
7
3.1k
スモールスタートで始めるためのLambda×モノリス(Lambdalith)
akihisaikeda
2
290
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
110
Youtube Lofier - Chrome拡張開発
ninikoko
0
2.5k
サービスクラスのありがたみを発見したときの思い出 #phpcon_odawara
77web
4
680
AHC045_解説
shun_pi
0
560
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Invisible Side of Design
smashingmag
299
50k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
29
5.7k
Fireside Chat
paigeccino
37
3.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
Designing for humans not robots
tammielis
252
25k
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