SlideShare a Scribd company logo
My First Moments with
MongoDB
Colin Charles
byte@bytebot.net | @bytebot | http://bytebot.net/blog/
Community Open House, New York City, New York, USA
30 June 2016
whoami
• Work on MariaDB Server at MariaDB Corporation
(SkySQL Ab)
• Merged with Monty Program Ab, makers of MariaDB
• Formerly MySQL AB (exit: Sun Microsystems)
• Past lives include Fedora Project (FESCO),
OpenOffice.org
• MySQL Community Contributor of the Year Award
winner 2014
Agenda
• What is MongoDB?
• Why MongoDB?
• Who uses MongoDB?
• Where is MongoDB
found?
• Storage Engines
• Distributions
• Replication
• Backups
• Monitoring
• DBaaS
• Production
• Resources
Research Papers
• 1970 E.F. Codd paper “A Relational Model of Data for Large
Shared Data Banks”
• 2004 Google paper “MapReduce: Simplified Data Processing on
Large Clusters” -> Hadoop ~2008 “big data movement”
• 2006 Google paper “BigTable: A Distributed Storage System for
Structured Data” -> Cassandra/HBase/LevelDB ~2009
• 2007 Amazon paper “Dynamo: Amazon’s Highly Available Key-
value Store” -> Aerospike/Cassandra/Voldemort/Riak
• 2012 Google paper “Spanner: Google’s Globally-Distributed
Database” -> CockroachDB
What is MongoDB?
• Document oriented database
• data stored in documents, not tables/relations
• JSON
• JavaScript
• Flexible schema
• no downtime for field (column) changes or index
creation
Why MongoDB?
• “After three years it has become clear that in
terms of LinkedIn member profiles there is only
one trend: the total dominance of MongoDB.” -
Matt Aslett, 451 Group
• Agile development
• No additional caching layer required
• Built in replication with automatic failover +
sharding out of the box
Who uses MongoDB?
• Craigslist
• Facebook’s Parse
• Business Insider
• Foursquare
• Stripe
Where is MongoDB found?
• All manner of Linux distributions
• MongoDB repositories: http://repo.mongodb.org/
• Works on Little Endian only (SERVER-1625)
• Test databases (mongoimport)
• http://media.mongodb.org/zips.json
• https://docs.mongodb.com/getting-started/shell/import-data/
(primer-dataset.json restaurants)
• https://docs.mongodb.com/manual/reference/program/
Storage Engines
• MMAPv1 (B-Tree)
• WiredTiger (B-Tree, LSM)
• MongoRocks (LSM)
• (PerconaFT, formerly TokuMX/TokuKV)
• In-memory engine (Enterprise)
Distributions of MongoDB
• MongoDB
• MongoDB Enterprise
• Percona Server for MongoDB
• MongoRocks, audit logging, SASL
authentication,
Replication
• Node: single mongod process
• Majority
• Replica set: group of nodes. HA via elections. All
members are equal by default + replicate to
each other asynchronously
• Oplog: capped collection, idempotent
Replication II
• Shard: replica sets are groups. Queries filtered
for data chunk holds
• Config servers: metadata for sharded clusters
Backups
• mongodump / mongorestore
• filesystem snapshots (LVM)
• rocks-strata (MongoRocks); TokuBackup
(PerconaFT)
• $: Ops Manager / Cloud Manager
Monitoring
• mongostat
• mongotop
• db.serverStatus(), etc.
• host of OSS tools
• $aa$: Cloud Manager, New Relic, DataDog
DBaaS
• mLab
• ObjectRocket
• Compose
• MongoDB Atlas
Production Notes
• Configure mongod.conf!
• Follow through and you’ll be off to a good start
• https://docs.mongodb.com/manual/
administration/production-notes/
• https://docs.mongodb.com/manual/
administration/production-checklist/
There’s more
• Understanding aggregation framework
• Sizing and provisioning
• db.collection.stats(), .explain()
• GIS functionality
• Grants? There are roles in MongoDB!
• Percona Toolkit? mlogsummary, mongo-summary
Books
Resources
• MongoDB University - https://
university.mongodb.com/
• Quick Reference Cards - https://
www.mongodb.com/collateral/quick-reference-
cards
• The Little MongoDB Book (2.6) - https://
github.com/karlseguin/the-little-mongodb-book/
blob/master/en/mongodb.markdown
Thank You!
byte@bytebot.net | @bytebot | http://bytebot.net/blog/
slides: slideshare.net/bytebot

