MongoDB Administration ~ Kevin Hanson

  • 1,098 views
Uploaded on

Slides for my webinar about administering MongoDB

Slides for my webinar about administering MongoDB

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,098
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
0
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • blog post\ntwitter\n

Transcript

  • 1. Administration Kevin Hanson Solutions Architect, 10gen twitter: @hungarianhc kevin@10gen.com
  • 2. http://www.mongodb.org/display/DOCS/Admin+Zone
  • 3. Supported Platforms• OS X• Linux• Solaris• Windows• FreeBSD
  • 4. The Basics ~ /bin• mongod: database server• mongo: shell• mongos: sharding router• mongodump: backup tool• mongostat: monitoring tool
  • 5. Is it working?• Logs• Netstat• Try Out the Shell
  • 6. Starting for Real• distro packages• --fork• --logpath• --quiet
  • 7. Our Agenda• Replication• Monitoring• Backups• Queries + Indexes
  • 8. Replication
  • 9. Replication & The Oplog• Replication: Use It!• Mind the Oplog Size• Consider Delayed Replication
  • 10. Replica Sets• One Primary, Many Secondaries• High Availability ~ Self Healing• Strongly Consistent• Hidden Nodes, Delayed SECONDARIES• Reading from SECONDARIES • If the PRIMARY goes down, can the remaining SECONDARIES handle the load? • Are You Okay With Less Up to Date Data? • If the answer to either question is no, stick with reading from PRIMARIES...
  • 11. Replica Sets Node 1! Node 2! Secondary! Heartbeat+ Secondary! Node 3! Primary! Replication+ Replication+• Replication is Asynchronous• Nodes Can Be in Different Datacenters• Tailing the Oplog• Monitor Secondary Delay + Oplog Size
  • 12. A Look at the Oplog
  • 13. Monitoring
  • 14. MongoDB Monitoring Service • SaaS solution providing instrumentation and visibility into MongoDB systems • Free version released • 5,000+ customers using service • Installable Version Coming
  • 15. MongoDB Monitoring Service
  • 16. Popular Monitoring Plugins• munin• ganglia• nagios• cacti
  • 17. Popular Monitoring Plugins• munin• ganglia• nagios• cacti
  • 18. iostat -x 2
  • 19. mongostat
  • 20. Backups
  • 21. Mongodump• http://docs.mongodb.org/manual/reference/ mongodump/• Binary Export• Best to Run Off Hidden Nodes / Delayed Secondaries
  • 22. Filesystem Snapshots• Journaling... • If turned on, and on the same filesystem, snapshot at will. • If not on or mounted somewhere else, fsync lock required• Use a filesystem that supports snapshots :-)
  • 23. Queries / Indexes
  • 24. Queries + Indexes
  • 25. Queries + Indexes• Note the Cursor Type (Btree vs. Basic)• Most Use-Cases: Queries Should be Indexed• Force No Table Scans • --notablescan• Indexes Should Fit in RAM• Indexes Slow Writes • Use them when you need them... • Don’t use them when you don’t...• Use the Slow Query Log
  • 26. Viewing / Killing Ops
  • 27. Download MongoDB http://www.mongodb.organd let us know what you think @hungarianhc @mongodb