Pets vs. Cattle

I was at SUSECon 2015 in Amsterdam a few weeks ago, which, aside from being a great conference, was an opportunity to actually interact with my colleagues in person for a change. So I finally got to meet Adam Spiers after working-ish with-ish him for at least three-ish years (strictly speaking we’re on different-ish teams), and one of the first things he asked was for my take on the Pets vs. Cattle cloud computing metaphor, because in addition to knowing my way around high availability, distributed storage and cloud foo, my wife and I actually do farming which means I might be qualified to have an opinion on the matter.

The Pets vs. Cattle thing is about how you manage your systems (i.e. servers/VMs). The idea is that we give our pets individual names, lovingly hand raise and care for each one, and we take them to the vet when they get sick. Cattle on the other hand are numbered in some fashion, are treated as if they’re mostly identical, and if one gets sick you shoot it and get another (surely the beef and dairy industry wouldn’t function efficiently otherwise).

If you apply that philosophy to computer systems, a pet is a server (or VM instance) that was set up “just so”, and that you can maybe scale up, and redeploy with some difficulty elsewhere if disaster strikes. With the cattle approach you’d be looking at scaling out with multiple identical disposable instances that can be replaced or redeployed semi-instantaneously if the data centre suddenly catches fire.

In my opinion this is actually a good way of conceptualising how our systems are managed, and it provides a useful framework from which to think about scalability, resilience, disaster recovery, and risk management.

But it’s not how I treat my animals. So while I understand the metaphor and its utility, I actually don’t like it.

We don’t have a huge farm. Right now we have five pigs, six sheep, a handful of cockerels, about twenty adult hens and forty-odd young chicks. Over the last few years we’ve raised some hundreds of chickens, which have had varied fates. Many found new homes with other peoples’ flocks. Many were delicious (some are still in the freezer). Others became unplanned snacks for the local wedge-tailed eagle and grey goshawk populations. You might say our chickens come close to fitting the cattle part of the metaphor, but it’s more complicated than that.

When you raise chickens, occasionally you get one that’s just not going to make it. Sometimes it dies by itself in short order, before you really know there’s any trouble. Other times you know the chick is in a bad way and you have a choice of letting it sit around suffering until it dies, or offing it yourself. There’s not a lot you can do for an ill young bird other than providing warmth, food and water, and you can’t ever know if it’s going to get better. One chick I nursed for most of a day, only to have it lie down and die in my hand. Another chick, late out of the egg, smaller and less steady on its feet than the others was fine after some extra care. A third either hadn’t completely absorbed the yolk or otherwise had an odd deformity so was straight for the knife, the compost heap, and thence another turn of the wheel.

We treat our adult birds similarly – we keep a close eye on them, and if one might be getting crook we try to see what we can do to help. Sometimes that’s a night or two in a cage in the house, sometimes it’s a trip to the vet. An eagle tore an enormous gash across the back of one of our hens, but we paid to have her stitched up and she’s still with us. Another one was torn right down to and part way through the spine, and incredibly was still walking and clucking. I had to kill her though – we can’t fix an injury like that.

So like I said, it’s complicated. In situations where the metaphorical cattle farmer would always kill their animals, we sometimes kill them and sometimes nurse them back to health. The Pets vs. Cattle metaphor doesn’t work for me because I don’t treat my “cattle” the way the metaphor expects me to. My animals are actually my friends, but I still eat them. Incidentally, Adam expressed some concern about remaining my friend after I mentioned this to him.

The other problem with the Pets vs. Cattle metaphor is that it only works in cultures that treat cattle the way they’re generally expected to be treated in Western civilisation. Florian Haas recounted a tale of a hurried “cattle” substitution (pet dogs vs. stray dogs) during a cloud computing presentation in India, for example.

So what can we learn from the Pets vs. Cattle metaphor?

  1. It can be a useful framework for thinking about allocating computing resources.
  2. The metaphor might be irritating if you’re actually a farmer.
  3. The metaphor is probably outright offensive if you’re a Hindu.
  4. Metaphors often tell you more about the culture of the people who use them than they do about the topic at hand.
  5. The modern Western mass market beef and dairy industry doesn’t treat its cattle with appropriate respect.

3 thoughts on “Pets vs. Cattle

Leave a Reply

Your email address will not be published. Required fields are marked *