More Related Content

PDF
Best practices for MySQL/MariaDB Server/Percona Server High Availability
PDF
Distributions from the view a package
PDF
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
PDF
Meet MariaDB 10.1 at the Bulgaria Web Summit
PDF
Tuning Linux for your database FLOSSUK 2016
PDF
The MySQL Server ecosystem in 2016
PDF
Lessons from database failures
PDF
MariaDB Server Compatibility with MySQL
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Distributions from the view a package
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
Meet MariaDB 10.1 at the Bulgaria Web Summit
Tuning Linux for your database FLOSSUK 2016
The MySQL Server ecosystem in 2016
Lessons from database failures
MariaDB Server Compatibility with MySQL

What's hot (20)

PDF
The Complete MariaDB Server tutorial
PDF
Lessons from database failures
PDF
MariaDB Server & MySQL Security Essentials 2016
PDF
Securing your MySQL / MariaDB Server data
PDF
Best practices for MySQL High Availability Tutorial
PDF
MariaDB 10 Tutorial - 13.11.11 - Percona Live London
PDF
Why MariaDB?
PDF
Databases in the hosted cloud
PDF
MariaDB 10: The Complete Tutorial
PDF
MariaDB 10 and what's new with the project
PDF
Meet MariaDB Server 10.1 London MySQL meetup December 2015
PDF
MariaDB - a MySQL Replacement #SELF2014
PDF
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
PDF
MariaDB 10: A MySQL Replacement - HKOSC
PDF
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
PDF
Differences between MariaDB 10.3 & MySQL 8.0
PDF
Lessons from database failures
PDF
A beginners guide to MariaDB
PDF
MySQL features missing in MariaDB Server
PDF
The Complete MariaDB Server Tutorial - Percona Live 2015
The Complete MariaDB Server tutorial
Lessons from database failures
MariaDB Server & MySQL Security Essentials 2016
Securing your MySQL / MariaDB Server data
Best practices for MySQL High Availability Tutorial
MariaDB 10 Tutorial - 13.11.11 - Percona Live London
Why MariaDB?
Databases in the hosted cloud
MariaDB 10: The Complete Tutorial
MariaDB 10 and what's new with the project
Meet MariaDB Server 10.1 London MySQL meetup December 2015
MariaDB - a MySQL Replacement #SELF2014
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB 10: A MySQL Replacement - HKOSC
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
Differences between MariaDB 10.3 & MySQL 8.0
Lessons from database failures
A beginners guide to MariaDB
MySQL features missing in MariaDB Server
The Complete MariaDB Server Tutorial - Percona Live 2015
Ad

Viewers also liked (8)

PDF
Forking Successfully - or is a branch better?
PPTX
A Simple Multi-player Video Game Framework for Experimenting and Teaching C...
PDF
The MySQL Server ecosystem in 2016
PDF
Otto Kekäläinen - Forking in Open Source: Case Study of MySQL/MariaDB - Mindt...
PDF
Undelete (and more) rows from the binary log
PDF
Lessons from {distributed,remote,virtual} communities and companies
PDF
Hoppala at O'Reilly Where 2.0 Conference
PDF
The MySQL Server Ecosystem in 2016
Forking Successfully - or is a branch better?
A Simple Multi-player Video Game Framework for Experimenting and Teaching C...
The MySQL Server ecosystem in 2016
Otto Kekäläinen - Forking in Open Source: Case Study of MySQL/MariaDB - Mindt...
Undelete (and more) rows from the binary log
Lessons from {distributed,remote,virtual} communities and companies
Hoppala at O'Reilly Where 2.0 Conference
The MySQL Server Ecosystem in 2016
Ad

