This lesson presents a mindset that is helpful if we’re working in the cloud. If you are new to systems administration in general, this mindset will be of benefit to you. For veterans of the trade, it might be much harder to switch to this cloud mindset because some things should be done differently than they were in the past.

Pets and cattle

Have you ever worked in a place where servers had names like morpheus, neo, or trinity?

If yes, how were they treated by their system administrators? Probably with care and love, and they were upgraded, patched, and fixed if they had issues. If they were to be retired, there might even be a goodbye ceremony.

These servers were pets. Of course you would care for your pet, wouldn’t you?

Now consider a different scenario: You have servers web01, web02, and web03. They are managed by your cloud provider. One of them has issues. What do you do?

You probably clicked on terminate and created a new one because these servers are cattle. Yes, we want them to be healthy and secure, but if one of them has issues, well, it will be retired.

This analogy is very important to understand how we work in the cloud. We are farmers and work with cattle at scale. We can’t (and don’t want) to expend time to cater to each individual. Servers and instances are our cattle, and we make sure the herd is healthy and profitable with the least resources invested.

There are a few core ideas of this mindset:

  • Resources are easy to replace and easy to acquire, so we don’t waste time fixing the broken ones.

  • We prefer a bunch of similar resources over unique resources for each job. We keep as much common base between them as possible so we don’t spend time on individual configurations.

  • In the best case, we can create new servers in a few minutes with a click of a button. There’s no manual installation of software, no SSH keys to deploy, and no network configuration to apply.

  • We have prepared system images. Everything is already set up and it is just loaded onto the machines (or instances in the case of EC2). These images include the latest updates, software, and necessary configuration. They are built using automation.

The twelve-factor app and cloud native

There are two similar concepts that go in the same direction as the pet vs. cattle analogy—the twelve-factor app principle and the cloud-native approach.

Get hands-on with 1200+ tech skills courses.