O'Reilly logo

Capistrano and the Rails Application Lifecycle by Tom Mornini, Marc Loy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

It’s All About the Farm

When planning for deployment with Capistrano, it’s important to understand the concept of a farm. A farm is a group of systems (physical machines or VPS instances) that together serve an application. A farm is able to provide greater reliability and higher throughput at a lower cost than a single system can provide. A farm accomplishes these increases by distributing tasks to multiple systems, using hardware or software load balancers. That way, if a single system goes offline, the application continues to operate. The individual systems in the farm do not need to be highly reliable.

The general term for this architecture is share-nothing and has proven to be a very effective means of deploying large-scale systems on commodity hardware. Ideally, the systems should be as independent as possible, with respect to both hardware and software. High reliability generally implies high cost. Any piece of the system that is shared is generally more cost effective, but it reduces the reliability of the farm. For instance, if the farm shares a single power source, then if the power goes out, the entire farm will lose power at once. Similarly, if the entire farm shares a file server (or database server), then that system becomes a single point of failure. Shared, reliable storage in the form of a SAN (Storage Area Network) has recently become much more affordable than in the past and proves that rules are, indeed, made to be broken.

Farms and Uptime

A true share-nothing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required