kennygorman.com

The love of Data, Database Engineering, Architecture, Entrepreneurship, and other assorted bits

MongoDB: Lagged Replica with Replica Sets

24 August 2010

In an enterprise database architecture, it’s very common to create a standby or replica database with a ‘lag’ in it’s state relative to the primary. Operations applied to the primary are not seen on the replica for some amount of pre-determined timeframe. The purpose of such an architecture is to protect yourself against an accidental deletion, code bug, corruption, table drop, etc. If something really bad happens to the primary it may replicate that horrible thing before someone can step in and correct it. A lagged replica solves this problem by giving some amount of time to stop the replica from ingesting the change, and allowing an operator to use the clean data to fix the primary or even roll back to a earlier image.

Read More

OSX + Bit.ly

09 August 2010

A couple months ago I didn’t even know what bit.ly was, I was using tinyurl for everything. Sheez, how web 1.0 of me. But after bit.ly started using MongoDB for it’s backend services, I started using it for url shortening. I just love the idea of web services, and bit.ly was crying out for a nice OSX implementation. I wanted full OSX compatibility instead of having to bring up a web browser each time I needed to shorten an url. This Automator script turned that all around for me. Now I use bit.ly for almost every url I ever copy/paste.

Read More

Data clustering in MongoDB using embedded docs

25 June 2010

I wrote a while ago about how to cluster data to save cash. This post was geared towards relational stores. But in reality, the technique is applicable to any block store on disk. To recap, the premise is simple. When you run a query for some amount of data, you want to minimize I/O as much as possible. Even if the result is in cache, you still want to reduce logical I/O. See my post for examples.

Read More

WordPress 3.0

21 June 2010

On June 17th, WordPress 3.0 was launched. I decided to take the plunge and upgrade. There are just so many compelling features it’s hard not to. Part of the new release is the twenty ten theme with some pretty exciting features including a new menu system that I hope to take advantage of as well as featured images. I decided to go ahead and use it, and thus the new look.

Read More