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
720
Programming flying robots with JavaScript
felixge
2
900
Programming flying robots with JavaScript
felixge
0
540
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
440
Faster than C?
felixge
1
570
The power of node.js (with quadcopters)
felixge
0
450
Faster than C?
felixge
0
370
Other Decks in Programming
See All in Programming
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
Arm移行タイムアタック
qnighy
0
290
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
140
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
330
Click-free releases & the making of a CLI app
oheyadam
2
110
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.8k
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
What's new in Ruby 2.0
geeforr
343
31k
Facilitating Awesome Meetings
lara
50
6.1k
Producing Creativity
orderedlist
PRO
341
39k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
How STYLIGHT went responsive
nonsquared
95
5.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
GitHub's CSS Performance
jonrohan
1030
460k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Building Adaptive Systems
keathley
38
2.3k
It's Worth the Effort
3n
183
27k
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