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
Effective Node.js Architectures
Search
Dan Shaw
March 28, 2013
Technology
1
150
Effective Node.js Architectures
Talk given at San Francisco Hacker News group. #SFHN
http://sfhn-dshaw.eventbrite.com
Dan Shaw
March 28, 2013
Tweet
Share
More Decks by Dan Shaw
See All by Dan Shaw
Node.js and the Web Platform
dshaw
0
53
How NodeSource Uses Docker
dshaw
1
140
Node.js in the Enterprise
dshaw
7
9.7k
Moving Node.js Forward
dshaw
1
760
How Node.js Is Changing Engineering
dshaw
0
140
Node.js Now
dshaw
13
7.5k
SFHTML5 Node.js Now
dshaw
0
140
Effective Node.js Architectures
dshaw
0
270
Effective Node.js Architectures
dshaw
1
450
Other Decks in Technology
See All in Technology
react-callを使ってダイヤログをいろんなとこで再利用しよう!
shinaps
1
230
品質視点から考える組織デザイン/Organizational Design from Quality
mii3king
0
190
サンドボックス技術でAI利活用を促進する
koh_naga
0
200
ハードウェアとソフトウェアをつなぐ全てを内製している企業の E2E テストの作り方 / How to create E2E tests for a company that builds everything connecting hardware and software in-house
bitkey
PRO
1
120
開発者を支える Internal Developer Portal のイマとコレカラ / To-day and To-morrow of Internal Developer Portals: Supporting Developers
aoto
PRO
1
440
AIのグローバルトレンド2025 #scrummikawa / global ai trend
kyonmm
PRO
1
260
Firestore → Spanner 移行 を成功させた段階的移行プロセス
athug
1
440
現場で効くClaude Code ─ 最新動向と企業導入
takaakikakei
1
210
なぜテストマネージャの視点が 必要なのか? 〜 一歩先へ進むために 〜
moritamasami
0
210
roppongirb_20250911
igaiga
1
200
OCI Oracle Database Services新機能アップデート(2025/06-2025/08)
oracle4engineer
PRO
0
110
Obsidian応用活用術
onikun94
1
460
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
Done Done
chrislema
185
16k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Visualization
eitanlees
148
16k
Rails Girls Zürich Keynote
gr2m
95
14k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
Thoughts on Productivity
jonyablonski
70
4.8k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
For a Future-Friendly Web
brad_frost
180
9.9k
Scaling GitHub
holman
463
140k
Transcript
Effective Node.js Architectures @dshaw
Daniel D. Shaw @dshaw
I like to build things with Node
Build Node Things • Storify • Spreecast • Node Knockout
• Voxer • The Node Firm
Do Less Well
FP for Distributed Architectures
What do I do? - your processes
Evolutionary Shapes • ALL THE THINGS! • Generalization • Specialization
• One Thing
ALL THE THINGS Mixture
ALL THE THINGS Easy to run, multi-process, single execution point.
Generalization Not all apps need to aspire to be the
next Facebook.
Scale Will you really need it?
Building and Planning Node.js application
Generalization • Express + Socket.io + API • Website +
API • Restify
Am I doing too much?
Trade-offs
Trade-offs • Expensive loads limit conjoined services. • Impact of
exceptions and crashes. • Deployment complexity. • Deployment isolation. • Evolve services independently.
Dumb Clusters Simple Pooling
Dumb Cluster • Static file server • Simple web sites
• Minimal client/server • API server hosts
Pooling Tools • Round Robin DNS • Varnish • Nginx
• HAProxy • ...more node
Pooling Tools • Substack - seaport, etc • Nodejitsu -
node-http-proxy • Poolee - battle tested at Voxer
Distribute Load Data store(s) have the definitive answers
Smarter Clusters Session Affinity
Sticky Sessions
Sticky Sessions Resources • 3rd party infrastructure • HAProxy •
nginx • stud-proxy - Mikeal
Smart Clusters (Consistent Hash Rings)
Why? Complex interactions or data persistence
Properties of Consistent Hash Rings • Deterministic • Change has
minimal impact on determinism • Crunchy middle?
House of Pain Complexity
Consistent Hash Ring Resources • node-hashring - 3rdEden • node-hash-ring
- Brian Noguchi, C++, dated • Build your own
Right for the Task As simple as possible
None
Thank You! <3 dshaw