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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Dan Shaw
March 28, 2013
Technology
170
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
83
How NodeSource Uses Docker
dshaw
1
160
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
160
Effective Node.js Architectures
dshaw
0
280
Effective Node.js Architectures
dshaw
1
470
Other Decks in Technology
See All in Technology
Ruby::Boxでできること、Refinementsでできること
joker1007
2
110
個人AIからチームAIへ:開発における品質と生産性の再設計
moongift
PRO
0
320
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.7k
Claude Codeを組織で使いこなす— サーバサイドAIエージェント運用の実践知
techtekt
PRO
0
140
権限管理設計を完全に理解した
rsugi
2
250
探して_入れて_作って_使う_Agent_Skills___LT.pdf
peintangos
2
110
基礎から解説!Icebergで紐解くSnowflake×Databricks連携の現在地
cm_yasuhara
0
410
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
4
1.1k
もりもり新機能を一挙紹介! AgentCoreに入門して、AWS上にAIエージェントを構築しよう
minorun365
PRO
6
350
TypeScript Compiler APIとPHP-Parserを活用し、TypeScriptとPHPで型を共有する
shuta13
0
270
管理アカウント単一運用からAWS Organizationsに移行するの大変で滅
hiramax
0
360
string地獄を脱出する
sansantech
PRO
1
110
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
A Soul's Torment
seathinner
6
2.9k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.5k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
WCS-LA-2024
lcolladotor
0
610
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
380
Designing Experiences People Love
moore
143
24k
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