05 Function Compute Brief Introduction

05 Function Compute Brief Introduction #

What is Function Compute #

As we all know, Serverless does not mean “no servers”, but rather that developers no longer need to worry about servers. The following diagram shows the comparison between the development and deployment of an application in traditional Serverful architecture and Serverless architecture:

1.jpg

In the traditional Serverful architecture, deploying an application involves purchasing servers, deploying operating systems, setting up development environments, writing code, building applications, deploying applications, configuring load balancing mechanisms, setting up log analysis and monitoring systems, and continuously monitoring the running status of the application. In contrast, in the Serverless architecture, developers only need to focus on the development, building, and deployment of the application, without having to worry about server-related operations and maintenance. In the Function Compute architecture, developers only need to write business code and monitor the running status of the business. This frees developers from the heavy burden of operations and maintenance, allowing them to focus their energy on more meaningful business development.

2.png

The above diagram illustrates how Function Compute is used. From the user’s perspective, all they need to do is write the code and upload it to Function Compute. Uploading the code means deploying the application. When high concurrent requests come in, developers do not need to manually scale up the system. Function Compute automatically scales up within milliseconds based on the request volume, ensuring reliable and elastic execution of tasks. It also provides built-in features such as log query, performance monitoring, and alarms to help developers detect and locate problems.

Core Advantages of Function Compute #

3.png

Agile Development #

  • When using Function Compute, users only need to focus on the development of business logic and write the most important “core code”.
  • No longer need to worry about server purchases, load balancing, and automatic scaling operations.
  • Greatly reduces the complexity of service construction and effectively improves the speed of development and iteration.

Elastic Scaling #

  • Function Compute automatically scales elastically based on the request volume, without any manual configuration.
  • Schedules computing resources at the millisecond level to easily cope with business peaks.

Stability and High Availability #

  • Function Compute is deployed in a distributed and multi-availability zone manner.
  • If a certain availability zone becomes paralyzed due to natural disasters or power failures, Function Compute quickly switches to the infrastructure in other available zones within the same region to ensure high service availability.

Competitive Cost #

  • Function Compute provides rich measurement modes to help you achieve significant cost advantages in different scenarios.
  • The pay-as-you-go model charges based on the actual usage of computing resources, achieving resource utilization of up to 100% if no computing resources are occupied.
  • The pre-paid model calculates computing capacity based on estimated business workloads, with a lower unit price. By combining pay-as-you-go and pre-paid methods, costs can be effectively reduced.

Use Cases of Function Compute #

4.jpg

In terms of use cases, there are mainly three types:

  • Web applications: These can be programs written in various languages, including newly developed applications using Serverless frameworks, as well as existing applications. For example, they can be backend for a mini program or a Web API.
  • Applications with strong demand for elastic computing power: For example, AI inference, audio and video processing, image and text conversion, etc.
  • Event-driven applications: For example, scenarios driven by other Alibaba Cloud products, such as Web Hooks and scheduled tasks.

Function Compute has been connected to many products, such as Object Storage Service (OSS), Tablestore, timers, Content Delivery Network (CDN), Log Service, CloudMonitor, and more. This allows for the rapid assembly of some business logic.