Are you talking about cloud native? What exactly is cloud native?

1. What is cloud native

Recently, I have been hearing people say cloud native. What is cloud native?
Cloud native can be divided into two parts : cloud and native .

cloud

Cloud means cloud server.
Before cloud servers became popular, we deployed our projects by purchasing physical servers ourselves. We need to buy physical machines, purchase public IP services from network operators, and find a place in the company to put these machines as a server room.
insert image description here
With cloud servers, companies no longer need to purchase physical equipment. If we want to deploy our own projects online, we only need to purchase from cloud server providers to have our own servers. Compared with traditional servers, cloud servers are more There are many advantages that traditional servers cannot match. Such as elasticity, distribution and so on.
insert image description here

Primitive

What is native? Native means native. When our program is developed and designed, it is completely different in terms of running on a local self-built server, running on a cloud server, and project architecture design.
And native means that the application has been designed with the cloud environment in mind from the very beginning . It is designed natively for the cloud and runs in the best posture on the cloud. It is necessary to make full use of the advantages of the resources on the cloud, so as to make our application more Powerful, faster and more stable.
insert image description here

cloud + native

Therefore, cloud native does not refer to a certain technology, it is more like a technology system.
For example, if you are not familiar with cloud native, you should be familiar with big data, right? Big data includes technologies such as Spark and Hadoop.
The same is true of cloud native, and it is also composed of some technologies that we are often familiar with. Let's look down.

2. Four elements of cloud native

In fact, the concept of cloud native concept came from a foundation led by Google. The original native computing foundation is referred to as CNCF.
insert image description here
After CNCF has been updated for several generations, he gave an answer. The four elements of cloud native include:

Microservices

Almost every definition of cloud native includes microservices. Microservices are monolithic applications. Microservices have a theoretical basis, that is, Conway's law, which guides how to segment services. It is very mysterious. Anything that can be called a theoretical law It’s not easy to understand, otherwise, there will be no B. It probably means that the organizational structure determines the product form. I don’t know if it has anything to do with Marx’s production relationship affecting productivity. The advantage of the microservice architecture is that after being cut by function, services are decoupled, cohesion is stronger, and changes are easier; another technique for dividing services is said to be based on DDD.

containerized

Docker is the most widely used container engine. It is widely used in the infrastructure of Cisco, Google and other companies. It is based on LXC technology. Containerization provides implementation guarantee for microservices and plays an application isolation role. K8S is a container orchestration system. For container management, load balancing between containers, Google's work, Docker and K8S are both written in Go, which are all good things.

DevOps

This is a combination of words, Dev+Ops, which is the combination of development and operation and maintenance. Unlike development and products, they often meet each other. In fact, DevOps should also include testing. DevOps is an agile thinking, a communication culture, and an organizational form. Provide continuous delivery capabilities for cloud native.

continuous delivery

Continuous delivery is development without delay, updates without downtime, small steps and fast running, and an anti-traditional waterfall development model. This requires the coexistence of development versions and stable versions. In fact, it requires a lot of process and tool support.

insert image description here

These elements are still a bit abstract. In fact, the most consensus in the industry, the landing application system that conforms to the original native architecture is to use k8s + docker for containerized deployment, based on the microservice architecture to develop applications with completely separated front and back ends, improve flexibility and maintainability, and support with the help of agile iterative methods The functions of the counterparty tool with continuous iteration and improvement, support online release automation, and use cloud platform facilities to achieve elastic scaling, dynamic adjustment, and optimal resource utilization. This architecture is simple and fast to build applications, deploy applications easily, and run applications 5G traffic distribution spikes traditionally It is the application architecture, and the previous IT construction model is the integrated system of the entire Internet technology development to today.

3. What are the specific cloud native technologies?

There are many cloud native technologies, which can be roughly divided into the following five categories: containers, service meshes, declaration APIs, immutable infrastructure, and microservices.

insert image description here

Containers

Containerized terminal Containerized encapsulation refers to the container-based application. The application is encapsulated in the container and runs in the container to achieve the relative isolation of resources and the reuse of container images, because the containerization technology used runs in the container. , there is no need to consider the differences in the underlying hardware, which greatly simplifies the development workload, and is also extremely friendly to operation and maintenance personnel, so there is no need to worry about environmental problems. The technologies used include Docker and k8s.

Microservices

