04 Serverless Technology Selection

04 Serverless Technology Selection #

Today, let’s talk about the Serverless field. It is not just about function compute, but also different Serverless products and application types that cater to different user groups and usage habits. For example, there are function-oriented function compute, application-oriented Serverless application engine, and container-oriented Serverless Kubernetes. Users can choose the appropriate Serverless product based on their usage habits, scenarios, or application types. In this article, we will introduce the Serverless products available on Alibaba Cloud.

Serverless Products and Layers #

As we all know, AWS was the first to propose Serverless, and its flagship product in the Serverless field is function compute. Similarly, Alibaba Cloud also has its own function compute product, which helps users build Serverless functions. However, Serverless is not just about functions. As shown in the diagram below, users also expect to enjoy the benefits of Serverless at the application and container levels, including pay-per-use and extreme elasticity, which align with their existing usage habits.

image.gif

In the diagram above, you can see that Alibaba Cloud has launched corresponding Serverless products for functions, applications, and containers. Users can choose different products based on their usage scenarios.

Function Compute #

1. Introduction to Function Compute #

img

The diagram above shows how Function Compute is used. From the user’s perspective, all they need to do is write code and upload it to Function Compute. At this point, there is no cost involved until the code is actually invoked. Invocation can be triggered through APIs/SDKs provided by the product or through event sources such as Alibaba Cloud’s OSS events. For example, if a user uploads a file to a specific bucket in OSS and wants the file to be automatically processed, or if they upload a zip package and want it to be automatically uncompressed to another bucket, these are typical function scenarios.

In addition, Function Compute provides excellent elasticity. The final cost is calculated based on the duration and memory usage. If the invocation volume is low, there will only be minimal costs. It also supports a wide range of programming languages such as Node.js, PHP, Python, and Java out of the box. It also allows custom runtime environments for supporting any executable language.

2. Typical Scenarios for Function Compute #

image.gif

In terms of usage scenarios, there are mainly three categories:

  • Web applications. These applications can be written in various languages. Users can either develop new programs using Serverless frameworks or use existing applications. Examples include backends for mini-programs or API backends published on the API marketplace.
  • Applications with strong demands for computational elasticity. This includes AI inference, audio and video processing, document conversion, etc.
  • Event-driven applications. These can be driven by other Alibaba Cloud products, webhooks, scheduled tasks, etc. Function Compute has been integrated with many products, such as Object Storage Service (OSS), Table Store, Timer, Content Delivery Network (CDN), Log Service, CloudMonitor, etc. This allows users to quickly assemble business logic.

3. Core Competencies of Function Compute #

image.gif

The biggest value of Function Compute to customers is that it allows them to focus solely on developing their business logic without worrying about operations and management. They don’t need to concern themselves with resources, network settings, etc. In terms of isolation, it provides VM-level isolation to ensure data security and runtime security. In terms of availability, it defaults to a high availability architecture with 3 availability zones (3AZs), ensuring that customers automatically have the best practice for high availability. It provides millisecond-level elasticity to meet sudden traffic surges. In terms of billing, it provides flexible charging based on actual usage and also supports a prepaid model that is more friendly to long-running applications.

Serverless Application Engine #

1. SAE Overview #

img

SAE is the first Serverless PaaS platform targeting applications in the industry. This product helps users migrate existing applications to the cloud without any modifications. Users no longer need to manage and operate machines and clusters at the resource layer. They only need to focus on the specifications and instance numbers required by their applications, without worrying about whether it is VMs or containers at the underlying level. SAE provides computing resources, elasticity, and isolation capabilities at the resource level, allowing users to focus only on their applications. At the application layer, SAE provides capabilities such as monitoring, logging, and microservice governance to help users meet their application observability and governance needs. It also provides network configuration and traffic control capabilities, as well as good integration with CICD, allowing users to deploy to SAE using existing CICD tools such as Jenkins or Yunxiao. In other words, it covers the complete scenario of deploying applications to the cloud.

2. Typical Scenarios for SAE #

image.gif

SAE has several typical use cases. One is migrating existing businesses to the cloud, especially microservices and Java applications. It also supports monolithic applications in other programming languages, allowing them to run on Alibaba Cloud through the SAE platform without any code modification. In terms of industries, SAE is particularly suitable for online businesses with significant traffic fluctuations, such as e-commerce promotions or online education. Additionally, SAE can be integrated with industry SaaS solutions, helping users build industry-specific SaaS platforms more quickly.

