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
2
1.4k
MongoDB at the Guardian
A quick overview of our experience with MongoDB at the Guardian.
philwills
October 12, 2011
Tweet
Share
More Decks by philwills
See All by philwills
Cracking the Monolith
philwills
1
240
The Guardian's Content API
philwills
3
510
Other Decks in Technology
See All in Technology
コードファーストの考え方。 Amplify Gen2から学ぶAWS次世代のWeb開発体験
yoshiitaka
2
320
Amplify 🩷 Bedrock 〜生成AI入門〜
minorun365
PRO
8
460
One engineer company with Ruby on Rails
rstankov
2
420
実例で紹介するRAG導入時の知見と精度向上の勘所
yamahiro
5
1.6k
AWS学習者向けにAzureの解説スライドを作成した話
handy
3
190
Gradle Build Scanを使ってビルドのことを知ろう potatotips #87
tomorrowkey
2
150
非同期推論システムによるコスト削減と信頼性向上
koki_nishihara
1
360
【NW X Security JAWS#3】L3-4:AWS環境のIPv6移行に向けて知っておきたいこと
shotashiratori
1
620
Cloud Service Mesh に触れ合う
phaya72
1
170
Building Dashboards as a Hobby
egmc
0
360
止まらないLinuxシステムを構築する_高信頼性クラスタ入門
koedoyoshida
1
140
DMM.com アルファ室採用案内資料
hsugita
1
220
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
45
9.7k
Automating Front-end Workflow
addyosmani
1357
200k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Web Components: a chance to create the future
zenorocha
306
41k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
How to train your dragon (web standard)
notwaldorf
75
5.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Designing for humans not robots
tammielis
248
25k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Clear Off the Table
cherdarchuk
85
310k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
Into the Great Unknown - MozCon
thekraken
14
1k
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