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
130
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
43
Let's talk about Git
bradwhittington
0
86
Doing something new in an existing company culture
bradwhittington
0
140
Load Balancing 101
bradwhittington
1
490
Agile-ish is good enough
bradwhittington
1
560
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
"おまじない"を卒業する ボイラープレート再入門
shunsuke_1b
1
110
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
180
「AIに部下10人」を3ヶ月運用してわかった、生成AI駆動開発のリアル
yoheinabe777
0
110
今年注目する!データ分析プラットフォームでのAIの活用
nayuts
0
170
AIが書いたコードを信じられない問題 〜レビュー負荷を下げるために変えたこと〜 / The AI Code Trust Gap: Reducing the Review Burden
bitkey
PRO
8
1.4k
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
580
GKE Agent SandboxでAIが生成したコードを 安全に実行してみた
lamaglama39
0
110
Practical TypeProf: Lessons from Analyzing Optcarrot
mame
0
1.2k
弁護士ドットコム株式会社 エンジニア職向け 会社紹介資料
bengo4com
1
190
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
610
No Types Needed, Just Callable Method Check
dak2
1
2.1k
M5Stack CoreS3とZephyr(RTOS)で Edge AIっぽいことしてみた
iotengineer22
0
350
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
170
エンジニアに許された特別な時間の終わり
watany
106
240k
For a Future-Friendly Web
brad_frost
183
10k
Side Projects
sachag
455
43k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
170
How to Ace a Technical Interview
jacobian
281
24k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
370
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
Docker and Python
trallard
47
3.8k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
900
The Cost Of JavaScript in 2023
addyosmani
55
9.9k
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?