There is this concept that has been floating around for a while which says you should treat your servers as cattle, not pets. I came across another version of this analogy that I wanted to post, since it doesn’t seem to have been recorded anywhere but has been mentioned in presentations. But before I get to that, let us look at what this phrase means, and where it came from.
Definition
When we talk about servers at pets, we are referring to the fact that we need to care for them. We feed and water them fancy meals. We give them a name. When they are sick, we nurse them back to health. They are important to us. They are unique snowflakes, and we don’t want anything to happen to them.
Cattle, on the other hand, are commodities. They don’t have names and are often just numbered. If they get hurt or sick, we put them down and replace them. We treat them all the same, and they are replaceable.
This is how we should treat our servers. If we have pet servers, we have that box in the server room. We patch it, we fix things when they break. We remote in to make changes so that it keeps running correctly.
If we have cattle servers, they are VMs. They are easy to destroy and rebuild from scratch. In the cloud, this VM process is much easier and faster to do, so we should strive to do it.
The problems really come when you treat your VM or cloud servers as pets, instead of automating the ability to throw away and rebuild. Don’t waste your time caring for them, just replace them.
Origin
The internet tells me that a Pets vs Cattle analogy dates back to 1999 in an article by David Gelernter(point 30), but this is talking about naming files in a file system, and not server management.
The attribution to servers seems to be given to Bill Baker according to this 2013 article where Joshua McKenty phrases a pets vs cattle argument in relation to using OpenStack as “a system for managing your servers like cattle”:
The servers in today’s data center are like puppies – they’ve got names and when they get sick, everything grinds to a halt while you nurse them back to health. Piston Enterprise OpenStack is a system for managing your servers like cattle – you number them, and when they get sick and you have to shoot them in the head, the herd can keep moving. It takes a family of three to care for a single puppy, but a few cowboys can drive tens of thousands of cows over great distances, all while drinking whiskey. Joshua McKenty
According to the internet, this is recognised as the origin of the modern phrase. As for the referenced Bill Baker quote, I couldn’t find anything written down to refer to.
The big reveal
I said I would give you an alternative analogy to use, so here it is:
If you are presenting like I was in India, don’t use pets vs cattle as the slide. Over there they don’t talk about pets and cattle in terms of the virtualisation and, you know, shooting the cattle. Don’t do that alright? Definitely, definitely use fine china and paper plates, Ok? That’s what they prefer over there. Anthony Rees
So there you go. Fine China vs Paper Plates. A nice alternative for anywhere you have people with a sensitivity to shooting cattle. I was lucky to find this again because of a tweet from Katie McLaughlin (@glasnt). Again, not sure if these guys at OpenStack are the origin of this phrase specifically, but this is the first recorded occurrence of it that I have come across.