January 21, 2010

Perforce 2009.2: High Availability & Disaster Recovery: Closer to Commodity


That building in the background is (was?) my data center!

That building in the background is (was?) my data center!

With 2009.2, achieving High Availability (HA) and Disaster Recovery (DR) objectives with Perforce made one big step away from the realm of "advanced custom solution" and toward commodity solutions.

Over the years, Perforce customers have deployed Perforce to meet  requirements. Having become familiar with the Perforce journaling mechanism, they found ways to duplicate Perforce metadata updates in real-time to a separate, replicated copy of the Perforce databases. This approach made possible deployment options such as "hot spare" standby/backup servers, warm spare DR servers, and read-only replica servers.  Some custom solutions were presented by customers at Perforce user conferences over the years.

The p4jrep and later the P4jtail utilities evolved in the Public Depot. These utilities worked in some environments, but had limitations that kept them from being widely applicable.   Windows environments aren't supported, they don't work with Unicode-enabled servers, and aren't "officially" supported by Perforce Technical Support. Enter Perforce 2009.2. Perforce 2009.2 offers new tools to simplify and commoditize HA/DR solutions: p4 replicate, and p4 export. The p4 export command handles raw metadata replication, and provides capabilities such as filtering -- useful if you want to, for example, populate a read-only replica stripped of db.have entries. The p4 replicate command can be thought of as a wrapper to p4 export that handles the classic "full replication" scenario used for HA/DR solutions.

These new features are part of the core Perforce server and are fully supported.  They provide a reliable, supported, cross-platform solution for replicating Perforce metadata.  If you're doing DR you'll still need to replicate your versioned files.  Ubiquitous tools like rsync (Linux) or ROBOCOPY (Windows) suffice in many environments.  For some environments, more sophisticated technologies such as block-level replication solutions and WAN replication technologies are brought to bear to keep versioned files in sync on remote replicas.

In Consulting, we've seen a lot of interest in HA/DR solutions in the past year or so.  With new tooling available in 2009.2, you can bet you'll hear more about HA/DR in the future.  You'll hear more from me, and maybe something at the Perforce User Conference in London in 2010.  See you there, maybe?