By Xinsheng, Alibaba Cloud technical expert
In the two weeks since OpenYurt was made open source, its non-intrusive architecture design for integrating cloud native and edge computing has attracted attention from a lot of developers. Alibaba Cloud launched the open-source OpenYurt project to share its experience in the cloud-native edge computing field with the open-source community, accelerate the extension of cloud computing to the edge, and work with the community to define unified standards for the future cloud-native edge computing architecture.
To help the community and users better understand OpenYurt, we have published a series of Deep Dive into OpenYurt articles. This article is the second in this series and describes the OpenYurt edge autonomy design. In case you have not done so, do check out the previous article, "OpenYurt Out-of-the-Box Evaluation: Instantly Empower Native Kubernetes Clusters with Edge Computing Capabilities."
OpenYurt was officially released on May 29, 2020. As the core framework of the ACK@Edge service, OpenYurt is used for CDN, audio and video live streaming, IoT, logistics, industrial brain, city brain, and other scenarios, serving Alibaba Cloud LinkEdge, Freshippo (Hema Fresh), Youku, ApsaraVideo, and other businesses and projects. Its open-source capabilities include:
You can visit the GitHub page for OpenYurt to participate in the open-source project.
When Kubernetes is extended to edge computing scenarios, edge nodes are connected to the cloud through public networks. Due to the instability of public networks, costs, and other factors, the edge requires edge businesses to continuously run when the network is unstable or disconnected. Edge autonomy is one of the primary edge computing demands mentioned in Gartner's edge computing report.
In the Kubernetes system architecture, container information in the secondary agent (kubelet) is saved in the memory. When the network is disconnected, business data cannot be obtained from the cloud. If a node or the kubelet is restarted, service containers cannot be restored, as shown in the following figure.
To achieve edge autonomy, the following issues need to be solved in Kubernetes:
Reconstruct the kubelet component or reuse or reference the kublet checkpoint feature to store business data in containers to a local disk. When the network is disconnected, locally cached data can be used to recover businesses.
This solution reconstructs the kubelet to meet the requirements of edge autonomy and has the following advantages:
However, this solution introduces the following disadvantages:
We added a web cache and request agent hub called YurtHub on edge nodes (and edge-hub in business products). The edge component (kubelet) communicates with the cloud through YurtHub. YurtHub is a transparent gateway with a data caching feature. When the network connection to the cloud is disconnected and the node or kubelet is restarted, data of service containers is obtained from YurtHub to ensure edge autonomy.
Compared with solution 1, solution 2 has the following advantages:
The OpenYurt solution also has the following disadvantages: The native kubelet is not lightweight, creating major challenges when dealing with limited resources. In business products, the minimum node specification is 2U4G.
The solutions for issues 2 and 3 are simple, so I will not describe them in much detail.
Issue 2: The native cloud component kube-controller-manager removes pods.
This issue is solved by Node Controller in the open-source yurt-controller-manager component, as shown in the following figure.
Issue 3: Edge and cloud data may be inconsistent when the network recovers.
In Kubernetes, users manage the edge through the cloud, for example, by deploying, upgrading, and scaling applications. When the edge is disconnected from the cloud, edge nodes will not synchronize users' node control operations from the cloud. When a network disconnection occurs, YurtHub only needs to ensure that the locally cached data is consistent with the data that existed when the network was disconnected. This means the data cached on the edge is not updated during the network disconnection. When the network recovers, edge nodes can synchronize the latest data from the cloud.
OpenYurt has only been available for a short time and has a long way to go. We believe that our cloud-native architecture design will help OpenYurt go further. In addition, OpenYurt's design philosophy of "extending your native Kubernetes to edge" is popular among cloud-native enthusiasts.
Alibaba Developer - January 21, 2021
Alibaba Developer - October 13, 2020
Alibaba Developer - June 19, 2020
Alibaba Developer - July 9, 2021
Alibaba Developer - January 20, 2021
Alibaba Developer - May 31, 2021
Provides secure and reliable communication between devices and the IoT Platform which allows you to manage a large number of devices on a single IoT Platform.Learn More
Link IoT Edge allows for the management of millions of edge nodes by extending the capabilities of the cloud, thus providing users with services at the nearest location.Learn More
A cloud solution for smart technology providers to quickly build stable, cost-efficient, and reliable ubiquitous platformsLearn More
Migrate your Internet Data Center’s (IDC) Internet gateway to the cloud securely through Alibaba Cloud’s high-quality Internet bandwidth and premium Mainland China route.Learn More
More Posts by Alibaba Cloud Native Community