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
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
CSC509 Lecture 11
javiergs
PRO
0
180
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
250
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
Arm移行タイムアタック
qnighy
0
300
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
870
Remix on Hono on Cloudflare Workers
yusukebe
1
280
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
A Philosophy of Restraint
colly
203
16k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
What's in a price? How to price your products and services
michaelherold
243
12k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
The Language of Interfaces
destraynor
154
24k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
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