MongoDB Administration ~ Kevin Hanson

1,952 views

Published on

Slides for my webinar about administering MongoDB

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,952
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

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
  • MongoDB Administration ~ Kevin Hanson

    1. 1. Administration Kevin Hanson Solutions Architect, 10gen twitter: @hungarianhc kevin@10gen.com
    2. 2. http://www.mongodb.org/display/DOCS/Admin+Zone
    3. 3. Supported Platforms• OS X• Linux• Solaris• Windows• FreeBSD
    4. 4. The Basics ~ /bin• mongod: database server• mongo: shell• mongos: sharding router• mongodump: backup tool• mongostat: monitoring tool
    5. 5. Is it working?• Logs• Netstat• Try Out the Shell
    6. 6. Starting for Real• distro packages• --fork• --logpath• --quiet
    7. 7. Our Agenda• Replication• Monitoring• Backups• Queries + Indexes
    8. 8. Replication
    9. 9. Replication & The Oplog• Replication: Use It!• Mind the Oplog Size• Consider Delayed Replication
    10. 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. 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. 12. A Look at the Oplog
    13. 13. Monitoring
    14. 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. 15. MongoDB Monitoring Service
    16. 16. Popular Monitoring Plugins• munin• ganglia• nagios• cacti
    17. 17. Popular Monitoring Plugins• munin• ganglia• nagios• cacti
    18. 18. iostat -x 2
    19. 19. mongostat
    20. 20. Backups
    21. 21. Mongodump• http://docs.mongodb.org/manual/reference/ mongodump/• Binary Export• Best to Run Off Hidden Nodes / Delayed Secondaries
    22. 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. 23. Queries / Indexes
    24. 24. Queries + Indexes
    25. 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. 26. Viewing / Killing Ops
    27. 27. Download MongoDB http://www.mongodb.organd let us know what you think @hungarianhc @mongodb

    ×