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
Architecture with NoSQL: Experiences of a SaaS ...
Search
lautis
August 21, 2012
Technology
4
740
Architecture with NoSQL: Experiences of a SaaS startup
Presentation at WICSA 2012 Industry day.
lautis
August 21, 2012
Tweet
Share
More Decks by lautis
See All by lautis
Real-Time with Flowdock
lautis
2
190
Other Decks in Technology
See All in Technology
AI時代の戦略的アーキテクチャ 〜Adaptable AI をアーキテクチャで実現する〜 / Enabling Adaptable AI Through Strategic Architecture
bitkey
PRO
9
3.3k
改竄して学ぶコンテナサプライチェーンセキュリティ ~コンテナイメージの完全性を目指して~/tampering-container-supplychain-security
mochizuki875
1
350
ある編集者のこれまでとこれから —— 開発者コミュニティと歩んだ四半世紀
inao
5
3.4k
Quarkusで作るInteractive Stream Application
joker1007
0
150
大規模モノレポの秩序管理 失速しない多言語化フロントエンドの運用 / JSConf JP 2025
shoota
0
270
Axon Frameworkのイベントストアを独自拡張した話
zozotech
PRO
0
200
Javaコミュニティの歩き方 ~参加から貢献まで、すべて教えます~
tabatad
0
130
プロダクト負債と歩む持続可能なサービスを育てるための挑戦
sansantech
PRO
0
310
FFMとJVMの実装から学ぶJavaのインテグリティ
kazumura
0
140
Lazy Constant - finalフィールドの遅延初期化
skrb
0
240
AI駆動開発を実現するためのアーキテクチャと取り組み
baseballyama
2
1.1k
2ヶ月で新規事業のシステムを0から立ち上げるスタートアップの舞台裏
shmokmt
0
230
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
KATA
mclloyd
PRO
32
15k
Scaling GitHub
holman
463
140k
BBQ
matthewcrist
89
9.9k
Typedesign – Prime Four
hannesfritz
42
2.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Code Reviewing Like a Champion
maltzj
527
40k
4 Signs Your Business is Dying
shpigford
186
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Why Our Code Smells
bkeepers
PRO
340
57k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
118
20k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Transcript
Architecture with NoSQL Experiences of a SaaS startup Ville Lautanala
None
•Single page JavaScript front-end •Thousands of concurrent users •Three replicated
databases •X servers on two continents •99.98% availability Facts
Streaming API MongoDB Redis + IRC, Twitter, RSS, and Email
integrations WebSocket API Message Backend PostgreSQL Rails App
MongoDB • Document-oriented • JSON based queries • Scalable reads
and writes • Replication and failover built-in • No transactions, no JOINs
SSD == Awesome
None
Chef
Manage servers with code 1. Edit recipes 2. knife upload
3. ??? 4. Profit!!!
Redis: in-memory DB •Key-value store •Data-structure server •Network accessible shared
memory •Non-blocking event-bus (pub/sub)
Flowdock message processing Redis Queue Redis Pubsub MongoDB Flowdock Backend
Redis is SPoF
ZooKeeper
ZooKeeper? •Highly-available key-value store •Enables distributed coordination •Listen for value
changes •Eventual consistency with quorum semantics
Node Manager Node Manager Redis Node Redis Node ZooKeeper Monitor
Update Redis Failover
Zoos are kept.
Chef ZooKeeper Configuration files Dynamic configuration variables Server installation Failover
handling Chef vs ZooKeeper
Network fail Flowdock Comcast Problems
Taking control of the routes 1. Submarine communications cable 2.
3rd party CDN/Load Balancers 3. AWS as SSL endpoint
This Is How We Roll •GeoDNS chooses endpoint •Encrypted VPN
mesh between servers •Servers near client act as SSL endpoint •Request processed near data
150ms faster page requests from U.S.
Conclusions •MongoDB a bit like MySQL 15 years ago •Some
NoSQL databases are suitable for distributed setups •Hardware and network issues needs to be addressed
Thanks!