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
140
0
Share
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
More Decks by Bradley Whittington
See All by Bradley Whittington
Black Friday 2017 talk at Cape Town DevOps meetup
bradwhittington
0
46
Let's talk about Git
bradwhittington
0
93
Doing something new in an existing company culture
bradwhittington
0
140
Load Balancing 101
bradwhittington
1
490
Agile-ish is good enough
bradwhittington
1
570
PHP Addiction - or, teach someone about python
bradwhittington
2
650
Quick overview of MongoDB
bradwhittington
0
110
Other Decks in Technology
See All in Technology
Amazon Bedrock 経由の Claude Cowork を試してみよう・MCP にも繋いでみよう
sugimomoto
0
220
最低限これだけ押さえれ大丈夫_Claude Enterprise/Team企業展開ガバナンス入門
tkikuchi
1
370
食べログのサーキットブレーカー導入を振り返って
atpons
1
140
形式手法特論:公平性制約の位相的特徴づけ #kernelvm / Kernel VM Study Kansai 12th
ytaka23
1
530
データ分析基盤の信頼を支える視点と設計
yuki_saito
2
730
OpenClawとHermesAgentでAI新入社員を作った話
takanoriyanada
0
130
Gradle×GitHub_ActionsでCI時間を約50%短縮 ジョブ分割の設計と落とし穴 / Cutting CI Time by ~50% with Gradle and GitHub Actions: Job-Splitting Design and Pitfalls
takatty
0
490
AI とサービス・デザイン / AI and Service Design
ks91
PRO
0
180
Cloud Run のアップデート 触ってみる&紹介
gre212
0
200
NFLコンペ2026 解法
lycorptech_jp
PRO
0
120
まだ道半ば、AI-DLCを歩み始めている話
news_it_enj
2
210
インフラが苦手でも大丈夫! 紙芝居 Kubernetes -WWGT 10周年編-
aoi1
1
280
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
370
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Thoughts on Productivity
jonyablonski
76
5.2k
From π to Pie charts
rasagy
0
190
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
160
Un-Boring Meetings
codingconduct
0
300
Music & Morning Musume
bryan
47
7.2k
Scaling GitHub
holman
464
140k
Skip the Path - Find Your Career Trail
mkilby
1
130
エンジニアに許された特別な時間の終わり
watany
107
240k
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?