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
690
Programming flying robots with JavaScript
felixge
2
850
Programming flying robots with JavaScript
felixge
0
510
Programming an AR Drone Firmware with JS (de)
felixge
1
560
Faster than C?
felixge
1
1.1k
Flying robots over a 10.000 mile distance with JavaScript.
felixge
0
430
Faster than C?
felixge
1
520
The power of node.js (with quadcopters)
felixge
0
430
Faster than C?
felixge
0
350
Other Decks in Programming
See All in Programming
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
1.2k
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
19k
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
200
Elm Form Validation
bkuhlmann
0
510
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
890
禅の心を手に入れよ
eltociear
1
170
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.4k
新宿ダンジョンを可視化してみた
satoshi7190
2
270
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
360
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
140
雑に思考を整理する技術と効能
konifar
60
29k
AmperとFleetを使ったAndroidアプリ
yoppie
0
210
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Build The Right Thing And Hit Your Dates
maggiecrowley
24
2k
Infographics Made Easy
chrislema
238
18k
The Illustrated Children's Guide to Kubernetes
chrisshort
31
46k
For a Future-Friendly Web
brad_frost
172
9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
Design by the Numbers
sachag
274
18k
Optimising Largest Contentful Paint
csswizardry
8
2.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
The Invisible Customer
myddelton
114
12k
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