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
960
Programming flying robots with JavaScript
felixge
0
600
Programming an AR Drone Firmware with JS (de)
felixge
1
620
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
640
The power of node.js (with quadcopters)
felixge
0
490
Faster than C?
felixge
0
410
Other Decks in Programming
See All in Programming
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
650
Python型ヒント完全ガイド 初心者でも分かる、現代的で実践的な使い方
mickey_kubo
1
100
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
790
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
780
ふつうの技術スタックでアート作品を作ってみる
akira888
1
820
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.5k
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
1
17k
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
190
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
1
9.9k
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
1
140
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
510
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
140
Featured
See All Featured
Statistics for Hackers
jakevdp
799
220k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
The Invisible Side of Design
smashingmag
301
51k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Unsuck your backbone
ammeep
671
58k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Rebuilding a faster, lazier Slack
samanthasiow
82
9.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
RailsConf 2023
tenderlove
30
1.1k
How STYLIGHT went responsive
nonsquared
100
5.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
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