5 Introduction to Cloud Native Principles
5 Introduction to Cloud Native Principles
A cloud-native application is engineered to run on a platform and is designed for resiliency, agility, operability, and
observability.
Resiliency, Agility, and Operability are the core pillars of the cloud. We then go on to learn a little bit of
Microservices, Containers, VM and Kubernetes.
Now that you have an overview of a) what data center looks like b) have an
understanding of the various pieces of AWS c) understand the reason on why
your company needs to move to the cloud lets go into some of the Cloud
Native Principles.
The reason that you need to deeply understand these principles is that ideally
when an application is running on the cloud it needs to maximize the benefits
of running on the cloud. When applications are not built keeping these
principles in mind there are more chances of things failing.
The Cloud Native Computing Foundation (CNCF) has defined cloud native as:
Micro-services Architecture
A micro-service architecture is a software architecture style where complex
applications are composed of several small, independent processes
communicating with each other using language-agnostic APIs. These
application services are small, highly decoupled and focus on doing a small
task. Microservices refers to smaller and more manageable services that
serves a specific use case.
What is a container?
Container in short is a lightweight Virtual Machine. Containers are a way to
package all that is needed for your application to work, be it operating system,
libraries, config files or other applications all into one bundle.
1. Image containers have images of the OS or the application itself, they are
static.
Now, a container image includes an application & all its dependencies, using
which you can create instances of Containers which can be run on any
environment, be it developer, QA, support or in data-centers.
Virtual Machines
VMs virtualize hardware aspect of a computer whereas containers virtualize
at the operating system level. VMs need a Guest OS on top of Hypervisor, a
virtualization software.
Hypervisors
Hypervisor manages the allocation of Hardware’s processor, memory &
resources to the VMs. On the flip side, Containers share the OS’s compute,
memory & resources and at the same time achieve the isolation provided by
the VM architecture. Simply put, by eliminating the guest OS from a VM would
give us Containers, which in itself reduces lot of overhead that comes along
with VMs.
Containers
Imagine a scenario in which a customer has an issue on the field and support
folks try to replicate it in their own environments. How many times have they
struggled with setting up the environments and not being able to reproduce
it? Similar case repeats itself with developer & QA environments.
Now, just imagine a situation where the support folks are able to whip up a
container and have exactly same environment as is in the field with the
customer. Similarly, developers and test/QA personnel. I am sure you would
have come across such inconsistencies in a lot of scenarios starting from
developing a product to testing. This is just one of the issues that containers
tackle.
Kubernetes
Kubernetes is an open source container orchestration tool designed to
automate deploying, scaling, and operating containerized applications. Why is
this here ? It is here because “Distributed Management and Orchestration” is
an integral part of making your application Cloud Native.
Describe your containers and how many you want with a “Deployment.”
Kubernetes will keep those containers running and handle deploying changes
You can declare minimum and maximum compute resources (CPU & Memory)
for your containers. Kubernetes will slot your containers into where ever they
fit. This increases your compute efficiency and ultimately lowers costs.
Heterogeneous Clusters
Kubernetes runs anywhere. You can build your Kubernetes cluster for a mix
of virtual machines (VMs) running the cloud, on-prem, or bare metal in your
datacenter. Simply choose the composition according to your requirements.
Persistent Storage
The control plane is the set of APIs and software that Kubernetes users
interact with. The control plane services run on master nodes. Clusters may
have multiple masters for high availability scenarios.