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
700
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
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
230
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
1k
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
200
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
430
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
430
AIチャットボット開発への生成AI活用
ryomrt
0
170
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
TypeScript、上達の瞬間
sadnessojisan
46
13k
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
600
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Statistics for Hackers
jakevdp
796
220k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
What's in a price? How to price your products and services
michaelherold
243
12k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Six Lessons from altMBA
skipperchong
27
3.5k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Facilitating Awesome Meetings
lara
50
6.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
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!