Richard Bucker

Cattle, Chicken, Goats, Pigs, Not Pets

Posted at — Jan 27, 2022

There is something to be said about and for “not pets”. In today’s tech world it evolves as the tools change. To be clear it’s all the same just repackaged.

“Cattle not pets” –Bill Baker (not confirmed)

Loosely, a pet is a thing that you keep around for a long time. You tweak it here and there. Teach it new tricks. And when it dies you mourn the loss and getting back to the same place it difficult because not all machines are the same and we might skip some steps that we forgot or never recorded. A desktop or laptop computer is commonly a pet. In my universe I work on different languages, operating systems, environments that quite often my pets become unusable. The loss to productivity and potential harm to the customer is huge.

So along came cattle. The idea that when you develop program that the program compiles and executes in a sandbox such that the environment is self contained. Later vendors started adding security, networking, disk and so on. The idea further developed to imply that cattle could be killed off and replaced with a new cow at any time whether that was operating system updates or application updates. It was easier/cheaper to build a new one than change an old one.

One advantage in docker is also it’s kryptonite… Docker started by being a container around an application or service. Over time it became possible to deploy an entire operating system. Hosting an OS in a docker container is an interesting idea because you can model your dependencies however deploying an entire operating systems means that you’re going to waste energy and add dependencies and increase the attack surface.

Docker is best used when it’s more jail than vmm.