see more blog

(VN) Kiến trúc Cloud Native và các đặc điểm của ứng dụng Cloud Native (Phần 2)

kien-truc-cloud-native-va-cac-dac-diem-cua-ung-dung-cloud-native-phan-2-1

4. DevOps Tools for Cloud Native Architecture on AWS

DevOps complements the cloud native architecture by providing a success-driven software delivery approach that combines speed, agility and control. AWS augments this approach by providing the required tools. Here are some of the key tools offered by AWS for adopting cloud native architecture.

Docker and Microservices Architecture

Docker is the most popular containerization platform that enables organizations to package applications with all the required runtime resources such as the source code, dependencies and libraries. This open-source container toolkit makes it easy to automate and control the tasks of building, deploying and managing containers using simple commands and APIs. 

Containers are lightweight, optimize resource usage and increase developer productivity. Docker is popular as it facilitates the seamless movement of containers across different platforms and environments. Their containers are lightweight and reusable. Docker comes with an automated container creation feature that automatically builds and deploys containers based on the source code along with versioning to allow you to roll back if needed. It offers a massive shared library with containers built by various users for developers. 

Microservices architecture is a software development model which entails building an application which is a collection of small, loosely coupled and independently deployable services that communicate with other services via APIs. As such, you can independently build and deploy each process without dependencies on other services, making every service autonomous. This model enables you to build each service for a specific purpose. It brings agility and speed to development while facilitating seamless collaboration between various teams. You can enjoy the flexibility in scaling required resources instead of scaling the entire application. The code can be reused as well.

Amazon Elastic Container Service (ECS)

Amazon Elastic Container Service (ECS) is a powerful container orchestration tool to manage a cluster of Amazon EC2 instances. ECS leverages the serverless technology of AWS Fargate to autonomously manage containerization tasks which means you can quickly build and deploy applications instead of spending time on patches, configurations and security policies. It easily integrates with your popular CI/CD tools as well as with AWS native management and compliance solutions. You can pay only for the resources used.

The good thing about Amazon ECS is that it creates your scaling plan if you provide your target capacity, allowing you to better control scaling tasks. With Amazon CloudWatch, you can gain container insights. It also supports 3rd party tools such as Prometheus and Grafana. ECS is easy to use with no learning curve and minimizes overhead to optimize costs. Amazon ECS is deeply integrated with IAM and offers higher security. If you mostly work with AWS cloud environments, ECS is a good choice as it comes integrated with other Amazon services. 

Amazon Kubernetes Service (Amazon EKS)

Amazon Kubernetes Service (EKS) is a containerized orchestration tool for container applications managed by Kubernetes on the AWS cloud. It uses the open-source Kubernetes software which means you gain more extensibility to manage container environments when compared with Amazon ECS. Another advantage of EKS is that it comes with a range of tools to manage container clusters. For instance, Helm and Istio help you to create templates for deployments while Prometheus, Jaeger and Grafana help you to gain container insights. In addition, Jet-stack serves as a certification manager. It also offers some further service meshes which you don’t get with ECS. EKS works with Fargate and CloudWatch as well.

Amazon Fargate

Amazon Fargate is a popular tool from AWS that enables administrators to run container clusters in the cloud without having to worry about the management of the underlying infrastructure. Fargate works along with ECS and abstracts the containers from the underlying infrastructure, allowing users to manage containers while Fargate takes care of the underlying stack. Developers specify access policies and parameters while packaging an application into a container and Fargate picks it up and manages the environment. Moreover, It takes care of scaling requirements. You can simultaneously run thousands of containers to easily manage critical applications. Fargate charges are based on the memory and vCPU resources used per container application. It is easy to use and offers better security but is less customizable and limited by regional availability. 

To use Fargate, build a container and host it in a DockerHub or ECR registry. Then choose a container orchestration service such as ECS or EKS and create a cluster opting Fargate. If your environment requires high memory, compute resources and demands performance, Fargate is a good option. 

Serverless Computing

Serverless Computing is a cloud-native model wherein developers can write code and deploy applications without the need to manage servers. As the servers are abstracted from the application, the cloud provider handles provisioning, scaling and the management of server infrastructure. It means developers can simply build applications and deploy them using containers. In this architecture, resources for applications are launched only when the code is in execution. When an app is to be launched, an event is triggered and the required infrastructure is automatically provisioned and terminated once the code stops running. It means users pay only when the code is in execution. 

AWS Lambda

AWS Lambda is a popular serverless computing tool that lets you run code without the need to provision and manage servers. Lambda enables developers to upload code as a container image and automatically provisions the underlying stack on an event-based model. Lambda lets you run app code in parallel and scales resources individually for each trigger. So, resource usage is optimized to the core and administrative burden becomes zero. 

