You are previewing MongoDB High Availability.
O'Reilly logo
MongoDB High Availability

Book Description

Design and implement a highly available server using the latest features of MongoDB

In Detail

MongoDB is one of the pioneers in implementing the NoSQL concept by using "Document" as the infrastructure to save and restore data from a database. Using MongoDB in high pressure situations needs a predefined plan, and this book with its step-by-step approach can help you to make a highly available MongoDB server using the latest features.

Starting with the basic concepts and their implementation, you will study real-world use cases which will help you understand the practical aspects of MongoDB. Each step contains an in-depth presentation and several screenshots. This book teaches you all the tips and tricks to make a highly available MongoDB server using different clustering solutions. This book has a perfect balance of concepts and their practical implementation along with solutions to make a highly available MongoDB server in a production environment and under high throughput with clear instructions and guidance.

What You Will Learn

  • Understand MongoDB's server structure and processes
  • Get to grips with using MongoDB solutions to cluster your server
  • Utilize sharding and set up a sharding server architecture
  • Improve server response time using different solutions
  • Diagnose, monitor, and troubleshoot a MongoDB server
  • Discover the replica set and how it works
  • Grasp how to select a suitable sharding key
  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. MongoDB High Availability
      1. Table of Contents
      2. MongoDB High Availability
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      8. 1. Understanding the MongoDB Architecture and Processes
        1. Utilizing MongoDB components
          1. Understanding the core components
            1. Understanding mongod
            2. Utilizing mongo
            3. Learning about mongos
        2. Import and export tools
          1. Using import and export tools
            1. Understanding mongodump
            2. Utilizing mongorestore
            3. Learning about bsondump
            4. Understanding mongooplog
          2. Using data tools
            1. Understanding mongoexport
            2. Utilizing mongoimport
        3. Diagnostic tools
          1. Learning about mongostat
          2. Utilizing mongotop
          3. Understanding mongosniff
            1. Utilizing mongoperf
          4. File storage (GridFS) tools
            1. Understanding mongofiles
        4. Summary
      9. 2. Understanding MongoDB's Failures and Limitations
        1. Understanding the limitation of a 32-bit version of MongoDB
          1. The Unix limitation
        2. Failover in replica set
        3. Sharding the configuration server failure
        4. Understanding database locks
        5. Summary
      10. 3. Clustering in MongoDB
        1. Sharding in MongoDB
          1. Understanding replication
          2. Learning about a replica set
        2. Vertical and horizontal scaling
        3. Utilizing sharding
        4. Implementing clustering in MongoDB
          1. Learning about shards
          2. Understanding the configuration server
          3. Utilizing the mongos or query router
        5. Summary
      11. 4. Utilizing a Replica Set
        1. The purpose of replication
        2. Understanding replication
          1. Understanding asynchronous replication
        3. Architecture of replica sets
        4. Understanding oplog
        5. Learning about replication and oplog changes
          1. Understanding nodes' failover
          2. Understanding the replica set election process
          3. Different forms of secondary members
            1. Using the priority 0 member
            2. Utilizing hidden members
            3. The delayed member
        6. Understanding the arbiter node's role
        7. Summary
      12. 5. Replica Set in Action
        1. Overview of replica sets
        2. Before deploying a replica set
        3. Configurations of a replica set
        4. Deploying a replica set
          1. Adding a new member
          2. Removing a member
          3. Adding an arbiter
        5. Failover testing
        6. Summary
      13. 6. Understanding the Concept of Sharding
        1. Understanding scaling
        2. Learning about sharding
          1. Understanding sharding modules
          2. Utilizing a sharding key
            1. Understanding range-based keys
            2. Understanding hash-based keys
          3. Understanding the splitting and balancing processes
        3. Summary
      14. 7. Sharding in Action
        1. Preparing the environment
        2. Implementing configuration servers
        3. Configuring a mongos instance
        4. Managing a mongos instance
        5. Adding shards to mongos
        6. Enable sharding
        7. Summary
      15. 8. Analyzing and Improving Database Performance
        1. Understanding profiling
          1. Utilizing profiling
          2. Enabling and configuring the profiler
          3. Using the profiler log
        2. Introducing other analytics methods
        3. Introducing indexes
          1. Using projection
          2. Limiting the number of records returned
          3. Reviewing the hardware considerations
        4. Summary
      16. 9. Migrating Instances and Reducing Downtime
        1. Understanding the migration process
        2. Migrating a replica set in action
          1. Explaining the migration process
          2. Adding a new machine
          3. Understanding replica set election problems
          4. Removing the existing machine
        3. Migrating a standalone mongod instance
          1. Converting an existing instance to a replica set
          2. Moving dbpath to the new server
        4. Summary
      17. 10. Monitoring and Troubleshooting the Database
        1. Understanding monitoring strategies
          1. Utilizing the profiling feature
          2. Utilizing the built-in reporting tools
            1. mongotop
            2. mongostat
          3. Enabling the web-based console
          4. Understanding the reporting commands
            1. Executing a command
              1. Utilizing the dbStats command
              2. Utilizing the collStats command
              3. Understanding the serverStatus command
              4. Utilizing the replSetGetStatus command
          5. Using database logs
        2. Introducing web-based utilities
          1. Utilizing the MMS monitoring service
          2. Understanding Scout
          3. Utilizing server density
          4. Utilizing LogicMonitor
        3. Introducing FusionReactor
        4. Introducing self-hosted utilities
        5. Summary
      18. Index