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
860
Programming flying robots with JavaScript
felixge
0
520
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
530
The power of node.js (with quadcopters)
felixge
0
430
Faster than C?
felixge
0
360
Other Decks in Programming
See All in Programming
Good intentions gone bad
evaferreira
0
110
Google Analytics でサイト速度を計測する / Measure site speed with Google Analytics
forrep
2
110
ERB, ancient and future
m_seki
3
220
入門プロパティベーステスト/learning-property-based-testing
kiway
6
1.1k
1BRC – Nerd Sniping the Java Community (Keynote JCon Slovenia)
gunnarmorling
1
100
Does Ruby Parser dream of highly expressive grammar?
andpad
0
120
From LALR to IELR: A Lrama's Next Step
junk0612
2
1.3k
The Final Frontier of Web Development: React Server Components vs Jakarta EE
ivargrimstad
0
400
Why Spring Matters to Jakarta EE - And Vice Versa
ivargrimstad
0
590
Improved REXML XML parsing performance using StringScanner
naitoh
0
190
Secure Serverless Architecture
seike460
PRO
2
410
The Hotwire Landscape After Turbo 8 @ Helvetic Ruby 2024, Zurich
marcoroth
0
180
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
26
5.9k
Building Adaptive Systems
keathley
32
1.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
246
20k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
4
200
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
136
41k
Music & Morning Musume
bryan
42
5.7k
GitHub's CSS Performance
jonrohan
1025
450k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
Raft: Consensus for Rubyists
vanstee
133
6.3k
Git: the NoSQL Database
bkeepers
PRO
423
63k
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