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
140
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
37
How NodeSource Uses Docker
dshaw
1
130
Node.js in the Enterprise
dshaw
7
9.6k
Moving Node.js Forward
dshaw
1
740
How Node.js Is Changing Engineering
dshaw
0
140
Node.js Now
dshaw
13
7.5k
SFHTML5 Node.js Now
dshaw
0
130
Effective Node.js Architectures
dshaw
0
260
Effective Node.js Architectures
dshaw
1
440
Other Decks in Technology
See All in Technology
データ資産をシームレスに伝達するためのイベント駆動型アーキテクチャ
kakehashi
PRO
2
550
SA Night #2 FinatextのSA思想/SA Night #2 Finatext session
satoshiimai
1
140
個人開発から公式機能へ: PlaywrightとRailsをつなげた3年の軌跡
yusukeiwaki
11
3k
ハッキングの世界に迫る~攻撃者の思考で考えるセキュリティ~
nomizone
13
5.2k
速くて安いWebサイトを作る
nishiharatsubasa
11
13k
リアルタイム分析データベースで実現する SQLベースのオブザーバビリティ
mikimatsumoto
0
1.4k
Classmethod AI Talks(CATs) #17 司会進行スライド(2025.02.19) / classmethod-ai-talks-aka-cats_moderator-slides_vol17_2025-02-19
shinyaa31
0
130
地方拠点で エンジニアリングマネージャーってできるの? 〜地方という制約を楽しむオーナーシップとコミュニティ作り〜
1coin
1
230
Larkご案内資料
customercloud
PRO
0
650
管理者しか知らないOutlookの裏側のAIを覗く#AzureTravelers
hirotomotaguchi
2
440
(機械学習システムでも) SLO から始める信頼性構築 - ゆる SRE#9 2025/02/21
daigo0927
0
150
『衛星データ利用の方々にとって近いようで触れる機会のなさそうな小話 ~ 衛星搭載ソフトウェアと衛星運用ソフトウェア (実物) を動かしながらわいわいする編 ~』 @日本衛星データコミニティ勉強会
meltingrabbit
0
150
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Building an army of robots
kneath
303
45k
Gamification - CAS2011
davidbonilla
80
5.1k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
The Cult of Friendly URLs
andyhume
78
6.2k
Building Your Own Lightsaber
phodgson
104
6.2k
Bash Introduction
62gerente
611
210k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Faster Mobile Websites
deanohume
306
31k
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