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
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
250
The Guardian's Content API
philwills
3
570
Other Decks in Technology
See All in Technology
AI: Making Admin and Users, Lives Better
kbmsg
0
110
MLOps導入のための組織作りの第一歩
akasan
0
340
エージェントスキルを作って自分のインプットに役立てよう
tsubakimoto_s
0
420
AndroidアプリとCopilot Studioの統合
nakasho
0
120
AIが書いたコードを信じられない問題 〜レビュー負荷を下げるために変えたこと〜 / The AI Code Trust Gap: Reducing the Review Burden
bitkey
PRO
8
1.3k
AI時代のガードレールとしてのAPIガバナンス
nagix
0
300
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.4k
これからの「データマネジメント」の話をしよう
sansantech
PRO
0
140
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
78k
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
420
AgentCore×VPCでの設計パターンn選と勘所
har1101
3
290
PicoRuby as a Multi-VM Operating System
kishima
1
180
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
190
Faster Mobile Websites
deanohume
310
31k
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
270
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
150
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
BBQ
matthewcrist
89
10k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
740
So, you think you're a good person
axbom
PRO
2
2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
The Language of Interfaces
destraynor
162
26k
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