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
56
How NodeSource Uses Docker
dshaw
1
140
Node.js in the Enterprise
dshaw
7
9.7k
Moving Node.js Forward
dshaw
1
770
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
20250929_QaaS_vol20
mura_shin
0
110
Sidekiq その前に:Webアプリケーションにおける非同期ジョブ設計原則
morihirok
17
6.4k
AI時代だからこそ考える、僕らが本当につくりたいスクラムチーム / A Scrum Team we really want to create in this AI era
takaking22
1
270
組織観点からIAM Identity CenterとIAMの設計を考える
nrinetcom
PRO
1
130
OCI Network Firewall 概要
oracle4engineer
PRO
1
7.7k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9k
今改めてServiceクラスについて考える 〜あるRails開発者の10年〜
joker1007
20
9.4k
PythonとLLMで挑む、 4コマ漫画の構造化データ化
esuji5
0
120
「技術負債にならない・間違えない」 権限管理の設計と実装
naro143
33
9.9k
Pythonによる契約プログラミング入門 / PyCon JP 2025
7pairs
5
2.3k
VCC 2025 Write-up
bata_24
0
140
全てGoで作るP2P対戦ゲーム入門
ponyo877
3
1.2k
Featured
See All Featured
Speed Design
sergeychernyshev
32
1.1k
4 Signs Your Business is Dying
shpigford
185
22k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Being A Developer After 40
akosma
90
590k
A Tale of Four Properties
chriscoyier
160
23k
A designer walks into a library…
pauljervisheath
208
24k
Rails Girls Zürich Keynote
gr2m
95
14k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
The Power of CSS Pseudo Elements
geoffreycrofte
78
6k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
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