MongoDB Management Service Overview
-
Upload
mongodb -
Category
Technology
-
view
1.008 -
download
4
description
Transcript of MongoDB Management Service Overview
![Page 1: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/1.jpg)
MongoDB Management Service (MMS)OverviewAngshuman Bagchi ([email protected])Technical Services Engineer
![Page 2: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/2.jpg)
Agenda
• What is MMS?– Monitoring
• Why use MMS Monitoring?• Setting it up and getting around• Performance and monitoring
– Backup• Risks• Backup strategies
• Wrap up
![Page 3: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/3.jpg)
What is MMS Monitoring?
![Page 4: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/4.jpg)
Demo
![Page 5: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/5.jpg)
What’s in it for me?
• Great high level view + detailed metrics• Low effort, high-return• Makes it easier for us to help you!
![Page 6: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/6.jpg)
How do I use this crazy thing?
http://mms.mongodb.com/help/monitoring/tutorial/
![Page 7: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/7.jpg)
Performance tuningand monitoring
![Page 8: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/8.jpg)
Pro-Tip: know thyself
You have to recognize normal to know when it isn’t.
Source: http://www.flickr.com/photos/skippy/6853920/
![Page 9: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/9.jpg)
Finding the bottleneck
Source: http://www.flickr.com/photos/laenulfean/462715479/
![Page 10: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/10.jpg)
Some handy metrics to watch
• Memory usage• Opcounters• Lock %• Queues• Background flush average• Replication stats
![Page 11: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/11.jpg)
Example: replication lag
150,000s of lag ~ almost 2 days of lag!
![Page 12: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/12.jpg)
Example: replication lag
• Secondaries under specified vs primaries• Access patterns between primary /
secondaries• Insufficient bandwidth• Foreground index builds on secondaries
“…when you have eliminated the impossible, whatever remains, however improbable, must be the truth…” -- Sherlock Holmes
Sir Arthur Conan Doyle, The Sign of the Four
![Page 13: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/13.jpg)
Example: replication lag
Example:• ~1500 ops per minute (opcounters)• 0.1 MB per object (average object size,
local db)
~1500 ops/min / 60 seconds * 0.1 MB/op * 8b/B =~ 20 mbps required bandwidth
![Page 14: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/14.jpg)
MMS Backup
![Page 15: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/15.jpg)
Disaster do happen … ... sometimes they are our fault
![Page 16: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/16.jpg)
Availability & Durability
risks
[
{
"failure" : [
"storage",
"power",
"host",
"dataCenter"
]
},
"programmerError",
"cyberAttack"
]
![Page 17: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/17.jpg)
• Relative to any particular risk
source:http://www.definethecloud.net/
• Solutions
– Replication– Backup
Addressing Risks
![Page 18: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/18.jpg)
Replication
… but programmer errors … …
garbage in => garbage out
![Page 19: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/19.jpg)
• Much slower to restore (availability suffers)• Out of date to some extent• Fairly cheap• Well isolated• Handles almost all risks
Backup
![Page 20: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/20.jpg)
• mongodump/mongorestore• Storage-level options• MongoDB Backup Service (new!)
Backup Approaches
![Page 21: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/21.jpg)
• Can be run in live or offline mode• Oplog-aware for point-in-time operations• Filter can be applied in both directions• Considerations
– Working set– Sharding
mongodump / mongorestore
![Page 22: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/22.jpg)
• Copy files in your data directory (e.g. /data/db)
• Filesystem or block storage snapshot• Fastest way to backup/restore• Considerations
– Consistency– Backup granularity– Ops expertise
Storage-level Backups
![Page 23: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/23.jpg)
MMS Backup : Overview
![Page 24: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/24.jpg)
Mongodump File system MMS Backup
Initial complexity
Time to restore
Point in time recovery of replica set
System Overhead
Scalable
Consistent Snapshot of Sharded System
Recovery Approaches
![Page 25: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/25.jpg)
How much does it cost?
• Free Tier - monthly bill under $5 is free for first 12 months
![Page 26: MongoDB Management Service Overview](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b6f0de4a79590d5e8b456f/html5/thumbnails/26.jpg)
Summary
• MMS Monitoring is a great, free service• Setup is easy• Proactively monitor your cluster• MMS Backups makes backing up data
easy• Making MongoDB operations as easy as
development using MongoDB