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
AI時代にPdMとPMMはどう連携すべきか / PdM–PMM-collaboration-in-AI-era
rakus_dev
0
280
フィンテック養成勉強会#56
finengine
0
130
ガチな登山用デバイスからこんにちは
halka
1
210
ライブサービスゲームQAのパフォーマンス検証による品質改善の取り組み
gree_tech
PRO
0
560
AWSを利用する上で知っておきたい名前解決のはなし(10分版)
nagisa53
1
420
2025年になってもまだMySQLが好き
yoku0825
8
4.1k
allow_retry と Arel.sql / allow_retry and Arel.sql
euglena1215
1
150
落ちる 落ちるよ サーバーは落ちる
suehiromasatoshi
0
140
現場で効くClaude Code ─ 最新動向と企業導入
takaakikakei
1
120
BPaaSにおける人と協働する前提のAIエージェント-AWS登壇資料
kentarofujii
0
120
ZOZOマッチのアーキテクチャと技術構成
zozotech
PRO
3
1.3k
Grafana Meetup Japan Vol. 6
kaedemalu
1
280
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Docker and Python
trallard
45
3.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
800
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
4 Signs Your Business is Dying
shpigford
184
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Testing 201, or: Great Expectations
jmmastey
45
7.6k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
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