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
160
1
Share
Effective Node.js Architectures
Talk given at San Francisco Hacker News group. #SFHN
http://sfhn-dshaw.eventbrite.com
Dan Shaw
March 28, 2013
More Decks by Dan Shaw
See All by Dan Shaw
Node.js and the Web Platform
dshaw
0
78
How NodeSource Uses Docker
dshaw
1
150
Node.js in the Enterprise
dshaw
7
9.8k
Moving Node.js Forward
dshaw
1
780
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
280
Effective Node.js Architectures
dshaw
1
460
Other Decks in Technology
See All in Technology
Cortex Code君、今日から内製化支援担当ね。
coco_se
0
270
主催・運営として"場をつくる”というアウトプットのススメ
_mossann_t
0
110
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
77k
Databricks Lakebaseを用いたAIエージェント連携
daiki_akimoto_nttd
0
150
OpenClaw初心者向けセミナー / OpenClaw Beginner Seminar
cmhiranofumio
0
320
OCI技術資料 : 証明書サービス概要
ocise
1
7.2k
GitHub Actions侵害 — 相次ぐ事例を振り返り、次なる脅威に備える
flatt_security
13
7.6k
Podcast配信で広がったアウトプットの輪~70人と音声発信してきた7年間~/outputconf_01
fortegp05
0
230
ストライクウィッチーズ2期6話のエイラの行動が許せないのでPjMの観点から何をすべきだったのかを考える
ichimichi
1
120
パワポ作るマンをMCP Apps化してみた
iwamot
PRO
0
300
Databricks Appsで実現する社内向けAIアプリ開発の効率化
r_miura
0
320
組織的なAI活用を阻む 最大のハードルは コンテキストデザインだった
ixbox
1
540
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Darren the Foodie - Storyboard
khoart
PRO
3
3.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
310
Rails Girls Zürich Keynote
gr2m
96
14k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
120
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
The Cult of Friendly URLs
andyhume
79
6.8k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
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