By Yuanyi and Yu Zhuang
How to build a unified cloud-native serverless application platform on and outside the cloud? To put it simply, there are two key points: a distributed cloud or hybrid cloud strategy, and a standardized technical solution.
According to Gartner's report, by 2025, 50% of large enterprises will transform their business models in their chosen regions through distributed cloud services. Additionally, IDC's report states that in 2021, 86% of enterprises adopted distributed or hybrid cloud architecture, with only 14% opting for a public cloud. Gartner's report highlights security, operational complexity, and financial complexity as the main challenges of distributed cloud architecture.
• Technology selection: how to select a standardized serverless technology solution to achieve unified technology stacks on and outside clouds
• Lower costs: how to reduce resource and O&M costs
• Stability: how to ensure the stability of service operation
• Resiliency: on-premises IDC clusters can also elastically scale resources and indefinitely scale out serverless applications
Knative is an open-source Kubernetes-based serverless application orchestration framework. With its advantages of cloud-native and cross-platform serverless application orchestration, Knative has become a popular open-source serverless framework. Knative consists of three core components. These components form a general-purpose serverless framework:
• Serving: manages serverless workloads based on events and can automatically scale pods based on resource requests. If no workload is to be processed, the number of pods is scaled to zero. Serving is used to manage the workloads of serverless applications to provide services to users. Pod auto-scaling is one of the most important features of Knative Serving. Currently, pods can be scaled without limits. Knative Serving also supports canary release.
• Eventing: provides event management capabilities, such as producing and consuming events. Eventing provides an all-in-one system for event-driven serverless applications. The system provides features that allow you to install external event sources, register and subscribe to events, and filter events. The event system decouples event producers and event consumers. An event producer can generate events before active event consumers listen to events. An event consumer can listen to events before active producers produce events.
• Function: Knative Functions provides you with an easy way to create, build, and deploy Knative services. You can use Knative Functions to deploy stateless, event-driven functions as Knative services to Kubernetes clusters without the need to deeply understand the underlying technology stacks, such as Kubernetes, containers, and Knative.
ACK One (Distributed Cloud Container Platform for Kubernetes) is an enterprise-level cloud-native platform provided by Alibaba Cloud to meet container management requirements in hybrid cloud, multi-cluster, distributed computing, and disaster recovery scenarios.
ACK One now supports managed Knative. You can use ACK One and Knative to build a unified cloud-native serverless application platform on and outside the cloud so that you can use Knative to manage cloud resources with ease. On-premises IDC clusters can also elastically scale resources and indefinitely scale out serverless applications.
• Self-built on-premises IDC clusters are connected to ACK One registered clusters, realizing the same O&M experience as ACK One.
• Consistent user experience of Knative, and O&M-free components
• ACK One registered clusters provide cloud-based elasticity for self-built on-premises IDC clusters. Combined with ECIs (Elastic Container Instances), ACK One allows you to use cloud resources on demand at any time.
• ACK clusters on the public cloud and self-built on-premises IDC clusters provide higher stability.
LangChain-Chatchat is an open-source Q&A application based on the local knowledge base that utilizes LangChain. Let's take a look at how to deploy a LangChain-Chatchat application based on ACK One + Knative.
• An external cluster is registered with Container Service for Kubernetes (ACK) through a registered cluster. For more information, see Create a registered cluster [1].
• Only offline clusters in Calico route reflection mode or Cilium BGP route mode are supported.
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: knative-llc-demo
spec:
template:
metadata:
annotations:
autoscaling.knative.dev/maxScale: '100'
autoscaling.knative.dev/minScale: '1'
k8s.aliyun.com/eci-extra-ephemeral-storage: 80Gi
k8s.aliyun.com/eci-use-specs: 'ecs.gn5-c4g1.xlarge,ecs.gn5i-c8g1.2xlarge,ecs.gn5-c8g1.2xlarge'
spec:
containers:
- image: registry.cn-hangzhou.aliyuncs.com/knative-sample/chatchat:0.2.7
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8501
name: http1
protocol: TCP
name: lcc
On the Services tab, record the gateway IP address and the default domain name of the Service.
1. Add the following information to the hosts file to point the domain name of the service to the IP address of the gateway for the knative-llc-demo service. The following sample code shows the content to be added to the hosts file.
39.104.58.99 knative-llc-demo.default.example.com # The gateway IP address and domain name are subject to your actual data.
2. After you modify the hosts file, on the Services tab, click the Default Domain Name of the knative-llc-demo service to access LangChain-Chatchat. As shown in the figure, LangChain-Chatchat can be directly accessed through the domain name.
ACK One now supports managed Knative, providing standardized serverless application capabilities both on and off the cloud. By connecting a self-built on-premises IDC cluster to ACK One through a registered cluster, you can achieve the same operational and maintenance experience as with ACK One. Additionally, ACK One offers elastic capabilities on the cloud. When combined with ECIs, ACK One enables on-demand utilization of cloud resources and the infinite scaling out of serverless applications. For more details, please refer to ACK One registered clusters [3] and ACK One Knative [4].
[1] Create an ACK One registered cluster
[2] ACK console
[3] ACK One registered clusters
[4] ACK One Knative
Disaster Recovery Architecture and Solution Based on Kubernetes Clusters
Alibaba Cloud ACK One GitOps: Streamline Multi-Cluster Application Delivery
166 posts | 30 followers
FollowAlibaba Container Service - October 21, 2019
Alibaba Container Service - November 21, 2024
Alibaba Cloud Native - September 11, 2023
Alibaba Container Service - July 22, 2024
Xi Ning Wang - March 19, 2020
Hironobu Ohara - February 3, 2023
166 posts | 30 followers
FollowAccelerate and secure the development, deployment, and management of containerized applications cost-effectively.
Learn MoreAlibaba Cloud Function Compute is a fully-managed event-driven compute service. It allows you to focus on writing and uploading code without the need to manage infrastructure such as servers.
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 MoreProvides a control plane to allow users to manage Kubernetes clusters that run based on different infrastructure resources
Learn MoreMore Posts by Alibaba Container Service