“Scaling MongoDB” Update

In the last couple weeks, we’ve been getting a lot of questions like: (no one asked this specific question, this is just similar to the questions we’ve been getting) I ran shardcollection, but it didn’t return immediately and I didn’t know what was going on, so I killed the shell and tried deleting a shardContinue reading ““Scaling MongoDB” Update”

A Short eBook on Scaling MongoDB

I just finished a little ebook for O’Reilly: Scaling MongoDB. I’m excited about it, it was really fun to write and I think it’ll be both fun and instructive to read. It covers: What a cluster is How it works (at a high level) How to set it up correctly The differences in programming forContinue reading “A Short eBook on Scaling MongoDB”

How to Choose a Shard Key: The Card Game

Choosing the right shard key for a MongoDB cluster is critical: a bad choice will make you and your application miserable. Shard Carks is a cooperative strategy game to help you choose a shard key. You can try out a few pre-baked strategies I set up online (I recommend reading this post first, though). Also,Continue reading “How to Choose a Shard Key: The Card Game”

Scaling, scaling everywhere

Interested in learning more about scaling MongoDB? Pick up September’s issue of PHP|Architect magazine, the database issue! I wrote an article on scaling your MongoDB database: how to choose good indexes, help handle load using replication, and set up sharding correctly (it’s not PHP-specific). If you prefer multimedia, I also did an O’Reilly webcast onContinue reading “Scaling, scaling everywhere”

Return of the Mongo Mailbag

On the mongodb-user mailing list last week, someone asked (basically): I have 4 servers and I want two shards. How do I set it up? A lot of people have been asking questions about configuring replica sets and sharding, so here’s how to do it in nitty-gritty detail. The Architecture Prerequisites: if you aren’t tooContinue reading “Return of the Mongo Mailbag”

Sharding and Replica Sets Illustrated

This post assumes you know what replica sets and sharding are. Step 1: Don’t use sharding Seriously. Almost no one needs it. If you were at the point where you needed to partition your MySQL database, you’ve probably got a long ways to go before you’ll need to partition MongoDB (we scoff at billions ofContinue reading “Sharding and Replica Sets Illustrated”

With a name like Mongo, it has to be good

I just got back from MongoSF, which was awesome. Over 200 Mongo geeks, three tracks, and language-specific workshops all day. The highlight, for me, was Eliot Horowitz’s talk on sharding. He set up a MongoDB cluster of 25 large EC2 instances and started hammering them. He pulled up an incredibly snazzy sharding GUI (okay, IContinue reading “With a name like Mongo, it has to be good”

There must be 50 ways to start your Mongo

This blog post covers four major ones: Single server Master-slave Replica pairs Sharding Feel free to jump to the ones that interest you (for instance, sharding). Just start up a database, Ace Starting up a vanilla MongoDB instance is super easy, it just needs a port it can listen on and a directory where itContinue reading “There must be 50 ways to start your Mongo”

Sharding with the Fishes

Sharding is the not-so-revolutionary way that MongoDB scales writes (it’s very similar to techniques described in the Big Table paper and by PNUTS) but many people are unfamiliar with what it is and how it works. ┬áIf you’ve seen a talk on MongoDB or looked at the website, you’ve probably seen a diagram of shardingContinue reading “Sharding with the Fishes”