3. Features of SAE #

img

Based on the scenarios mentioned above, we can see that besides the extreme elasticity and maintenance-free features that come with the Serverless experience itself, SAE focuses on providing users with full-stack capabilities at the application layer. This includes enhanced support for microservices and integration with capabilities related to applications, such as configuration, monitoring, logging, and traffic control. When combined with zero code modifications required from users, SAE becomes an excellent choice for smoothly migrating enterprise online businesses to the cloud.

Serverless Kubernetes #

1. Overview of ASK #

img

Another Serverless product provided by Alibaba Cloud is Serverless Kubernetes. But how can Kubernetes be Serverless? To understand this, we need to look at the evolution of the technical architecture.

In the beginning, Docker images were deployed in virtual machines (VMs), with users needing to purchase Elastic Compute Service (ECS) and deploy the images themselves. This process also involved network configuration, such as SLB and EIP. Users had to complete the deployment actions themselves, and scaling required repeating these actions or building a set of automated scripts. This approach had relatively low cost-efficiency and stability.

Later, Kubernetes came into play to solve the problem of container orchestration. This standardized approach significantly improved everyone’s productivity. Users deployed images using standard Kubernetes methods like deployments and services. However, operating and managing Kubernetes was still relatively complex, with high skill requirements. Users had to maintain ECS and the Kubernetes clusters built on top of ECS. Another pain point was that ECS instances in a Kubernetes cluster needed to be purchased in advance. If the workload had significant volatility, there would be resource wastage. Although there were technical solutions, such as the elasticity of worker nodes, they added complexity for novice users.

So, is there a solution that allows users to enjoy Kubernetes’ container orchestration capabilities without worrying about the operation, management, and elasticity issues of ECS and Kubernetes? This is where Serverless Kubernetes, specifically Alibaba Cloud’s ASK, comes into the picture. In the ASK solution, users create an ASK cluster without specifying any ECS nodes. They then deploy images using standard Kubernetes container orchestration methods like deployments. ASK automatically builds the required pods based on users’ load demands and performs elastic scaling in the underlying resource pool. Users no longer need to worry about capacity planning, ECS machine maintenance, resource limitations, or other IaaS-level issues. It is extremely convenient.

2. Typical Scenarios for ASK #

image.gif

In which scenarios is ASK mainly used? It can be used to run online businesses, as it offers flexible deployment patterns, including deployments, helm charts, and all other native Kubernetes modes. It is particularly effective in handling bursts of traffic with extreme elasticity, able to scale 500 container instances in 30 seconds. This elastic efficiency is suitable for supporting big data computing tasks, such as Spark and Presto. It also provides on-demand resources when needed, supporting more than 10,000 pods to reduce customer costs effectively.

Another suitable scenario is to build on-demand startup tasks, such as running Jenkins or Gitlab-Runner in ASK. These tasks start immediately when there are build requirements and consume zero resources when there are no tasks, minimizing costs. The mentioned examples represent only a few scenarios, but in reality, based on the features of ASK, users can run many K8s-native workloads requiring extreme elasticity.

3. Features of ASK #

img

ASK is a fully containerized deployment with container isolation. During usage, users do not need to maintain ECS or Kubernetes clusters, nor do they need to worry about cluster upgrades, capacity planning, OS and system software issues, etc. In theory, ASK can provide infinite elastic capacity because it charges based on usage, eliminating the need for resource limitations and associated payments.

Conclusion #

In conclusion, Alibaba Cloud has a wide range of products in the Serverless domain. There is Function Compute, which is focused on functions, allowing users to concentrate on code development and rapid delivery. Serverless Application Engine (SAE) is focused on applications, providing users with a set of application-related capabilities such as monitoring, logging, and traffic integration. For users who are more accustomed to the Kubernetes ecosystem, ASK allows them to enjoy the advantages of Serverless without changing their existing Kubernetes usage habits. With these diverse products, Alibaba Cloud meets different user demands and provides users with the advantages of Serverless, such as maintenance-free operation, extreme elasticity, and pay-as-you-go pricing.