AWS Lambda can be used for the real-time processing of data and files. For instance, you can write a function that triggers an event when there is a change in data or the desired state of the environment. Along with Amazon Kinesis, Lambda takes care of application activities. Using Lambda, developers can build serverless mobile backends and IoT backends wherein Amazon API Gateway performs the authentication of API requests. Lambda can be combined with other AWS services to build web applications that can be deployed across multiple locations. 

6. AWS DevOps Tools for Cloud Native Architecture

AWS DevOps Tools for CloudNative Architecture
AWS DevOps Tools for CloudNative Architecture
AWS DevOps Tools for CloudNative Architecture

6. Cloud Native Architecture Diagram

Here is an example of a cloud native architecture diagram:

How it works?

External Users

  1. External users request access to cloud resources via the Amazon Route 53 DNS Web server.
  2. The request is sent to the Amazon CloudFront Content Delivery Network (CDN) service.
  3. As depicted in the cloud native application architecture diagram, Amazon Cognito, a secure sign on and authentication service authenticates user credentials.
  4. The user data is also sent to clickstream analysis, powered by Amazon Kinesis and AWS Lambda serverless technology and the processed data is stored in Amazon S3 service.
  5. The traffic is sent to the virtual private cloud via an Internet gateway
  6. The network load balancer will route the traffic to the available servers.
  7. External users can access the API / App services powered by Fargate technology as shown in the cloud native architecture diagram

The role of Development / Operations Team in Cloud Native Architecture Diagram

  1. The development and operations team uses the AWS CodePipeline.
  2. They write code and commit to the private Git repositories that are managed by AWS CodeCommit service.
  3. The AWS CodeBuild continuous interaction service picks up the code and compiles it into deployable software packages.
  4. Software that is packaged into containers using CloudFormation templates is uploaded to the Amazon Elastic Container Registry.
  5. Containers are deployed to the production environment powered by Fargate.
  6. Amazon S3 Glacier is used for file storage and archival purposes in this cloud native architecture diagram
  7. Amazon ElastiCache for Redis is used for in-memory storage and cache for primary and secondary servers.
  8. Amazon RDS or Amazon Aurora that is compatible with PostgreSQL and MySQL is used for relational database services in this cloud native architecture diagram.
  9. Amazon CloudWatch can be used for application and infrastructure monitoring.

Provisioning AWS resources using CloudFormation and Fargate

CloudFormation is a powerful IaC tool for provisioning and managing resources on AWS. Fargate is a serverless computing engine that handles the provisioning of the underlying infrastructure for your AWS resources. CloudFormation and Fargate technologies help you to seamlessly deploy and manage resources in the AWS cloud. 

Here is how you can automatically manage your infrastructure with CloudFormation

  1. A DevOps admin creates a Fargate profile as a JSON file using the cloudformation template with a valid EKS cluster name, logical ID of the profile resource, profile property etc.
  2. The admin commits the profile to AWS CodeCommit repository.
  3. When a change is detected in the CloudFormation template repo, the AWS CodePipeline is triggered and tasks are executed after which the profile is pushed to the deployment.
  4. The stack is launched and the EKS service is updated about the changes to the infrastructure.

Using CloudFormation and Fargate, organizations can automatically create and manage new environments during production and development. 

7. Conclusion of Cloud Native Application Architecture

In today’s rapidly changing technological world, cloud native architecture is not optional anymore-it is a necessity. Change is the only thing that is constant in the cloud which means your software development environment should be flexible enough to quickly adapt to new technologies and methodologies without disturbing business operations. Cloud native architecture provides the right environment to build applications using the right tools, technologies and processes. The key to fully leveraging the cloud revolution is designing the right cloud architecture for your software development requirements. Implementing the right automation in the right areas, making the most of managed services, incorporating DevOps best practices and applying the best cloud native application architecture patterns is recommended. 

8. FAQ

What is the difference between cloud-native and cloud-enabled?

Cloud-native products or applications are ones that are created using a cloud native architecture. Simply put, they are born in the cloud. On the contrary, cloud-enabled products are built using traditional methods and are migrated to the cloud.

What are the best container orchestration tools for a Cloud Native Architecture?

Kubernetes is a leader in the container orchestration segment. Some of the other tools in this segment include Docker Swarm, Nomad and Apache Mesos.

What is Cloud Native Computing Foundation (CNCF)?

Cloud Native Computing Foundation (CNCF) is a subsidiary of the Linux foundation established in 2015. This open-source software foundation comprises a vendor-agnostic developer community that collaborates on open-source projects. By democratizing cloud native architecture patterns, CNCF makes them accessible for everyone. Microsoft, AWS, Google, Oracle and SAP are some of the key members of CNCF.

What is the difference between Cloud-First and Cloud-Only?

Often, the terms ‘cloud-first’ and ‘cloud-only’ are interchangeably used. However, they are not the same. Cloud-first strategy is about prioritizing a cloud technology while implementing a new IT infrastructure or platform. Cloud-only strategy is about moving all systems and services to a cloud native architecture. 

Source: William from clickittech.com

Related news

what’s up at VTI