Why should we consider using cattle computing instead of kittens for business applications? Why are cats sometimes pure evil and when should we leave kittens computing?
What’s the difference?
People like pets, especially sweet kitties which are small, fluffy, with cute eyes. We give them names. We feed them and they will die without our care. This situation is similar to our applications. Teams of programmers develop applications every day, create hand-made build and deploy this build on a server. Usually, they do this so often that they name the application server. They treat them like pets that need care.
Besides, we have cattle. People keep cattle for milk and meat; we don’t have a problem with killing them. We give them serial numbers. We think about the herd, not about a single animal. We have to treat our applications in exactly the same way. Cattle computing in the big picture is a synonym for cloud computing; architecture evolved to a herd of containerization in order to increase releases and to reduce downtime.
Why should we manage our application like a herd of cattle?
There is a limit on the number of kitties we can take care of. Nowadays we have a lot of tools to manage our infrastructure like Jenkins or Kubernetes; we can do this automatically instead of manually. This is a really important step forward in the work culture and increasing productivity. Hand-made deploying of the applications takes too much time and it is too expensive for organizations.
Sometimes a kitten dies despite our care, and when the kitten dies, we will cry and the client will be really unhappy. We should be able to deal with this because no matter how optimistic your code is, the system is always exposed to failure, for example, network failure or overload server. When we doing kitties computing we can have system downtime because we want to add more resources and restart the server. In cattle computing, everything is a little bit different because everything is handled automatically when we need more resources, we can manage this elastically. If a unit doesn’t answer, we can kill it and change the route to another instance. It’s easier to mix different kinds of technologies; it’s like buying a new breed for our herd.
Change the mindset
It’s only a quick overview. Shifting mindset to cattle computing is the first important step to create a better elastic product, tailored to the company’s customers. It promotes culture “devops” and breaks with old fashioned engineering. And I know it’s hard to change the way of thinking of not just one team but of a whole organization. However, it will pay off in the future.