Cloud-Native Apps: The Why, the What, and the How
Cloud-Native Apps: The Why, the What, and the How
A number of recently embraced innovations are paving the way for and perfecting an exciting way of developing apps in an automated style: cloud native.
Join the DZone community and get the full member experience.Join For Free
Cloud-native is an approach to building and running applications that can leverage the advantages of the cloud computing model — on-demand computing power and pay-as-you-go pricing model. These applications are built and deployed in a rapid cadence to a cloud platform and offer organizations greater agility, resilience, and portability across clouds.
This blog explains the importance, the benefits, and how to go about building cloud-native applications.
Early technology adopters like FANG (Facebook, Amazon, Netflix, and Google) have some common themes when it comes to shipping software. They have invested heavily in building capabilities that enable them to release new features regularly (weekly, daily, or in some cases even hourly). They have achieved this rapid release cadence while supporting the safe and reliable operation of their applications; in turn allowing them to respond more effectively to their customers’ needs.
They have achieved this level of agility by moving beyond ad-hoc automation and by adopting cloud-native practices that deliver these predictable capabilities. DevOps, continuous delivery, microservices, and containers form the four main tenets of cloud-native patterns. All of them have the same overarching goal of making application development and operations teams more efficient through automation.
At this point though, these techniques have only been successfully proven at those software-driven companies. Smaller, more agile companies are also realizing the value here. However, as per Joe Beda (creator of Kubernetes and CTO at Heptio) there are very few examples of this philosophy being applied outside these technology-centric companies.
Any team/company shipping products should seriously consider adopting cloud-native practices if they want to ship software faster while reducing risk and, in turn, delighting their customers
Cloud-native practices comprise of four main tenets.
- DevOps is the collaboration between software developers and IT operations with the goal of automating the process of software delivery and infrastructure changes.
- Continuous delivery enables applications to released quickly, reliably & frequently, with less risk.
- Microservices is an architectural approach to building an application as a collection of small, independent services that run on their own and communicate over HTTP APIs.
- Containers provide lightweight virtualization by dynamically dividing a single server into one or more isolated containers. Containers offer both effiiciency and speed compared to standard virtual machines (VMs). Containers provide the ability to manage and migrate application dependencies along with the application while abstracting away the OS and the underlying cloud platform in many cases.
The benefits that can be reaped by adopting these methodologies include:
- Self managing infrastructure through automation: The cloud-native practice goes beyond ad-hoc automation built on top of virtualization platforms. Instead, it focuses on the orchestration, management, and automation of the entire infrastructure right upto the application tier.
- Reliable infrastructure and application: Cloud-native practices ensure that it's much easier to handle churn, replace failed components, and even easier to recover from unexpected events and failures.
- Deeper insights into complex applications: Cloud-native tooling provides visualization for health management, monitoring, and notifications with audit logs making applications easy to audit and debug
- Security: Enable developers to build security into applications from the start rather than as an afterthought.
- More efficient use of resources: Containers are lighter in weight than full systems. Deploying applications in containers leads to increased resource utilization.
- Software teams have grown in size, and the amount of applications and tools that a company needs to be build has grown with them over the last few years. Microservices break large, complex applications into smaller pieces so that they can be developed, tested, and managed independently. This enables a single microservice to be updated or rolled back without affecting other parts of the application. Also, nowadays, software teams are distributed and microservices enable each team to own a small piece with service contracts acting as the communication layer.
Now, lets look at the various building blocks of the cloud-native stack that help achieve the above described goals. Here, we have grouped tools and solutions as per the problem they solve. We start with the infrastructure layer at the bottom, then the tools used to provision the infrastructure, following which we have the container runtime environment; above that, we have tools to manage clusters of container environments, and then at the very top we have the tools and frameworks to develop the applications.
Infrastructure: At the very bottom, we have the infrastructure layer, which provides the compute, storage, network, and operating system, usually provided by the cloud (AWS, GCP, Azure, Openstack, VMware).
Provisioning: The provisioning layer consists of automation tools that help in provisioning the infrastructure, managing images, and deploying the application. Chef, Puppet, and Ansible are the DevOps tools that give the ability to manage their configuration and environments. Spinnaker, Terraform, and Cloudformation provide workflows to provision the infrastructure. Twistlock and Clair provide the ability to harden container images.
Runtime: The runtime provides the environment in which the application runs. It consists of the container engines where the application runs along with the associated storage and networking. containerd and rkt are the most widely used container engines. Flannel and OpenContrail provide the necessary overlay networking for containers to interact with each other and the outside world while Datera, Portworx, AppOrbit, etc. provide the necessary persistent storage, enabling easy movement of containers across clouds.
Orchestration and management: Tools like Kubernetes, Docker Swarm, and Apache Mesos abstract the management container clusters, allowing easy scheduling and orchestration of containers across multiple hosts. etcd and Consul provide service registries for discovery while AVI and Envoy provide proxy, load balancing, etc. services.
Application definition and development: We can build microservices for applications across multiple langauges — Python, Spring/Java, Ruby, Node. Packer, Habitat, and Bitnami provide image management for the application to run across all infrastructure — container or otherwise.
Jenkins, TravisCI, CircleCI, and other build automation servers provide the capability to setup continuous integration and delivery pipelines.
All modern monitoring platforms like Datadog, New Relic, and AppDynamic support monitoring of containers and microservices.
Splunk, Elasticsearch, and fluentd help in log aggregration while Open Tracing and Zipkin help in debugging applications.
Culture: Adopting cloud-native practices needs a cultural change where teams no longer work in independent silos. End-to-end automation of software delivery pipelines is only possible when there is an increased collaboration between development and IT operations team with a shared responbility.
When we put all the pieces together, we get the complete cloud-native landscape, as shown below.
I hope this post gives an idea why cloud-native is important and what the main benefits are. As you may have noticed in the above infographic there are several projects, tools, and companies trying to solve similar problems. The next questions in mind most likely will be, "How do I get started? Which tools are right for me?" And so on. I will cover these topics and more in my following blog posts. Stay tuned!
Published at DZone with permission of Chirag Jog . See the original article here.
Opinions expressed by DZone contributors are their own.