You are previewing Scaling MongoDB.
O'Reilly logo
Scaling MongoDB

Book Description

Learn how to create large MongoDB clusters! Shows how to use MongoDB efficiently for very large databases. Covers sharding, cluster setup, and administration.

Table of Contents

  1. Scaling MongoDB
  2. Preface
    1. Conventions Used in This Book
    2. Using Code Examples
    3. Safari® Books Online
    4. How to Contact Us
  3. 1. Welcome to Distributed Computing!
    1. What Is Sharding?
  4. 2. Understanding Sharding
    1. Splitting Up Data
      1. Distributing Data
        1. One range per shard
        2. Multi-range shards
      2. How Chunks Are Created
        1. Example
        2. Sharding collections
    2. Balancing
      1. The Psychopathology of Everyday Balancing
        1. On changing chunk size
    3. mongos
    4. The Config Servers
    5. The Anatomy of a Cluster
  5. 3. Setting Up a Cluster
    1. Choosing a Shard Key
      1. Low-Cardinality Shard Key
        1. Keys that this rule applies to
        2. Exceptions to the rule
        3. Data center awareness
      2. Ascending Shard Key
        1. Keys that this rule applies to
        2. Exceptions to the rule
      3. Random Shard Key
      4. Good Shard Keys
        1. Coarsely ascending key + search key
        2. FAQ
        3. The general case
        4. What shard key should I use?
    2. Sharding a New Collection
      1. Quick Start
      2. Config Servers
      3. mongos
      4. Shards
        1. Limiting shard size
      5. Databases and Collections
    3. Sharding an Existing Collection
      1. Preparing Your Collection for Sharding
      2. Running shardcollection
        1. For Large Data Sets
    4. Adding and Removing Capacity
      1. Removing Shards
      2. Changing Servers in a Shard
  6. 4. Working With a Cluster
    1. Querying
    2. “Why Am I Getting This?”
      1. Counting
      2. Unique Indexes
      3. Updating
    3. MapReduce
      1. Temporary Collections
  7. 5. Administration
    1. Using the Shell
      1. Getting a Summary
      2. The config Collections
      3. “I Want to Do X, Who Do I Connect To?”
    2. Monitoring
      1. mongostat
      2. The Web Admin Interface
    3. Backups
      1. Config Server Backups
    4. Suggestions on Architecture
      1. Create an Emergency Site
      2. Create a Moat
    5. What to Do When Things Go Wrong
      1. A Shard Goes Down
      2. Most of a Shard Is Down
      3. Config Servers Going Down
      4. Mongos Processes Going Down
      5. Other Considerations
  8. 6. Further Reading
  9. About the Author
  10. Copyright