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
690
Programming flying robots with JavaScript
felixge
2
850
Programming flying robots with JavaScript
felixge
0
510
Programming an AR Drone Firmware with JS (de)
felixge
1
560
Faster than C?
felixge
1
1.1k
Flying robots over a 10.000 mile distance with JavaScript.
felixge
0
430
Faster than C?
felixge
1
520
The power of node.js (with quadcopters)
felixge
0
430
Faster than C?
felixge
0
350
Other Decks in Programming
See All in Programming
Tailwind CSSを本気でカスタマイズする方法
fsubal
14
5.3k
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
500
使ってみよう Azure AI Document Intelligence
kosmosebi
2
330
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
0
270
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
Fast JSX: Don't clone props object #28768
yossydev
1
140
Ruby GitHub Packages
bkuhlmann
0
630
"config" ってなんだ? / What is "config"?
okashoi
0
240
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
650
障害対応を起点としたもっといい開発と運用のサイクル作りのためにできること / Hatena Enginner Seminar #29
polamjag
0
250
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
390
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
270
Featured
See All Featured
What the flash - Photography Introduction
edds
64
11k
Designing with Data
zakiwarfel
96
4.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
125
32k
Teambox: Starting and Learning
jrom
128
8.4k
Infographics Made Easy
chrislema
238
18k
Code Review Best Practice
trishagee
55
15k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
122
39k
Documentation Writing (for coders)
carmenintech
60
3.9k
Statistics for Hackers
jakevdp
789
220k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
25
2.3k
A Modern Web Designer's Workflow
chriscoyier
689
190k
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