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
160
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
67
How NodeSource Uses Docker
dshaw
1
140
Node.js in the Enterprise
dshaw
7
9.8k
Moving Node.js Forward
dshaw
1
770
How Node.js Is Changing Engineering
dshaw
0
150
Node.js Now
dshaw
13
7.5k
SFHTML5 Node.js Now
dshaw
0
150
Effective Node.js Architectures
dshaw
0
270
Effective Node.js Architectures
dshaw
1
460
Other Decks in Technology
See All in Technology
小さく、早く、可能性を多産する。生成AIプロジェクト / prAIrie-dog
visional_engineering_and_design
0
310
Introduction to Bill One Development Engineer
sansan33
PRO
0
340
モダンデータスタックの理想と現実の間で~1.3億人Vポイントデータ基盤の現在地とこれから~
taromatsui_cccmkhd
2
300
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.5k
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
2
650
Digitization部 紹介資料
sansan33
PRO
1
6.4k
産業的変化も組織的変化も乗り越えられるチームへの成長 〜チームの変化から見出す明るい未来〜
kakehashi
PRO
0
160
M&Aで拡大し続けるGENDAのデータ活用を促すためのDatabricks権限管理 / AEON TECH HUB #22
genda
0
310
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
640
Scrum Guide Expansion Pack が示す現代プロダクト開発への補完的視点
sonjin
0
220
AI時代のアジャイルチームを目指して ー スクラムというコンフォートゾーンからの脱却 ー / Toward Agile Teams in the Age of AI
takaking22
3
740
AWS Lambda durable functions を使って AWS Lambda の15分の壁を超えてみよう
matsuzawatakeshi
0
120
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
32
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
2
270
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
880
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Highjacked: Video Game Concept Design
rkendrick25
PRO
0
260
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Heart Work Chapter 1 - Part 1
lfama
PRO
3
35k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
54
48k
RailsConf 2023
tenderlove
30
1.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