Deploying Your First App with MongoDB Management Service (MMS)
Run MongoDB with Confidence Using MongoDB Management Service (MMS)
-
Upload
mongodb -
Category
Technology
-
view
233 -
download
3
description
Transcript of Run MongoDB with Confidence Using MongoDB Management Service (MMS)
![Page 1: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/1.jpg)
Run MongoDB with Confidence using MMS
Sandeep Parikh
#mongodb #mongodbdays
@crcsmnky
Senior Solutions Architect, MongoDB
![Page 2: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/2.jpg)
Operational Complexities
![Page 3: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/3.jpg)
What is MMS?
![Page 4: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/4.jpg)
MongoDB Management Service
![Page 5: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/5.jpg)
MMS User Interface
Navigation tabs take you to the different functional areas of MongoDB Management
Service. Through this interface, you can monitor your deployment, configure alerts
via email or SMS, backup your data and automate your deployments.
![Page 6: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/6.jpg)
MMS Monitoring
![Page 7: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/7.jpg)
Monitoring
MMS monitors deployments through a monitoring agent installed on a host server. One agent can:
• Identify the members of the deployment and server configuration, MongoDB Version, query profile, logs, etc.
• Dynamically create a graphical representation of the deployment technology.
• Visualize performance indications like lock percentage, reads/writes, queues, etc.
• Enable you to configure alerts for when these numbers aren’t “normal”
![Page 8: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/8.jpg)
Topology
![Page 9: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/9.jpg)
Charting
![Page 10: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/10.jpg)
Alerting
![Page 11: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/11.jpg)
What is “Normal”?
• Set a base line for normal by seeing how your
production environment responds to regular traffic
• Check for spikes in operations – peak or
unexpected load?
![Page 12: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/12.jpg)
Key Performance Indicators
• Page faults, queues and lock % may be indicators
that you need to scale up or out
• Oplog window indicates how long a secondary can
be behind the primary
• Background average flush indicates if your disks are
struggling
![Page 13: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/13.jpg)
Proactive Support
Additionally, MongoDB offers Proactive Support for Subscription Customers,
where our engineers are able to monitor your deployment and make
suggestions in order to tweak for better performance or avoid doom.
![Page 14: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/14.jpg)
MMS Backup
![Page 15: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/15.jpg)
Disasters: All Shapes & Sizes
![Page 16: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/16.jpg)
Disasters: Many Causes
![Page 17: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/17.jpg)
⅓ Companies Don’t Test Tape Backups
![Page 18: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/18.jpg)
¾ Companies Found Failures
![Page 19: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/19.jpg)
60% of Companies That Lost Data…
![Page 20: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/20.jpg)
…Closed Within 6 Months
![Page 21: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/21.jpg)
140K Drive Crashes Every Week
![Page 22: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/22.jpg)
Lost DC for 10 Days?
![Page 23: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/23.jpg)
Bankrupt Within 1 Year
![Page 24: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/24.jpg)
Risks Are Everywhere
Storage failures
Power outages
Programmer error
Hardware failures
DC failuresCyber attacks
Weather
![Page 25: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/25.jpg)
Analyzing Risk Tolerance
• Relative to any particular risk
– How much data can you afford to lose? (RPO)
– How long can you afford to be offline? (RTO)
– What price are you willing to pay to reduce risk?
• MongoDB solutions
– Replication
– Application/Infrastructure Engineering
– Backups!
![Page 26: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/26.jpg)
Minimizing Risk
![Page 27: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/27.jpg)
Replication
• Built into MongoDB, effects ops and infrastructure
cost
• Tunable durability minimizes risk in case of failure
• Automatic failover process lasts for very short
interval
• However…programmer errors will replicate almost
immediately!
![Page 28: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/28.jpg)
App and Infrastructure Engineering
Many potential solutions to ensure redunancy in
applications and infrastructure, such as:
• Multiple racks
• Multiple data centers
![Page 29: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/29.jpg)
Backups
Backing up data is one way to ensure availability and
lower risk. They require active engagement,
otherwise:
• Backups can be outdated
• Process can be slow (backup or restore)
• Isolated
• …but they are relatively inexpensive and do well at
minimizing risk
![Page 30: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/30.jpg)
MongoDB Backup Approaches
• mongodump/mongorestore
• Storage level options
• MMS Backup
![Page 31: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/31.jpg)
mongodump/mongorestore
• Run online or offline
• Oplog aware for point-in-time restores
• Filter in, filter out
• Considerations
– Data size
– Sharding
– Working set
![Page 32: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/32.jpg)
Storage Level Backup
• Copy files from data directory (e.g. /data)
• File system or block level snapshots
• Fastest way to backup/restore
• Considerations
– Journaling
– Consistency
– Granularity
– Ops coordination, point-in-time
– Snapshot storage
![Page 33: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/33.jpg)
MMS Backup
• Cloud or On-Premise
• Support for a variety of deployment systems
– RHEL, Ubuntu, CentOS, Mac, Windows
• Support for a variety of deployment types
– Single, Replica, Sharded
![Page 34: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/34.jpg)
MongoDB Backup Approaches
Mongodump File system MMS Backup
Initial complexity Medium High Low
Confidence in
Backups
Medium Medium High
Point in time
recovery of replica
set
Sort of ☺ No Yes
System Overhead High Can be low Low
Scalable No With work Yes
Consistent
Snapshot of
Sharded System
Difficult Difficult Yes
![Page 35: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/35.jpg)
MMS Backup Deep Dive
![Page 36: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/36.jpg)
Getting Started with MMS Backup
• Sign into MMS
• Install the MMS Backup agent onto one node
• Select the replica sets or sharded cluster to back up
• Start
![Page 37: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/37.jpg)
Architecture
MMS Backup
![Page 38: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/38.jpg)
MMS Backup Interface
![Page 39: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/39.jpg)
Configurable Backups
• Include/exclude Replica Sets
• Include/exclude Databases and/or Collections
• Control snapshot frequency (as low as 15 minutes)
• Control data retention (up to 1 year)
![Page 40: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/40.jpg)
Snapshot Process
• Starting with the initial sync, we rebuild your data in
our data centers and start snapshotting
• Defaults snapshots every 6 hours
• Oplog is stored for 24 hours
![Page 41: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/41.jpg)
Snapshots
![Page 42: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/42.jpg)
Restoring From Snapshot
• Select snapshot and choose delivery (SCP or
HTTPS)
• Unzip snapshot file
• Start mongod pointing to this directory
![Page 43: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/43.jpg)
Restore Interface
![Page 44: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/44.jpg)
Sharded Cluster Backups
• Balancer paused every 6 hours (default,
configurable)
• A “no-op” token inserted into oplog, mongos, config
• Oplog applied to backup shards up to token point
Provides consistent state of the cluster across shards
![Page 45: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/45.jpg)
Restoring Sharded Cluster
• Select cluster in MMS interface
• Restore from pre-built snapshot or request
checkpoint restore (15 minute window)
• Download one data file per shard and one for config
![Page 46: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/46.jpg)
MMS Backup: Simple
![Page 47: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/47.jpg)
MMS Backup: Increased Redundancy
![Page 48: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/48.jpg)
MMS Backup for MongoDB
• Simplest approach to backup
• Point-in-time restores for replica sets
• Check point restores for sharded clusters
• Customizable snapshot policy
• Two-factor auth required for restore
![Page 49: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/49.jpg)
Resources
• MMS
– mms.mongodb.com
– mms.mongodb.com/help
• MMS On-Premise
– Available for evaluation
– mms.mongodb.com/help-hosted
![Page 50: Run MongoDB with Confidence Using MongoDB Management Service (MMS)](https://reader033.fdocuments.net/reader033/viewer/2022042715/559ea1081a28abe2618b457a/html5/thumbnails/50.jpg)
Thank You
Sandeep Parikh
#mongodb #mongodbdays
@crcsmnky
Senior Solutions Architect, MongoDB