foreword
The last article "The Past and Present of Cloud Native (1)" with you Pivotal and CNCF's definition of cloud native. This article talks about my own understanding of cloud native.
To put the conclusion first, the cloud native as I understand it is a methodology that takes advantage of cloud computing delivery to build and run applications. When your application is built according to the cloud computing delivery model, it can fully fit the elastic scaling and distribution of cloud computing. With the emergence of container and Kubernetes technology, this set of architectural ideas that was originally only suitable for public clouds can now be easily built on private clouds, hybrid clouds, or even a single server. Developers only need to care about How the application is created, regardless of where it is deployed.
Some readers may feel that cloud-native technology is only suitable for large companies, and small companies may not be able to play. And I think as long as you want to build an application that is distributed, elastically scalable, fault-tolerant, easy to manage, easy to observe, and can be deployed anywhere, whether it is a large company or a small company, cloud native technology is a good choice.
What is cloud computing?
To understand what cloud native is, you need to first understand what cloud computing is.
Cloud computing simply means that cloud platforms provide cloud services (including servers, storage, databases, networks, software, analytics, and intelligence) and other cloud services that provide rapid innovation, elastic resources, and economies of scale through the Internet. For cloud services, you can usually increase or decrease services and usage at any time as your business needs change, helping to reduce operating costs and make your infrastructure run more efficiently. In general, the essence of cloud computing is on-demand resource allocation and elastic computing. The advantages of cloud computing are:
- Cost: Cloud computing frees you from the capital investment of buying hardware and software and setting up and running an on-site data center (including server racks, 24/7 uninterrupted power for power and cooling, experts to manage the infrastructure).
- Speed: Most cloud computing services are provided as on-demand self-service, so massive computing resources can often be provisioned in minutes with just a few mouse clicks, giving businesses great flexibility and removing the stress of capacity planning.
- Performance: Cloud computing service providers 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 lower cost.
- Security: Many cloud providers offer a wide range of strategies and techniques for improving the overall security situation.
- Work efficiency: Cloud computing avoids a lot of hardware and software maintenance, allowing teams to focus on business goals.
- Elastic scaling: The biggest advantage of cloud computing is the ability to scale elastically. For the cloud, this means being able to provide the right amount of resources from the right geographic location when needed.
What is a cloud-native application?
As more and more vendors provide cloud computing, the cost of using cloud computing is gradually decreasing. In addition, the advantages of cloud computing are obvious, so more and more developers choose cloud services at the beginning of application creation. Instead of purchasing expensive servers, these applications, which have been hosted on the cloud platform since their inception, can be called cloud-native applications.
Cloud-native applications are applications specially 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.
In today's increasingly popular cloud computing, cloud native has become an inevitable direction. The meaning of cloud native existence is to liberate development and operation and maintenance, rather than making development and operation and maintenance work more complicated and onerous.
In fact, most traditional applications can be deployed and run on a cloud platform based on the Linux operating system kernel even without any changes. Leverage the power of cloud platforms.
Enabling applications to utilize 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 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 have scalability and availability, the ability to automate deployment and management, run anywhere, and improve R&D, testing, and release through continuous integration and continuous delivery tools s efficiency.
Important Features of Cloud Native
There are many features of cloud-native applications. This article focuses on scalability and availability. These two characteristics can be broken down into four keywords: load balancing, available redundancy, fault-tolerant transfer, and resource allocation.
Load balancing: Cloud platforms usually use a horizontal expansion strategy to adjust computing power, which requires a cloud-native application that can run multiple instances at the same time, and the status of multiple instances is shared and unified. When the computing volume of the application surges The cloud platform will actively add new instances to the application to adjust the computing pressure. When the request volume decreases, the cloud platform will also dynamically delete redundant instances to ensure optimal resources. In the local environment, if higher processing power is required, it can only be replaced with a more powerful server, or the server can be upgraded, such as increasing memory, disk capacity, and so on.
Available redundancy: Cloud platforms usually use redundant strategies to ensure the availability of applications. Assuming that your application needs to achieve 5 9s of availability (meaning that there can only be a maximum of 5.26 minutes of business interruption in a year), then in the cloud On the platform, the deployment mode of remote dual computer room * dual instance is usually adopted. When any instance fails, the request will be immediately switched to another instance in the same computer room. When a computer room is powered off or the optical cable is cut, the other Instances in regional computer rooms can also ring quickly. If you want to further improve the availability, you can continue to add instances, and try to disperse the geographical deployment. In a local environment, an occasional server downtime or power outage can immediately cause the service to be unavailable for more than 5 minutes.
Fault-tolerant transfer: When a server fails, the cloud platform will quickly migrate the application to another server to restore the availability of the application. For a typical cloud data center, there are usually hundreds of thousands of servers. Even if the error rate is only 1%, there are thousands of errors in this cloud data center every day. Your application is very likely to fail. Deployed on the failed server, so cloud-native applications need to be prepared to be migrated to another server at any time.
Resource allocation: Application migration not only occurs when the server fails, but also sometimes 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 it may also trigger the migration of the application. In a local environment, server downtime is a big deal that will directly cause your service to be unavailable and difficult to recover quickly.
The boom in cloud native
In order to meet the requirements of cloud-native application characteristics, what specific capabilities do cloud platforms need to have?
1. Fast and stable re-release. Whether it is fault-tolerant transfer or elastic scaling, the cloud platform needs to be able to quickly republish your application to another server. Historically, people have had many different solutions: 1) In the beginning, it was in the form of deployment scripts + installers, but writing a well-compatible deployment script was a very complicated task; 2) Later, people proposed the concept of virtualization, In the form of a virtual machine, the application, all the class libraries and the underlying operating system are all packaged into a virtual machine image, and the image is directly restored during deployment. Although this method solves the compatibility problem, it also brings about the deployment efficiency problem, because A complete virtual machine image requires a lot of time in downloading and scheduling; 3) Later, container technology emerged, which uniformly solved the compatibility problem between different operating systems and gave We provide a lightweight packaging method that supports packaging the application and the class library it depends on into a container image with a smaller size. This container image can achieve fast speed whether it is transmitted or republished. .
2. Dynamic and flexible network. It is also fault-tolerant transfer or elastic scaling. Instances of cloud-native applications will be continuously migrated in the data center. During the migration of the instance, the connection between it and other components must be stable, so a dynamic and flexible network is required. 1) In the beginning, people also provided this kind of configuration script to write specific scripts for different network hardware to configure, which is also very complicated; 2) Later, there was the way of SDN software-defined network, that is to say, in the hardware network Above the basic layer, some functions of the network are defined by software, such as routing distribution, etc.; 3) Later, kubernetes and Service Mesh appeared, which means that on the network architecture of software and hardware, another layer of service mesh can be attached. Grid for more flexible, private, service-to-service connection configuration.
With the emergence of cloud-native technologies such as containers and Kubernetes, this set of architectural ideas that was originally only applicable to public clouds can now be easily built on private clouds, hybrid clouds, or even a single server. Developers only need to care about how the application is created. Yes, regardless of where it is deployed. The main cloud native projects that have graduated from CNCF are:
project name | GitHub Star | Official website address | project description |
---|---|---|---|
Kubernetes | 80k+ | https://kubernetes.io/ | is an open-source system for automatically deploying, scaling, and managing containerized applications. |
Prometheus | 39k+ | https://prometheus.io/ | Power your metrics and alerts with the leading open source monitoring solution. |
etcd | 37k+ | https://etcd.io/ | It is an open source distributed unified key-value store used for shared configuration, service discovery and scheduling coordination of distributed systems or computer clusters. etcd helps facilitate more secure automatic updates, coordinates work scheduled to the host, and helps set up the container's overlay network. |
Helm | 20k+ | https://helm.sh/ | Helm is the best way to find, share, and use software built for Kubernetes. |
Envoy | 18k+ | https://envoy.com/ | is an L7 proxy and communication bus designed for large modern SOA (Service Oriented Architecture) architectures. |
Harbor | 15k+ | https://goharbor.io/ | Harbor is an open source registry that protects artifacts through policies and role-based access controls, ensures images are scanned and free of vulnerabilities, and signs images as trusted. Harbor is a CNCF graduate project that provides compliance, performance, and interoperability to help you manage artifacts consistently and securely across cloud-native computing platforms such as Kubernetes and Docker. |
Jaeger | 14k+ | https://www.jaegertracing.io/ | end-to-end distributed tracing. |
Vitess | 12k+ | https://vitess.io/ | is a database cluster system for horizontal scaling of MySQL through generalized sharding. |
Fluentd | 10k+ | https://www.fluentd.org/ | Fluentd is an open source data collector designed for processing data streams, using JSON as the data format. It adopts a plug-in architecture, has high scalability and high availability, and also achieves highly reliable information forwarding. |
TiKV | 9k+ | https://tikv.org/ | TiKV is a distributed KV system. It uses Raft protocol to ensure strong data consistency, and uses MVCC + 2PC to support distributed transactions. |
containerd | 9k+ | https://containerd.io/ | is an industry standard container runtime that emphasizes simplicity, robustness and portability. It acts as the patron saint of Linux and Windows, managing the full container lifecycle of its host system: image transfer and storage, container execution and supervision, low-level storage and network attachments, and more. |
Rook | 9k+ | https://rook.io/ | It is an open source distributed storage orchestration system in a cloud-native environment. Currently, it supports storage systems such as Ceph, NFS, Edegefs, Cassandra, and CockroachDB. It implements a distributed storage service that is automatically managed, expanded, and repaired automatically. Rook supports automated deployment, startup, configuration, allocation, scaling up/down, upgrades, migrations, disaster recovery, monitoring, and resource management. |
CoreDNS | 8k+ | https://coredns.io/ | It is a flexible and extensible DNS server that can be used as a Kubernetes cluster DNS. |
Linkerd | 7k+ | https://linkerd.io/ | It emerged to solve the complexities of hyperscale production systems like twitter and google. Linkerd solves this problem not by controlling the communication mechanism between services, but by adding an abstraction layer on top of service instances. |
Open Policy Agent | 5k+ | https://www.openpolicyagent.org/ | Officially referred to as OPA, it provides a unified framework and services for such strategic decision-making needs. It decouples policy decision-making from software business logic, abstracts policy definition and decision-making process into a general model, and implements it as a general policy engine, which can be applied to a wide range of business scenarios |
In China, Alibaba Cloud upgraded cloud native to a technology strategy, actively participated in the construction of cloud native ecology, continued to accumulate simple and easy-to-use cloud native products, and fully practiced cloud native in its own business, and achieved very good results.
We flexibly use these cloud-native technologies and cooperate with the CNCF cloud-native practice roadmap . I believe that everyone can easily build their own cloud-native applications.
refer to
- What is Cloud Computing https://azure.microsoft.com/en-us/overview/what-is-cloud-computing/
- "A New Era of Architecture (2): What is Cloud Native? 》 https://www.infoq.cn/article/xpFP8uclTKJQhhFqDyjZ
PS: Pay attention to the public account [Jie Geshe], learn and grow together
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。