Similar to My first moments with MongoDB (20)

PPTX
Using MongoDB For BigData in 20 Minutes
PPTX
KEY
MongoDB Administration 20110922
KEY
Mongo db admin_20110329
PDF
The Evolution of Open Source Databases
KEY
NoSQL in the context of Social Web
PDF
MongoDB: a gentle, friendly overview
PDF
Using Spring with NoSQL databases (SpringOne China 2012)
PDF
Mongo db first steps with csharp
PPT
MongoDB Tick Data Presentation
PPTX
5 Popular Choices for NoSQL on a Microsoft Platform
PPTX
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
KEY
Introduction to MongoDB
KEY
MongoDB Hadoop DC
PPTX
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
PPTX
Drop acid
PPTX
MongoDB
PPTX
MongoDB
PDF
Mariadb10 和新项目中有什么
PDF
MongoDB and Ruby on Rails
Using MongoDB For BigData in 20 Minutes
MongoDB Administration 20110922
Mongo db admin_20110329
The Evolution of Open Source Databases
NoSQL in the context of Social Web
MongoDB: a gentle, friendly overview
Using Spring with NoSQL databases (SpringOne China 2012)
Mongo db first steps with csharp
MongoDB Tick Data Presentation
5 Popular Choices for NoSQL on a Microsoft Platform
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
Introduction to MongoDB
MongoDB Hadoop DC
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
Drop acid
MongoDB
MongoDB
Mariadb10 和新项目中有什么
MongoDB and Ruby on Rails

More from Colin Charles (8)

PDF
What is MariaDB Server 10.3?
PDF
Databases in the hosted cloud
PDF
The MySQL ecosystem - understanding it, not running away from it!
PDF
Databases in the Hosted Cloud
PDF
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
PDF
Capacity planning for your data stores
PDF
Cool MariaDB Plugins
PDF
Better encryption & security with MariaDB 10.1 & MySQL 5.7
What is MariaDB Server 10.3?
Databases in the hosted cloud
The MySQL ecosystem - understanding it, not running away from it!
Databases in the Hosted Cloud
Percona ServerをMySQL 5.6と5.7用に作るエンジニアリング(そしてMongoDBのヒント)
Capacity planning for your data stores
Cool MariaDB Plugins
Better encryption & security with MariaDB 10.1 & MySQL 5.7

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PPTX
Cloud computing and distributed systems.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Spectroscopy.pptx food analysis technology
PPT
Teaching material agriculture food technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
cuic standard and advanced reporting.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
NewMind AI Weekly Chronicles - August'25 Week I
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
Cloud computing and distributed systems.
The Rise and Fall of 3GPP – Time for a Sabbatical?
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
sap open course for s4hana steps from ECC to s4
Spectroscopy.pptx food analysis technology
Teaching material agriculture food technology
MYSQL Presentation for SQL database connectivity
Review of recent advances in non-invasive hemoglobin estimation
Programs and apps: productivity, graphics, security and other tools
Big Data Technologies - Introduction.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
cuic standard and advanced reporting.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

