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 ...

Get Capistrano and the Rails Application Lifecycle now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.