Microservice-oriented, microservice-oriented refers to splitting a large functional application into micro-applications with single functions, relatively independent, and decoupled from each other. Micro-applications communicate through interfaces, using micro-service technologies such as SpirngCloud

Service Meshes

A service mesh is an infrastructure layer dedicated to handling service communication. Its responsibility is to perform reliable request delivery under complex topologies of services composed of cloud-native applications. In practice, it is a set of lightweight network proxies deployed with the application service and transparent to the application service.

Immutable Infrastructure

Immutability in immutable infrastructure is very similar to the concept of immutability in programming. Immutable variable in programming is that it cannot be changed after the assignment is completed, and a new one can only be created to replace the old one as a whole. Due to this feature this variable can be used safely in a concurrent environment. The basic immutability of infrastructure means that the server running the service is not changing after it is deployed.

Deciarative API

Declarative API is the technical point of Kubernetes. Its core principle is that when a user submits a description of an API object to Kubernetes, Kubernetes will be responsible for ensuring that the status of each resource in the entire cluster is described with your API object. requirements are consistent. More importantly, this guarantee is an "unconditional", "no expiration" promise: for each API object stored in etcd, Kubernetes starts a process called the "Controller Pattern" Infinite loop, constantly checking, then tuning, and finally ensuring that the state of the entire cluster matches the description of this API object. A simple understanding is that the declaration of the object is decoupled from the creation of the object. To create an object in a common program, you need to apply for resources from the operating system. Similarly, to create an object on the container cloud platform, you need to apply for resources from k8s. But k8s goes a step further, you only need to submit an application form, and then the k8s system completes the creation of the object.

These technologies are only part of the cloud-native composition. However, these technologies can also be used by our own computer room servers. In other words, if it is not a cloud environment, even with these technologies, it is not cloud-native, cloud-native, it must be Cloud server based.

Fourth, the advantages of cloud servers over traditional physical servers

Why do we use cloud servers instead of building physical servers ourselves?
insert image description here

The specific advantages of cloud servers are as follows:

1. Flexibility : The cloud server adopts virtualization technology, which integrates the computing, network and storage resources of a large number of cluster hosts. Its CPU, memory, hard disk, bandwidth and other resources can be flexibly expanded and used on demand; the company's projects, all One feature is that the number of visits is not fixed. When doing activities, the traffic will be several times the daily traffic. In order to cope with this situation, if it is a physical server, the company must always prepare a physical server that can cope with the highest traffic peak. equipment, but after the traffic peak, these physical equipment cannot be released like cloud servers and are not flexible.

2. Security and stability **: Based on the cluster server, the cloud server has stronger host performance, and the operation is more secure and stable;

3. Convenience : Cloud servers are more convenient to operate and upgrade. The resources in traditional servers are limited. If you want to acquire better skills, you can only upgrade cloud servers. The so-called "cloud" means network and Internet. A cloud server is a simple, efficient, safe and reliable computing service with elastically scalable processing capabilities. It is easier to operate. If the original configuration is too low, the CPU, hard disk, memory, etc. can be upgraded without reinstalling the system, which will not affect the previous use;

4. Low cost : Cloud servers are more cost-effective. Cloud servers are pay-as-you-go. Compared with traditional servers, you can buy as much as you want without wasting resources. Traditional physical servers must be prepared to meet traffic peaks. number of devices.

5. The benefits of cloud native

  • The rapid cloud native architecture uses agile development and units, which not only allows enterprises to develop quickly and do not make products automatically, but also continuously update products so that products can keep up with demand, and even guide demand, allowing enterprises to stand in a different position. lost ground.
  • Elastic expansion The cloud-native architecture is inherently characterized by cloud computing, and resources can be scaled on demand, which not only improves resource utilization, but also greatly reduces enterprise costs.
  • The strong cloud-native architecture relies on the container orchestrator to combine k8s and microservices to have automatic recovery capabilities, fault tolerance capabilities, and fault isolation capabilities, making applications stronger.
  • Shield the underlying differences, because the containerized technology applications used run in containers, there is no need to consider the differences in underlying hardware, which greatly simplifies the workload of development, and is also extremely friendly to operation and maintenance personnel, no need to worry about environmental issues. And distressed.

6. Summary

Having said so much, you can simply understand that cloud native is to change the development environment from physical servers to cloud servers, and then make some technical architecture adjustments to adapt to the environment of this cloud server. This is cloud native.

Guess you like

Origin blog.csdn.net/qq_45171957/article/details/124076530