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
28
How NodeSource Uses Docker
dshaw
1
130
Node.js in the Enterprise
dshaw
7
9.5k
Moving Node.js Forward
dshaw
1
740
How Node.js Is Changing Engineering
dshaw
0
130
Node.js Now
dshaw
13
7.5k
SFHTML5 Node.js Now
dshaw
0
120
Effective Node.js Architectures
dshaw
0
260
Effective Node.js Architectures
dshaw
1
440
Other Decks in Technology
See All in Technology
Analytics-Backed App Widget Development - Served with Jetpack Glance
miyabigouji
0
620
20240911_New_Relicダッシュボード活用例
speakerdeckfk
0
110
なにもしてないのにNew Relicのデータ転送量が増えていたときに確認したこと
tk3fftk
2
230
どこよりも遅めなWinActor Ver.7.5.0 新機能紹介
tamai_63
0
210
より快適なエラーログ監視を目指して
leveragestech
4
1.5k
サプライチェーン攻撃に備える
ryunen344
0
290
やってやろうじゃないかメカアジャイル! / Let's do it, mechanical agile!
psj59129
1
680
Privacy Sandbox on Android / DroidKaigi 2024
7pairs
1
270
2024年のナビゲーション・フォーカス対応:Composeでキーボード・ナビゲーションをサポートしよう
tahia910
0
110
Developer Experienceを向上させる基盤づくりの取り組み事例集
coconala_engineer
0
160
サーバレスでモバイルアプリ開発! NTTコム「ビジネスdアプリ」のアーキテクチャ / The architecture of business d app
nttcom
12
250
リアルお遍路+SORACOM IoT
ozk009
1
140
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
93
5.1k
Building a Scalable Design System with Sketch
lauravandoore
459
32k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
43
2k
Fantastic passwords and where to find them - at NoRuKo
philnash
48
2.8k
Principles of Awesome APIs and How to Build Them.
keavy
125
16k
Six Lessons from altMBA
skipperchong
26
3.4k
Why Our Code Smells
bkeepers
PRO
334
56k
We Have a Design System, Now What?
morganepeng
48
7.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
123
18k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
Web development in the modern age
philhawksworth
205
10k
For a Future-Friendly Web
brad_frost
174
9.3k
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