MogileFS and race condition

As any readers of the iContact blog may have learned, MogileFS has become an integral part of our infrastructure at iContact. Rather than store the bodies of messages in our database, we moved them to a quick&dirty storage method in our infrastructure long ago. This method was essentially a cheap WebDAV server and on each STORE command it would write to two backend servers and issue a GET from only one. About a month ago, we migrated most of our messages away from this older, less scalable method to our newer MogileFS backend.

Our MogileFS setup allows the disk space on each web server (normally unutilized) to form a cheap storage node, and make use of space that would otherwise go entirely unused.

On Monday 1/21 the database servers behind MogileFS paged with too many connections, which leads to Mogile going very slowly for a while, and sometimes requiring a restart of some of the nodes.

This database issue cascaded into us asking our Mogile client for item A, but receiving item B in response…
Continue reading MogileFS and race condition

Related posts

PHP on the Backend (part 2)

To run the class I posted yesterday, I typically use a class called DaemonRunner. This class sets up for proper signal handling, and ‘executes’ the class extended from Daemon.

declare(ticks=1);

class DaemonRunner {
public static function exec($className) {
$argv = $_SERVER['argv'];
. . . → Read More: PHP on the Backend (part 2)

PHP on the Backend

PHP (or any language for that matter) can just as easily be used as a daemon as on the web. This can be especially useful when solving problems that can’t “complete” in less than 500 ms which one shoots for on the web. As you write an application to handle things such as . . . → Read More: PHP on the Backend