I’ve been doing replica set “bootcamps” for new hires. It’s mainly focused on applying this to debug replica set issues and being able to talk fluently about what’s happening, but it occurred to me that you (blog readers) might be interested in it, too. There are 8 subjects I cover in my bootcamp: Elections CreatingContinue reading “Replica Set Internals Bootcamp Part III: Reconfiguring”
Tag Archives: replica sets
Replica Set Internals Bootcamp: Part I – Elections
I’ve been doing replica set “bootcamps” for new hires. It’s mainly focused on applying this to debug replica set issues and being able to talk fluently about what’s happening, but it occurred to me that you (blog readers) might be interested in it, too. There are 8 subjects I cover in my bootcamp: Elections CreatingContinue reading “Replica Set Internals Bootcamp: Part I – Elections”
Trying Out Replica Set Priorities
As promised in an earlier post, replica set priorities for MongoDB are now committed and will be available in 1.9.0, which should be coming out soon. Priorities allow you to give weights to the servers, saying, “I want server X to be primary whenever possible.” Priorities can range from 0.0-100.0. To use priorities, download theContinue reading “Trying Out Replica Set Priorities”
Implementing Replica Set Priorities
Replica set priorities will, very shortly, be allowed to vary between 0.0 and 100.0. The member with the highest priority that can reach a majority of the set will be elected master. (The change is done and works, but is being held up by 1.8.0… look for it after that release.) Implementing priorities was kindContinue reading “Implementing Replica Set Priorities”
Resizing Your Oplog
The MongoDB replication oplog is, by default, 5% of your free disk space. The theory behind this is that, if you’re writing 5% of your disk space every x amount of time, you’re going to run out of disk in 19x time. However, this doesn’t hold true for everyone, sometimes you’ll need a larger oplog.Continue reading “Resizing Your Oplog”
How to Use Replica Set Rollbacks
If you’re using replica sets, you can get into a situation where you have conflicting data. MongoDB will roll back conflicting data, but it never throws it out. Let’s take an example, say you have three servers: A (arbiter), B, and C. You initialize A, B, and C: $ mongo B:27017/foo > rs.initiate() > rs.add(“C:27017”)Continue reading “How to Use Replica Set Rollbacks”
Replication Internals
This is the first in a three-part series on how replication works. Replication gives you hot backups, read scaling, and all sorts of other goodness. If you know how it works you can get a lot more out of it, from how it should be configured to what you should monitor to using it directlyContinue reading “Replication Internals”
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”
Part 3: Replica Sets in the Wild
This post assumes that you know what replica sets are and some of the basic syntax. In part 1, we set up a replica set from scratch, but real life is messier: you might want to migrate dev servers into production, add new slaves, prioritize servers, change things on the fly… that’s what this postContinue reading “Part 3: Replica Sets in the Wild”