The cloud comes along with new approaches to application architecture. One of those is described by the “pet vs. cattle” analogy.
In the old way of doing things, we treat our servers like pets, for example Bob the mail server. If Bob goes down, it’s all hands on deck. The CEO can’t get his email and it’s the end of the world. In the new way, servers are numbered, like cattle in a herd. For example, www001 to www100. When one server goes down, it’s taken out back, shot, and replaced on the line.
Judgement depends on perspective. Humans' relation to animals is a good example: We treat our beloved dogs (or cats) like friends, we hug them, we spend money purchasing accessories, vaccinations, toys. When we move, we take them with us, perhaps with a specialized relocation service. And when they die, we mourn and feel like we lost an important part of our life. On the other hand, we have a whole industry occupied with the efficient killing and slicing of animals into small packets. When we eat a perfect steak, we hardly think about the name of the donator. And it's not only because pets would be edible and cattle is not – take rabbits for example.
How is this related to cloud computing?
Just as society reconsiders its approach to meat consumption, we likewise need to revise common perceptions when we move IT systems to the cloud. We are used to think of our servers like they were our pets: we watch after them regularly and when they are sick, they need to get all of our attention.
But what we really want is that things just work. We want our infrastructure to run like a smooth industrial machinery. You do not need to worry about a single server anymore, but you provide a template that describes how a member of your herd should look like. The cloud stack is the shepherd who guards the flock – when a node is lost or unresponsive, it is removed and replaced with a new one. The herd remains intact and serves its purpose.
Following the cattle approach means to say goodbye to the perception of a virtual machine as a persistent entity. It might be lost anytime and we do not care. All we care for is our data – which is stored in a replicated database or block storage (which might be built as a herd of its own). The processing instance is just an anonymous node which might be gone at any moment.
Let's change everything?
New Freedoms, new responsibilities – the cloud moves awareness for high-availability to the application level. Some applications are more suitable for the cattle approach than others. Over time, applications need to be (re-)designed to embrace the cattle approach and thus reap the benefits of a scalable, high-available cloud infrastructure. While meshcloud embraces the cattle approach, we also provide a special pet workload flavor for migration scenarios – which is more like a virtualized persistent server ("Bob") rather than a faceless bot node ("www001").
For deployment setup, a proper spread of nodes about availability zones is necessary to ensure the herd browses different meadows and does not starve completely when one of them becomes deserted. If you distribute nodes over three availability zones and one goes down, only a third of the nodes becomes unavailable and the others can scale up to process the additional load. This is also useful e.g. to easen upgrade or migration scenarios. Also, not all applications require high-availability. For occassional (non-transactional) data processing, the cloud provides an inexpensive and comfortable option, by automating creation, execution and deletion of instances whenever they are necessary.
Where to go from here?
meshcloud builds on OpenStack (IaaS) and Cloud Foundry (PaaS) providing an open-source environment which supports infrastructure automation, but avoid putting your infrastructure into the proprietary technology of a cloud provider. Our federation of service providers offers many locations where you find the same environment to build your projects. In fact, meshcloud enables you to focus on your IT projects and integrates different locations and services like IaaS and PaaS into a single account to give you full control from a single dashboard. All billing-related information will be collected and consolidated to your account. Contact us with your requirements and we are happy to help you embrace the cloud!