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
780
Programming flying robots with JavaScript
felixge
2
970
Programming flying robots with JavaScript
felixge
0
610
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
500
Faster than C?
felixge
1
660
The power of node.js (with quadcopters)
felixge
0
500
Faster than C?
felixge
0
430
Other Decks in Programming
See All in Programming
When Dependencies Fail: Building Antifragile Applications in a Fragile World
selcukusta
0
110
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
780
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
360
Go言語はstack overflowの夢を見るか?
logica0419
0
520
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
1
120
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
880
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
6
1k
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
630
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
7.1k
alien-signals と自作 OSS で実現する フレームワーク非依存な ロジック共通化の探求 / Exploring Framework-Agnostic Logic Sharing with alien-signals and Custom OSS
aoseyuu
2
150
チームの境界をブチ抜いていけ
tokai235
0
210
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.4k
Featured
See All Featured
Unsuck your backbone
ammeep
671
58k
Code Reviewing Like a Champion
maltzj
526
40k
How to train your dragon (web standard)
notwaldorf
97
6.3k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
880
YesSQL, Process and Tooling at Scale
rocio
173
15k
Navigating Team Friction
lara
190
15k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Being A Developer After 40
akosma
91
590k
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