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
120
Node.js in the Enterprise
dshaw
7
9.4k
Moving Node.js Forward
dshaw
1
740
How Node.js Is Changing Engineering
dshaw
0
120
Node.js Now
dshaw
13
7.4k
SFHTML5 Node.js Now
dshaw
0
110
Effective Node.js Architectures
dshaw
0
250
Effective Node.js Architectures
dshaw
1
440
Other Decks in Technology
See All in Technology
APIファーストなプロダクトマネジメントの実践 〜SaaSus Platformでの例〜 / "Practicing API-First Product Management - An Example with SaaSus Platform
oztick139
0
110
SIEMを用いて、セキュリティログ分析の可視化と分析を実現し、PDCAサイクルを回してみた
coconala_engineer
0
330
障害対応をちょっとずつよくしていくための 演習の作りかた
heleeen
0
230
開発パフォーマンスを最大化するための開発体制
ham0215
2
440
「スニダン」開発組織の構造に込めた意図 ~組織作りはパッションや政治ではない!~
rinchsan
3
570
長期間TiDBを使ってきた話 @ 私たちはなぜNewSQLを使うのかTiDB選定5社が語る選定理由と活用LT / Experiences with TiDB Over Time
chibiegg
2
900
Janus
bkuhlmann
1
490
Meta Quest 3 で動く桜マシマシ WebXR アプリを IBM Cloud Code Engine と Babylon.js で作った話
1ftseabass
PRO
0
120
AOAI をきっかけに 社内の Azure 管理を見直した話
recruitengineers
PRO
1
300
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
1
250
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
120
JSON攻略法.pdf
miyakemito
8
5.1k
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
43
6.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
The Power of CSS Pseudo Elements
geoffreycrofte
60
5k
KATA
mclloyd
15
12k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
659
120k
The Cult of Friendly URLs
andyhume
74
5.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
20
1.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
14
1.6k
4 Signs Your Business is Dying
shpigford
175
21k
RailsConf 2023
tenderlove
4
540
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
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