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
The things I've seen, living with MongoDB
Search
Bradley Whittington
October 03, 2013
Technology
0
130
The things I've seen, living with MongoDB
A short talk through some of the lessons learned about MongoDB at Motribe and Mxit
Bradley Whittington
October 03, 2013
Tweet
Share
More Decks by Bradley Whittington
See All by Bradley Whittington
Black Friday 2017 talk at Cape Town DevOps meetup
bradwhittington
0
38
Let's talk about Git
bradwhittington
0
78
Doing something new in an existing company culture
bradwhittington
0
130
Load Balancing 101
bradwhittington
1
480
Agile-ish is good enough
bradwhittington
1
550
PHP Addiction - or, teach someone about python
bradwhittington
2
640
Quick overview of MongoDB
bradwhittington
0
110
Other Decks in Technology
See All in Technology
IBM Bobを使って、PostgreSQLのToDoアプリをDb2へ変換してみよう/202603_Dojo_Bob
mayumihirano
0
180
Claude Cowork Plugins を読む - Skills駆動型業務エージェント設計の実像と構造
knishioka
0
280
わたしがセキュアにAWSを使えるわけないじゃん、ムリムリ!(※ムリじゃなかった!?)
cmusudakeisuke
1
350
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
JAWS Days 2026 楽しく学ぼう! 認証認可 入門/20260307-jaws-days-novice-lane-auth
opelab
9
1.4k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.1k
モブプログラミング再入門 ー 基本から見直す、AI時代のチーム開発の選択肢 ー / A Re-introduction of Mob Programming
takaking22
1
250
ITインフラの液体冷却
recruitengineers
PRO
2
110
AWS SES VDMで 将来の配信事故を防げた話
moyashi
0
110
Evolution of Claude Code & How to use features
oikon48
1
440
オレ達はAWS管理をやりたいんじゃない!開発の生産性を爆アゲしたいんだ!!
wkm2
3
330
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
110
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
120
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
How to Ace a Technical Interview
jacobian
281
24k
Optimizing for Happiness
mojombo
378
71k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
130
Building Adaptive Systems
keathley
44
2.9k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
Transcript
The things I’ve seen, living with MongoDB Brad Whittington VP
web products - Mxit
What we use MongoDB for Primary data store for a
few consumer products. Motribe mobile social network - JudgeME & MxPix Mxit Launch
JudgeMe
None
Polytechnical university of hardknocks 1 week into my new job…
Zero MongoDB experience Massive crashes and timeouts on our cluster Hundreds of requests per minute
MongoDB docs == MongoDB + EC2 =
db.serverStatus() rs.add(...) MMS
MongoSQL? Mongo is *not* a relational database This is bad:
{ _id:... friend_id:... user_id:... }
The Data is Hot If you can’t fit all your
data in RAM, make sure you are kind to your (network connected) hard drives. Reads from (networked) disks are (incredibly) slow.
sort by rand() limit 1 MongoDB is all… One Solution!
(see the help pages for more) Add random geospatial positions Geospatial indexing Query for objects near [x,y] Disks are all like
I wish we had Capped Arrays*... Database with Capped Collections.Totally
okay. For the first n00 000 collections. Then it’s a bad idea. A very bad idea. * Available in MongoDB 2.4
A fresh start. Mxit Launch Platform for app creation Aim
for ±single document per request Cache cleverly, aggressively Database per app 300 authors 9M pageviews/month 2M unique users 4 m1.small 1 amazon core, 1.7GB ram
A fresh lesson Doing ensureIndex(..., {background:true}) inline in the request
is sub-optimal. 60 indexing processes 3M document collection (not fully in RAM) Not ideal.
db.currentOp() db.killOp() db.repair() db.currentOp().inprog.forEach( function(d){ if(d.waitingForLock && d.lockType != "read")
printjson(d) })
MongoDB Love • Mongo terminal is JS • Recovery is
quick, easy • Sharding is easy • Indexes are lovely • Be careful in your architecture / queries. Pure index queries are ++ • MongoDB is not a Relational DB
Read http://aphyr.com/tags/jepsen Aphyr / Jepsen / Call me maybe
@darb github.com/bradwhittington speakerdeck.com/u/bradwhittington/ Questions?