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
120
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
32
Let's talk about Git
bradwhittington
0
68
Doing something new in an existing company culture
bradwhittington
0
130
Load Balancing 101
bradwhittington
1
470
Agile-ish is good enough
bradwhittington
1
510
PHP Addiction - or, teach someone about python
bradwhittington
2
620
Quick overview of MongoDB
bradwhittington
0
95
Other Decks in Technology
See All in Technology
GraphQLを活用したリアーキテクチャに対応するSLI/Oの再設計
coconala_engineer
0
200
AndroidアプリエンジニアもMCPを触ろう
kgmyshin
2
610
C++26アップデート 2025-03
faithandbrave
0
1.2k
大規模サーバーレスプロジェクトのリアルな零れ話
maimyyym
3
140
グループ ポリシー再確認 (2)
murachiakira
0
220
データベース04: SQL (1/3) 単純質問 & 集約演算
trycycle
PRO
0
710
Microsoft Fabric vs Databricks vs (Snowflake) -若手エンジニアがそれぞれの強みと違いを比較してみた- "A Young Engineer's Comparison of Their Strengths and Differences"
reireireijinjin6
1
140
10ヶ月かけてstyled-components v4からv5にアップデートした話
uhyo
5
460
AI駆動で進化する開発プロセス ~クラスメソッドでの実践と成功事例~ / aidd-in-classmethod
tomoki10
1
910
AIでめっちゃ便利になったけど、結局みんなで学ぶよねっていう話
kakehashi
PRO
1
550
コードや知識を組み込む / Incorporating Codes and Knowledge
ks91
PRO
0
170
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
5.5k
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
A better future with KSS
kneath
239
17k
A designer walks into a library…
pauljervisheath
205
24k
Building an army of robots
kneath
305
45k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
GitHub's CSS Performance
jonrohan
1031
460k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.2k
The Invisible Side of Design
smashingmag
299
50k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
780
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
5
590
RailsConf 2023
tenderlove
30
1.1k
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?