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
740
Programming flying robots with JavaScript
felixge
2
920
Programming flying robots with JavaScript
felixge
0
560
Programming an AR Drone Firmware with JS (de)
felixge
1
590
Faster than C?
felixge
1
1.2k
Flying robots over a 10.000 mile distance with JavaScript.
felixge
0
450
Faster than C?
felixge
1
600
The power of node.js (with quadcopters)
felixge
0
470
Faster than C?
felixge
0
380
Other Decks in Programming
See All in Programming
Запуск 1С:УХ в крупном энтерпрайзе: мечта и реальность ПМа
lamodatech
0
990
Terraform で作る Amazon ECS の CI/CD パイプライン
hiyanger
0
110
Kanzawa.rbのLT大会を支える技術の裏側を変更する Ruby on Rails + Litestream 編
muryoimpl
0
120
『改訂新版 良いコード/悪いコードで学ぶ設計入門』活用方法−爆速でスキルアップする!効果的な学習アプローチ / effective-learning-of-good-code
minodriven
29
4.8k
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
18
3.3k
動作確認やテストで漏れがちな観点3選
starfish719
5
870
盆栽転じて家具となる / Bonsai and Furnitures
aereal
0
2.2k
functionalなアプローチで動的要素を排除する
ryopeko
1
940
CNCF Project の作者が考えている OSS の運営
utam0k
5
620
時計仕掛けのCompose
mkeeda
1
200
自動で //nolint を挿入する取り組み / Gopher's Gathering
utgwkk
1
170
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
240
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
89
5.8k
The Cult of Friendly URLs
andyhume
78
6.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
52k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.3k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
How to Ace a Technical Interview
jacobian
276
23k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
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