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 startup
Search
lautis
August 21, 2012
Technology
4
680
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
クラウド利用者の「責任」をどう果たす?AWSセキュリティ対策のススメ #AWSSummit
hiashisan
0
270
年間一億円削減した時系列データベースのアーキテクチャ改善~不確実性の高いプロジェクトへの挑戦~
lycorptech_jp
PRO
3
2.9k
フルリモートワークはエンジニアの夢を叶えたか? #cm_odyssey
mamohacy
2
600
スタートアップにおける組織設計とスクラムの長期戦略 / Scrum Fest Kanazawa 2024
yoshikiiida
13
3.6k
頼られるのが大好きな 皆さんへ - 支援相手との期待の合わせ方、突き放し方 -/For_people_who_like_to_be_relied_on
naitosatoshi
1
290
開発生産性をむしろ向上させる セキュリティパートナーの作り方 / Dev Productivity Con 2024
flatt_security
0
360
AI研修【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
130
AutomatedLabを使って内部ペンテストを勉強しよう! -やられ社内ネットワークの自動構築-
n_etupirka
1
610
Azure AI ことはじめ
tsubakimoto_s
0
130
エンジニアの生存戦略 〜クラウド潮流の経験から紐解く技術トレンドのメカニズムと乗りこなし方〜
shimy
9
1.9k
Git 研修 Basic【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
310
公共領域から学ぶ クラウド移行についてエンジニアが意識していること
kawakawa2222
0
140
Featured
See All Featured
Web Components: a chance to create the future
zenorocha
307
41k
Fireside Chat
paigeccino
25
2.8k
Pencils Down: Stop Designing & Start Developing
hursman
118
11k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
90
47k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
13
430
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
The Cult of Friendly URLs
andyhume
75
5.9k
The Cost Of JavaScript in 2023
addyosmani
31
4.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
19k
Six Lessons from altMBA
skipperchong
24
3.2k
Ruby is Unlike a Banana
tanoku
96
10k
GraphQLとの向き合い方2022年版
quramy
36
13k
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!