What Exactly is Cloud Native?
In recent years, cloud native has become an increasingly popular concept across the open-source community. But what exactly is cloud native? Is it an architecture? A platform? What does it affect? System security? Development efficiency? So today, let’s dig deep and sort out what cloud native really is.
To understand what cloud native is, we need to start with its name. The English name for cloud native is “cloud native,” which obviously contains two parts: cloud and native. Cloud means the application runs in the cloud, not locally. Native means the application should run in the way best suited for the cloud, not just be migrated from local to the cloud.
So what kind of application is suited for the cloud? It’s one that maximizes the use of cloud capabilities and leverages the advantages of the cloud.
The core advantage of cloud computing is essentially just centralizing more resources for unified management and allocation, making it more convenient to flexibly allocate resources on demand and improve resource utilization.
By analogy, many people have used streaming frameworks like Storm. What are their advantages? One important factor is the ability to break down a complex workflow into multiple sub-nodes, where each node can be configured with different levels of concurrency based on its needs. Nodes with higher concurrency demands can receive more resources. This way, resource utilization is improved.
For microservices, it’s similar — splitting different functions into separate services allows independent scaling at a finer granularity.
It’s worth noting that splitting includes not only separating different business domains, but also separating business code, third-party software (third-party libraries), and non-functional features (high availability, security, observability, etc.) into three distinct categories.
Pure business splitting has actually been happening since very early stages of software development. The trend accompanying the rise of cloud native is to maximize the separation of non-business code portions from cloud applications, allowing cloud infrastructure to take over the many non-functional features originally in applications (such as elasticity, resilience, security, observability, canary releases, etc.) — this is the so-called service mesh.
Since resources and applications in the cloud are not strongly bound, to make resource utilization more convenient, we need a more universal runtime format that allows applications to have a certain degree of decoupling from their runtime environment. This is container technology. Containers provide a logical packaging mechanism. Applications packaged with this mechanism can operate independently of their actual runtime environment. Using this decoupling, regardless of whether the target environment is a private data center, public cloud, or a developer’s personal laptop, you can easily and consistently deploy container-based applications. Containerization makes the concerns of developers and IT operations teams distinct — developers focus on application logic and dependencies, while IT operations teams can focus on deployment and management without being distracted by specific software versions and application-specific configurations.
On the other hand, after splitting services into finer granularity, the system’s inherent complexity obviously increases. For example, local calls become network requests, and call chains cannot be reflected through code structure. Therefore, operations need to be more intelligent and automated to ensure stronger stability of individual services. At the same time, a powerful monitoring system is needed that can analyze dependencies between microservices and quickly detect anomalies in the system.
Furthermore, with smaller individual services and comprehensive monitoring data, we can deploy more frequently, even deploying directly to production after each change. If a deployment has issues, we can detect them promptly through monitoring, thereby controlling losses to a minimum. Small-scale deployments also make it easier to locate problems or roll back.
From the analysis above, we can organize some keywords related to cloud native, such as service-oriented, elastic, observable, resilient, automated, etc. These keywords can be summarized into four categories: microservices, DevOps, continuous delivery, and containerization.
The key characteristics of these four categories are:
Microservices: Can be independently deployed, updated, restarted, and scaled
DevOps: Automated, rapid, development-operations collaboration
Continuous delivery: Frequent releases, fast feedback
Containerization: Logical packaging mechanism
We’ve covered a lot of theory above. So what are the concrete implementation paths for adopting cloud native? We can consider the following aspects:
- Business service splitting: This is a very fundamental thing in software development. Splitting needs to follow basic design principles like SOLID.
- Comprehensive monitoring system: Including collecting information across log, trace, metric, and alert dimensions. Logs focus on recording information during code execution, traces are mainly for tracking the flow of the same request across different services, metrics are for monitoring system runtime status, and alerts are for anomaly notifications. The industry already has many open-source implementations, such as Prometheus, Jaeger, etc.
- Containers and container orchestration: This basically means Docker and K8s.
- Middleware mesh化: Business applications only retain a thin client layer, with the main logic in the middleware placed at the mesh layer.
- DevOps and continuous delivery: This mainly involves development workflows and many process-related aspects of development-operations collaboration. In a cloud environment, we advocate a pattern of small batches, frequent releases, and fast feedback.
I am Liu Sha. I hope this article can help everyone better understand what exactly cloud native is. Actually, cloud native is simple to describe — it’s about adopting various approaches to better utilize cloud resources. But when explained in detail, it’s a very comprehensive system covering everything from development to operations. Welcome to follow my WeChat public account (Mobility), or visit my personal website. I will gradually expand on all aspects of cloud native in future articles.
Original article: http://lichuanyang.top/posts/42843/
