A lot of our users upgrade from single-node databases to replica set clusters without fully understanding how their driver, and therefore their application, will react to failover. In fact, we get so many questions about best practices with MongoDB replica sets that we thought it could be cool to host a replica set that anyone can connect to using their MongoDB driver of choice.
Today we invite you to check out flip-flop, a MongoDB Replica Set demonstration and experimentation service. The flip-flop service consists of:
- A live replica set that fails-over (i.e. “flips” and “flops”) every 60 seconds. This cluster is always running and available to all at the following address:
- A real-time visualization of the cluster flippin’ and floppin’ with streaming database server logs
- A set of example client scripts (currently just in Python) that simulate client interactions with the cluster that you can use as a starting point for your own experimentation
The flip-flop service is also great for those of you working on third-party drivers. Gustavo Niemeyer, author of mgo, a MongoDB driver for the Go language, told us flip-flop helped him find and quickly fix a small bug in the driver: “This is brilliant. I actually managed to find an edge case coding a trivial example against it due to the timing of the server re-election.” Pretty cool!