By Yuanyi
Knative is a Kubernetes-based, open-source Serverless application orchestration framework. Knative on Alibaba Cloud is deeply integrated with Alibaba Cloud products based on the Knative for the community to provide the purest experience of containerized Serverless.
1. About Knative
2. Knative on Alibaba Cloud
3. Example
Knative is a Kubernetes-based open-source Serverless application orchestration framework. Knative includes workloads, Kubernetes-native orchestration engines, and complete event systems and aims to standardize Serverless workload orchestration using Kubernetes. Core Knative modules include Eventing, an event-driven framework, and Serving for deploying workloads.
The core capability of Knative Serving is its simple and efficient application hosting service, which is also the foundation for its support for Serverless. As a Serverless framework, Knative can allocate resources based on demand. It scales out instances automatically when applications have a large number of requests and scales in instances when the request volume falls, thus reducing costs. In addition, Serving provides support for traffic management and flexible canary release. The traffic management can split traffic according to the traffic percentage, while the canary release can perform gray release according to the traffic percentage.
Knative Service, a simple application model, has been provided. It meets the requirements of service deployment, service access, and canary release. It can be expressed with the following formula: Knative Service = workload (deployment) + service access (service) + traffic in canary release (ingress). The following figure shows the application model:
1. Application Hosting
2. Traffic Management
3. Canary Release
4. Auto Scaling
As a Serverless framework, Knative has a core capability of auto scaling. It provides multiple elasticity policies:
The Event-driven feature is the standard for Serverless, while Knative also provides an event-driven framework called Eventing.
Eventing in Knative provides a complete event model, which can access events in various external systems easily. After accessing, events are forwarded internally through the CloudEvent standard.
Two event forwarding models are available in Knative Eventing:
Which method should be used to forward events? The Broker/Trigger model is implemented based on the underlying message system. For event sources, such as GitHub, GitLab, and Kubernetes API server, message events need to be buffered to ensure reliable message transmission. So, we recommend forwarding the messages to Broker and Trigger from event sources.
For event sources that were originally message systems, such as Message Service (MNS), Kafka, and RocketMQ, it is more efficient to forward events to services directly.
At this point, it is necessary to mention Knative's event sources, which are similar to the event-driven engine. Knative Eventing supports the procedure of event processing based on these event sources.
The Knative community provides various event sources, such as Kafka and GitHub. Moreover, event sources of cloud products for message delivery have been accessed as well, such as MNS and RocketMQ.
Knative on Alibaba Cloud is based on Knative for the community. It is fully integrated with the Alibaba Cloud resource system and provides richer capabilities and support for cloud products.
Here's an example of how to use Knative on Alibaba Cloud. It is about sending bullet-screen comments. The effect is shown below:
Some capabilities brought by Knative on Alibaba Cloud are listed below:
Hopefully, these capabilities can bring real on-demand use experience to users and reduce the cost of O&M and resource use, which is also the goal pursued by Serverless.
DADI: Alibaba Cloud's Open-Source Accelerated Container Image Technology
166 posts | 30 followers
FollowAlibaba Container Service - July 19, 2021
Alibaba Developer - February 3, 2020
Alibaba Container Service - May 12, 2021
Alibaba Container Service - July 22, 2021
Alibaba Container Service - March 8, 2021
Alibaba Container Service - July 19, 2021
166 posts | 30 followers
FollowProvides a control plane to allow users to manage Kubernetes clusters that run based on different infrastructure resources
Learn MoreAlibaba Cloud Container Service for Kubernetes is a fully managed cloud container management service that supports native Kubernetes and integrates with other Alibaba Cloud products.
Learn MoreVisualization, O&M-free orchestration, and Coordination of Stateful Application Scenarios
Learn MoreServerless Application Engine (SAE) is the world's first application-oriented serverless PaaS, providing a cost-effective and highly efficient one-stop application hosting solution.
Learn MoreMore Posts by Alibaba Container Service