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
770
Programming flying robots with JavaScript
felixge
2
950
Programming flying robots with JavaScript
felixge
0
590
Programming an AR Drone Firmware with JS (de)
felixge
1
610
Faster than C?
felixge
1
1.2k
Flying robots over a 10.000 mile distance with JavaScript.
felixge
0
480
Faster than C?
felixge
1
630
The power of node.js (with quadcopters)
felixge
0
490
Faster than C?
felixge
0
410
Other Decks in Programming
See All in Programming
Perlで痩せる
yuukis
1
670
Devinで実践する!AIエージェントと協働する開発組織の作り方
masahiro_nishimi
6
2.8k
コンポーネントライブラリで実現する、アクセシビリティの正しい実装パターン
schktjm
1
710
〜可視化からアクセス制御まで〜 BigQuery×Looker Studioで コスト管理とデータソース認証制御する方法
cuebic9bic
3
310
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
110
Interface vs Types ~型推論が過多推論~
hirokiomote
1
240
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
0
160
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
18
5.5k
衛星の軌道をWeb地図上に表示する
sankichi92
0
260
レガシーシステムの機能調査・開発におけるAI利活用
takuya_ohtonari
0
300
❄️ tmux-nixの実装を通して学ぶNixOSモジュール
momeemt
1
150
Blueskyのプラグインを作ってみた
hakkadaikon
1
390
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
180
53k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
34k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
860
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
15
900
A designer walks into a library…
pauljervisheath
205
24k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.8k
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