preface

In my previous post, “The Past life of Cloud Native (I)”, I shared with you the definition of cloud native by Pivotal and CNCF. In this post, I will talk about my own understanding of cloud native.

Conclusion first, as I understand it, cloud native is a methodology to build and run applications using the advantages of cloud computing delivery. When your application is built according to the cloud computing delivery model, it can fully fit the characteristics of cloud computing, such as flexibility, distribution and automation. Moreover, with the emergence of container and Kubernetes technology, An architectural idea that was only available in the public cloud can now be easily built in a private cloud, a hybrid cloud, or even a single server, and developers need only care about how the application is created, not where it is deployed.

Some readers may feel that cloud native technology is only for big companies, not small ones. I think cloud native is a good choice for large and small companies alike if you want to build distributed, resilient, fault-tolerant, easy to manage, easy to observe, and deployable applications.

What is cloud computing?

To understand what cloud native is, you need to understand what cloud computing is.

Cloud computing simply means that cloud platforms provide cloud services (including servers, storage, databases, networking, software, analytics, and intelligence) that deliver rapid innovation, resilient resources, and economies of scale over the Internet. With cloud services, you can often add or subtract services and usage as your business needs change, helping to lower operating costs and make your infrastructure run more efficiently. In general, the essence of cloud computing is on-demand resource allocation and elastic computing. Advantages of cloud computing include:

  • Cost: Cloud computing lets you skip the cost of buying hardware and software and setting up and running an on-site data center (including server racks, round-the-clock power for power and cooling, and experts to manage the infrastructure).
  • Speed: Most cloud computing services are offered as on-demand self-service, so vast amounts of computing resources can be deployed within minutes, often with just a few mouse clicks, giving enterprises great flexibility and removing the pressure of capacity planning.
  • Performance: Cloud computing services regularly upgrade to fast and efficient hardware to ensure optimal cloud computing performance.
  • Reliability: Cloud computing simplifies data backup, disaster recovery, and business continuity at a low cost.
  • Security: Many cloud providers offer a wide range of policies and techniques to improve overall security.
  • Productivity: Cloud computing eliminates a lot of hardware and software maintenance, allowing the team to focus on business goals.
  • Elastic scaling: The biggest advantage of cloud computing is its ability to scale flexibly. For the cloud, this means being able to provide the right amount of resources from the right geographic location when needed.

What are cloud native apps?

As more and more vendors to provide cloud computing, also gradually to reduce the cost of using cloud computing, coupled with the obvious advantages of cloud computing, so a growing number of developers in the choice of the cloud services at the beginning of the application to create, instead of buying expensive servers, these from the beginning of creation will be hosted in the application of cloud platform, can be called cloud native applications.

Cloud native applications are specifically designed to be deployed and run on cloud platforms. Cloud native applications do not completely subvert traditional applications. Adopting cloud native design patterns can optimize and improve traditional application patterns, making applications more suitable for running on cloud platforms.

Cloud computing is becoming more and more popular today, cloud native has become an inevitable direction. Cloud native exists to liberate development and operation, not to make development and operation more complex and onerous.

In fact, most traditional applications can be deployed and run on the cloud platform based on the Linux operating system kernel even without any changes. However, the cloud host is used as a physical machine only for the purpose of deployment and operation, which cannot make full use of the capabilities of the cloud platform.

Enabling applications to use the cloud platform to achieve on-demand resource allocation and elastic scaling is the focus of cloud native applications. Cloud native also focuses on scale; distributed systems should have the ability to scale to tens of thousands of nodes, and these nodes should be multi-tenant and self-healing.

Essentially, cloud native is a design pattern that requires cloud-native applications to be scalable and available, as well as automated deployment and management capabilities, to run anywhere, and to improve development, test, and release efficiency through continuous integration and continuous delivery tools.

Important features of cloud native

There are many features of cloud native applications, and this article focuses on scalability and availability. These two features can be broken down into four key words: load balancing, available redundancy, fault-tolerant transfer, and resource allocation.

Load balancing: Cloud platform usually use level to regulate computing capacity expansion strategy, which requires a cloud native applications, you can run multiple instances at the same time, and multiple state of the instance is Shared, unified, when application calculation of surge, cloud platform will take the initiative to increase the new instance for the application, to adjust the pressure calculation, decreased in the request, the cloud platform will also dynamically remove redundant instances, To ensure optimal resources. In the local environment, if higher processing power is required, you can only switch to a more powerful server or upgrade the server, such as increasing memory and disk capacity.

Available redundancy: Cloud platform usually use redundant strategy to ensure application availability, assume that your application needs to achieve five nines availability (in 1 year time can only be up to 5.26 minutes of business interruption), then on the cloud platform, usually adopt different double room * double instance deployment mode, when any instance failure occurs, The request will be immediately switched to another instance in the same machine room. When a power failure or optical cable is cut in one machine room, the instance in another machine room can also ring quickly. If you want to further improve availability, you can continue to add instances and spread them out geographically as much as possible. In a local environment, the occasional server outage or power outage can immediately render the service unavailable for more than 5 minutes.

Fault-tolerant migration: When a server fails, the cloud platform quickly migrates the application to another server to restore the availability of the application. For a typical cloud data center, usually with hundreds of thousands of servers, even if only 1% error rate, the cloud data center error is also every day thousands of, your application is likely to be deployed in the failure of the server, so the cloud native applications need to be ready to be moved to another server.

Resource allocation: Application migration occurs not only when the server fails, but also when the cloud platform actively adjusts the load on different servers to achieve a resource optimization. That is to say, there is no problem with the application and the server itself, and application migration may be triggered. In a local environment, server outages are a big deal and can cause your service to become unavailable and difficult to recover quickly.

