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
30
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
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
Intuneお役立ちツールのご紹介
sukank
3
750
AI機能の開発運用のリアルと今後のリアル
akiroom
0
250
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
250
株式会社島津製作所_研究開発(集団協業と知的生産)の現場を支える、OSS知識基盤システムの導入
akahane92
1
180
AIチャットボット開発への生成AI活用
ryomrt
0
140
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
190
SREの前に
nwiizo
11
2.7k
10分でわかるfreeeのQA
freee
1
3.5k
mikroBus HAT を用いた簡易ベアメタル開発
tarotene
0
270
福岡新卒エンジニアの会
teba_eleven
1
190
Engineering at LY Corporation
lycorp_recruit_jp
0
320
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
0
1.6k
Featured
See All Featured
Building Applications with DynamoDB
mza
90
6.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Being A Developer After 40
akosma
86
590k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
390
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
How STYLIGHT went responsive
nonsquared
95
5.2k
Statistics for Hackers
jakevdp
796
220k
Bash Introduction
62gerente
608
210k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
How GitHub (no longer) Works
holman
310
140k
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