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
670
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
一生覚えておきたい「システム開発=コミュニケーション」〜初めての実務案件振り返りLT〜
maimyyym
0
130
[新卒向け研修資料] テスト文字列に「うんこ」と入れるな(2024年版)
infiniteloop_inc
4
13k
Cloud Native Java with Spring Boot (CNCF Aarhus, April 2024)
thomasvitale
1
170
Databricks における 『MLOps』
databricksjapan
2
170
Azure犬駆動開発の記録/GlobalAzureFukuoka2024_20240420
nina01
1
210
アクセス制御にまつわる改善 / Improving access control
itkq
0
530
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
210
推しは推せるときに推せ! プロダクトにフィードバックしていこう
nakasho
0
300
20分で完全に理解するGrafanaダッシュボード
hamadakoji
3
460
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
2
460
KubeConにproposalを送りたい人へのアドバイス
sat
PRO
3
240
本当のAWS基礎
toru_kubota
0
510
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
42
12k
Done Done
chrislema
178
15k
YesSQL, Process and Tooling at Scale
rocio
164
13k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Why Our Code Smells
bkeepers
PRO
331
56k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
116
18k
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
Designing Experiences People Love
moore
136
23k
Designing with Data
zakiwarfel
96
4.8k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
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!