Scaling MongoDB [1st ed] 9781449303877, 1449303870, 9781449304126, 1449304125, 9781449303211

Create a MongoDB cluster that will to grow to meet the needs of your application. With this short and concise book, you&

358 75 3MB

English Pages 49 Year 2011

Report DMCA / Copyright

DOWNLOAD FILE

Scaling MongoDB [1st ed]
 9781449303877, 1449303870, 9781449304126, 1449304125, 9781449303211

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

Polecaj historie