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
MongoDB at the Guardian
Search
philwills
October 12, 2011
Technology
1.4k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MongoDB at the Guardian
A quick overview of our experience with MongoDB at the Guardian.
philwills
October 12, 2011
More Decks by philwills
See All by philwills
Cracking the Monolith
philwills
1
260
The Guardian's Content API
philwills
3
590
Other Decks in Technology
See All in Technology
会計事務所と顧問先の契約関係をOIDC・OAuthで表現する
terara
0
130
AWS Blocks が楽しい #ゆるWeb札幌
tacck
PRO
0
140
35分でわかるEffective Platform Engineering
nwiizo
5
630
サービス内で複数のOP・ASを連鎖させる(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
130
アクセスキーが漏れた日にやるべきこと- 無効化の先にある本当の対応
kazzpapa3
0
310
巨大気象データと戦う ― サロゲートモデル学習を高速化する圧縮技術
gpuunite_official
0
270
OAuth SPIFFE Client Authentication(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
130
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
なぜ Temporal の大小比較には compare しかないのか / Why Does Temporal Only Have compare() for Comparisons
kazukihayase
1
200
形式手法特論:Hyperproperty とモデル検査 #kernelvm / Kernel VM Study Tokyo 19th
ytaka23
0
780
アクセスキー流出時の対応で再認識した攻撃側と防御側の非対称性について
kazzpapa3
0
100
型落ちシンクライアント端末のPoEモジュールを自作したかった話
logica0419
0
420
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
AI: The stuff that nobody shows you
jnunemaker
PRO
9
940
Facilitating Awesome Meetings
lara
57
7.1k
Why Our Code Smells
bkeepers
PRO
340
58k
KATA
mclloyd
PRO
35
15k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
280
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Fireside Chat
paigeccino
42
4k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Transcript
MongoDB at the Guardian @philwills Tuesday, 11 October 2011
Tuesday, 11 October 2011
Tuesday, 11 October 2011
Tuesday, 11 October 2011
Why use mongo? • Flexible documents fit our domain well
• Query flexibility important Tuesday, 11 October 2011
Guardian MongoDB usage • Development for over a year •
Three projects in production • Internal and cloud deployments • Most common choice for new projects • At present, used for a minority of pages Tuesday, 11 October 2011
Tuesday, 11 October 2011
• “Schema” design • Performance • Operations • Overall Impressions
Tuesday, 11 October 2011
Schema Design • More thought required • Importance of Aggregates
• Flexibility vs. Consistency • Traps Tuesday, 11 October 2011
More thought required • Much less prior art • Can’t
just plump for 3NF Tuesday, 11 October 2011
Aggregates • Domain Driven Design • Atomicity of transactions •
Distribution Boundaries http://www.flickr.com/photos/cdeimages/3584213567/ Tuesday, 11 October 2011
Flexibility vs. Consistency • Application has to match flexibility of
documents • Design on the basis that flexibility has a cost • Lack of datastore enforced schema means loss of documentation Tuesday, 11 October 2011
Traps • So fast you don’t notice problems • DBRefs
look a bit like a foreign key... • ...but just add complexity Tuesday, 11 October 2011
Performance Tuesday, 11 October 2011
Something old... • Indexes, indexes, indexes • “Select *” considered
harmful • Structure of data storage is crucial Tuesday, 11 October 2011
...something new • mongostat • db.currentOp() • db.system.profile.find() Tuesday, 11
October 2011
• It’s easy when all your data is in memory
• Determining what’s really your working set not always trivial Tuesday, 11 October 2011
Reading from secondary • In general eventual consistency is fine
• db.requestStart() • db.requestDone() Tuesday, 11 October 2011
Operations Tuesday, 11 October 2011
Replica sets work • Hardware upgrade with no downtime •
Compaction with no downtime • Spite Thor! Tuesday, 11 October 2011
32-bit OS = :o( • Rules out small EC2 boxes
Tuesday, 11 October 2011
Zoom, zoom • New features coming in fast. Yay! •
Lots of time can be wasted on scripts that rapidly become redundant • Roadmap not always as visible as it might be Tuesday, 11 October 2011
Security • Granularity of access is coarse • No connection
encryption without tunnelling • Auditing could be easier Tuesday, 11 October 2011
One global lock • Scary... • ...but not yet seen
a real problem Tuesday, 11 October 2011
Manual Updates • Not ideal, but always necessary • db.collection.update()
is a banana skin • Representation in query results may not distinguish non-JS types Tuesday, 11 October 2011
• Still maturing • More thought required • Not a
golden hammer Overall Impressions Tuesday, 11 October 2011
• Fast • Manageable • Suits our data • Still
our first choice Overall Impressions Tuesday, 11 October 2011
Questions? Tuesday, 11 October 2011