My first moments with MongoDB

  • 1. My First Moments with MongoDB Colin Charles byte@bytebot.net | @bytebot | http://bytebot.net/blog/ Community Open House, New York City, New York, USA 30 June 2016
  • 2. whoami • Work on MariaDB Server at MariaDB Corporation (SkySQL Ab) • Merged with Monty Program Ab, makers of MariaDB • Formerly MySQL AB (exit: Sun Microsystems) • Past lives include Fedora Project (FESCO), OpenOffice.org • MySQL Community Contributor of the Year Award winner 2014
  • 3. Agenda • What is MongoDB? • Why MongoDB? • Who uses MongoDB? • Where is MongoDB found? • Storage Engines • Distributions • Replication • Backups • Monitoring • DBaaS • Production • Resources
  • 4. Research Papers • 1970 E.F. Codd paper “A Relational Model of Data for Large Shared Data Banks” • 2004 Google paper “MapReduce: Simplified Data Processing on Large Clusters” -> Hadoop ~2008 “big data movement” • 2006 Google paper “BigTable: A Distributed Storage System for Structured Data” -> Cassandra/HBase/LevelDB ~2009 • 2007 Amazon paper “Dynamo: Amazon’s Highly Available Key- value Store” -> Aerospike/Cassandra/Voldemort/Riak • 2012 Google paper “Spanner: Google’s Globally-Distributed Database” -> CockroachDB
  • 5. What is MongoDB? • Document oriented database • data stored in documents, not tables/relations • JSON • JavaScript • Flexible schema • no downtime for field (column) changes or index creation
  • 6. Why MongoDB? • “After three years it has become clear that in terms of LinkedIn member profiles there is only one trend: the total dominance of MongoDB.” - Matt Aslett, 451 Group • Agile development • No additional caching layer required • Built in replication with automatic failover + sharding out of the box
  • 7. Who uses MongoDB? • Craigslist • Facebook’s Parse • Business Insider • Foursquare • Stripe
  • 8. Where is MongoDB found? • All manner of Linux distributions • MongoDB repositories: http://repo.mongodb.org/ • Works on Little Endian only (SERVER-1625) • Test databases (mongoimport) • http://media.mongodb.org/zips.json • https://docs.mongodb.com/getting-started/shell/import-data/ (primer-dataset.json restaurants) • https://docs.mongodb.com/manual/reference/program/
  • 9. Storage Engines • MMAPv1 (B-Tree) • WiredTiger (B-Tree, LSM) • MongoRocks (LSM) • (PerconaFT, formerly TokuMX/TokuKV) • In-memory engine (Enterprise)
  • 10. Distributions of MongoDB • MongoDB • MongoDB Enterprise • Percona Server for MongoDB • MongoRocks, audit logging, SASL authentication,
  • 11. Replication • Node: single mongod process • Majority • Replica set: group of nodes. HA via elections. All members are equal by default + replicate to each other asynchronously • Oplog: capped collection, idempotent
  • 12. Replication II • Shard: replica sets are groups. Queries filtered for data chunk holds • Config servers: metadata for sharded clusters
  • 13. Backups • mongodump / mongorestore • filesystem snapshots (LVM) • rocks-strata (MongoRocks); TokuBackup (PerconaFT) • $: Ops Manager / Cloud Manager
  • 14. Monitoring • mongostat • mongotop • db.serverStatus(), etc. • host of OSS tools • $aa$: Cloud Manager, New Relic, DataDog
  • 15. DBaaS • mLab • ObjectRocket • Compose • MongoDB Atlas
  • 16. Production Notes • Configure mongod.conf! • Follow through and you’ll be off to a good start • https://docs.mongodb.com/manual/ administration/production-notes/ • https://docs.mongodb.com/manual/ administration/production-checklist/
  • 17. There’s more • Understanding aggregation framework • Sizing and provisioning • db.collection.stats(), .explain() • GIS functionality • Grants? There are roles in MongoDB! • Percona Toolkit? mlogsummary, mongo-summary
  • 18. Books
  • 19. Resources • MongoDB University - https:// university.mongodb.com/ • Quick Reference Cards - https:// www.mongodb.com/collateral/quick-reference- cards • The Little MongoDB Book (2.6) - https:// github.com/karlseguin/the-little-mongodb-book/ blob/master/en/mongodb.markdown
  • 20. Thank You! byte@bytebot.net | @bytebot | http://bytebot.net/blog/ slides: slideshare.net/bytebot