I have a problem with the Pets vs Cattle analogy. The Pets portion I think hold up pretty well, representing a personal investment in your physical server, something that you care for and name. Something specific that you check on every day. But when using Cattle for bulk management of VMs and containers, I have some issues.
Viktor Farcic illustrates that in his piece on configuration management tools. While certainly most people wouldn’t have the same sort of attachment to cattle as to pets, they’re still a finite resource from which value is derived. In that case, I wouldn’t treat cattle exactly like a VM. You can’t simply “destroy it and create a new one”. Certainly you’re more proactive in managing a herd, and individual cattle are often lost to make sure nothing happens to the greater whole, but it’s not quite so simple.
My preferred analogy is Scrabble vs. Words with Friends. Scrabble is an event, you plan it. You engage with a physical game of Scrabble and you (should) only have one game going at a time. Words with Friends, you start and stop games whenever the need arises to dismiss boredom. You can have dozens of games going concurrently with no more inconvenience than one. Plus I don’t have to think about cows dying whenever a VM crashes.
Viktor does make some interesting points about how we manage this new Words with Friends virtual world. The configuration management landscape is littered with legacy tools that were great for managing your physical servers, but are either inefficient or unworkable when things are moved to the cloud. He has particularly harsh words for Puppet. Terraform has the benefit of working across providers, and has simpler configuration compared to something like Amazon’s CloudWatch.
Enterprise IT is still figuring out how exactly to manage cloud infrastructure. We’re not in the infancy, probably closer to a prickly adolescence. Looking into this piece, it did strike me how valuable a good metaphor can be in enterprise IT. I’ve seen more than a few post over the year that when the first time someone heard the “Pets vs Cattle” comparison, a light went on in their head. This totally changed how they approached management. I find this fascinating because it’s an instance of the technology standing completely still, but our understanding of it radically altering how we mediate it.
Technology Conversations comments:
Configuration management tools have as their primary objective the task of making a server always be in the desired state. If a web server stops, it will be started again. If a configuration file changed, it will be restored. No matter what happens to a server, its desired state will be restored. Except, when there is no fix to the issue. If a hard disk fails, there’s nothing configuration management can do.
The problem with configuration management tools is that they were designed to work with physical, not virtual servers. Why would we fix a faulty virtual server when we can create a new one in a matter of seconds. Terraform understands how cloud computing works better than anyone and embraces the idea that our servers are not pets anymore. The are cattle. It’ll make sure that all your resources are available. When something is wrong on a server, it will not try to fix it. Instead, it will destroy it and create a new one based on the image we choose.
Read more at: To Terraform Or Not To Terraform: Configuration Management In AWS (And Other Cloud Computing Providers)