Cloud native flourishing

What specific capabilities do cloud platforms need in order to meet the requirements of cloud native application features?

1. Fast and steady relaunch. Whether it’s fault tolerant migration or elastic scaling, the cloud platform needs to be able to quickly redistribute your application to another server. There have been many different solutions throughout history: 1) It starts as a deployment script + installer, but writing a well-compatible deployment script is a very complex task; 2) later, people put forward the concept of virtualization, in the form of a virtual machine, the application and all the libraries and the underlying operating system is packaged in a virtual machine images, deployment time reduction using image directly, although this method has solved the compatibility problem, but also produce the deployment efficiency problem, because a complete virtual machine images, whether in the download, or on the scheduling, Both require a lot of time; 3) then the container technology, it unified solve the compatibility problems between different operating systems, and provide you with a lightweight way of encapsulating, support for the application and it depend on class libraries packed into a smaller container image, image transmission, or the container to release, can be quickly.

2. Dynamic and flexible networks. For fault-tolerant migration or elastic scaling, instances of cloud native applications are constantly migrated in data centers. During migration, instances must ensure stable connections between them and other components. Therefore, dynamic and flexible networks are required. 1) In the beginning, people also provided such configuration scripts, writing specific scripts to configure different network hardware, which was also very complicated; 2) Later, SDN software defined the network, that is, on top of the basic layer of hardware network, some functions of the network were defined by software, such as route allocation, etc. 3) Later, Kubernetes and Service Mesh appeared, which means that on the software and hardware network architecture, another layer of Service Mesh can be attached for more flexible, private and Service connection configuration.

With the advent of containers and cloud native technologies such as Kubernetes, the idea of an architecture that was only suitable for public clouds can now be easily built in private clouds, hybrid clouds, or even on a single server. Developers need only care about how applications are created, not where they are deployed. The cloud native projects that have graduated from CNCF include:

The project name GitHub Star The website address Project description
Kubernetes 80k+ kubernetes.io/ Is an open source system for automatically deploying, extending, and managing containerized applications.
Prometheus 39k+ prometheus.io/ Support your metrics and alerts with leading open source monitoring solutions.
etcd 37k+ etcd.io/ Is an open source distributed unified key-value store for shared configuration, service discovery, and scheduling coordination of distributed systems or clusters of computers. Etcd helps facilitate more secure automatic updates, coordinates scheduling to hosts, and helps set up the container’s overlay network.
Helm 20k+ helm.sh/ Helm is the best way to find, share, and use software built for Kubernetes.
Envoy 18k+ envoy.com/ L7 proxy and communication bus is designed for large modern SOA (Service-oriented Architecture) architectures.
Harbor 15k+ goharbor.io/ Harbor is an open source registry that protects artifacts through policies and role-based access controls, ensures that images are scanned and free of vulnerabilities, and signs images as trusted. Harbor is a CNCF graduate program that provides compliance, performance, and interoperability to help you consistently and securely manage artifacts across cloud native computing platforms such as Kubernetes and Docker.
Jaeger 14k+ www.jaegertracing.io/ end-to-end distributed tracing.
Vitess 12k+ vitess.io/ MySQL is a database cluster system used to scale MySQL horizontally through generalized sharding.
Fluentd 10k+ www.fluentd.org/ Fluentd is an open source data collector designed for processing data streams, using JSON as the data format. It adopts plug-in architecture, has high scalability and high availability, and also realizes high reliable information forwarding.
TiKV 9k+ tikv.org/ TiKV is a distributed KV system, which adopts Raft protocol to ensure strong consistency of data, and implements distributed transaction support by MVCC + 2PC.
containerd 9k+ containerd.io/ Is an industry standard container run time that emphasizes simplicity, robustness, and portability. It acts as a daemon for Linux and Windows, managing the complete container life cycle of its host systems: image transfer and storage, container execution and supervision, low-level storage, and network attachments.
Rook 9k+ rook.io/ It is an open source distributed storage orchestration system in the cloud native environment, currently supporting Ceph, NFS, Edegefs, Cassandra, CockroachDB and other storage systems. It implements an automatic management, automatic expansion, automatic repair of distributed storage service. Rook supports automatic deployment, startup, configuration, allocation, capacity expansion/reduction, upgrade, migration, disaster recovery, monitoring, and resource management.
CoreDNS 8k+ coredns.io/ DNS is a flexible and extensible DNS server that can be used as Kubernetes cluster DNS.
Linkerd 7k+ linkerd.io/ It was created to address the complexities of very large scale production systems like Twitter and Google. Rather than controlling the communication mechanism between services, Linkerd solves this problem by adding an abstraction layer on top of service instances.
Open Policy Agent 5k+ www.openpolicyagent.org/ Officially known as OPA, it provides a unified framework and services for such policy decisions. It decouples policy decision from software business logic, abstracts policy definition and decision process into a general model, and implements a general policy engine, which can be applied to a wide range of business scenarios

In China, Ali Cloud has upgraded cloud native to its technical strategy, actively participated in the construction of cloud native ecology, continuously accumulated easy-to-use cloud native products, and fully practiced cloud native in its own business, which has achieved very good results.

We flexibly use these cloud native technologies, in conjunction with the CNCF cloud native practice roadmap, believe that everyone can easily build their own cloud native applications.

reference

  • What is Cloud Computing azure.microsoft.com/zh-cn/overv…
  • Architecture in the New Era ii: What is Cloud Native? www.infoq.cn/article/xpF…

PS: Pay attention to my public number, learn and grow together