Function Compute is a fully managed, event-driven computing service. With Function Compute, you do not need to purchase or manage infrastructure, such as servers. You only need to write and upload code or images. Function Compute prepares compute resources, runs your tasks elastically and reliably, and provides features such as log queries, performance monitoring, and alerts.
Videos
What is Function Compute?
Function Compute is a form of serverless architecture. It is function-oriented and provides event-driven, end-to-end solutions across Alibaba Cloud services. With Function Compute, you can quickly build any type of application and service, and pay only for the resources that your tasks consume.
What is serverless?
Unlike traditional server-based architectures, serverless architectures allow developers to focus on business logic without managing servers. You pay only for the resources you use.
Service architecture
Function Compute consists of components such as services, functions, instances, runtimes, triggers, layers, and Application Center. The following figure shows the service architecture.
For more information about the basic concepts of the components in the following figure, see Terms.
How to use
Prerequisites
To successfully deploy and debug applications using Function Compute, you need the following experience and expertise.
-
Understand the basic concepts of serverless architecture and its three forms: Function as a Service (FaaS), Platform as a Service (PaaS), and Backend as a Service (BaaS).
-
Be proficient in a high-level programming language, such as Python, Node.js, Java, Go, or .NET Core, and understand concepts such as its runtime environment and dependency management.
-
Be familiar with cloud and networking concepts, such as public and private networks.
If you are new to Function Compute, watch the videos to learn the basics of serverless and Function Compute. For more information, see Videos.
Workflow
The following figure shows the workflow of Function Compute.
The workflow is as follows.
-
Create an account and activate Function Compute. For more information, see Step 1: Activate Function Compute.
-
Write applications and services in a programming language. For information about the programming languages that Function Compute supports, see Code development overview.
-
Upload your applications to Function Compute.
You can upload applications in one of the following three ways.
-
(Recommended) Upload applications in the Function Compute console.
-
(Recommended) Upload applications using the Serverless Devs tool.
For more information, see Serverless Devs.
-
Upload applications using an API or SDK.
For more information, see SDK Reference (2021-04-06, recommended).
-
-
Trigger the function to run. You can trigger a function using an event trigger or by calling an API. Function Compute automatically scales resources based on the number of user requests. This process is transparent to you and your users.
-
You are billed based on the actual execution duration of the function. After a function is executed, you can view the charges on your bill. The billing granularity is 1 millisecond. For more information, see Billing overview.
Methods
You can create and manage your function applications in the following ways.
-
Use the Function Compute console. The console provides a web-based interface to access features. For more information, see Quickly create a function.
-
Use the Serverless Devs tool. You can download a Function Compute application template to quickly develop and deploy a function application. For more information, see Manage function resources using Serverless Devs.
-
Use the Function Compute SDK. The SDK provides language-specific APIs and manages connection details, such as signature calculation, request retries, and error handling. For more information, see Use an SDK to run an HTTP function.
Language support
The following table lists the languages that you can use to write Function Compute function code and the deployment methods that each language supports.
|
Programming language |
Supported deployment methods |
|
Console, Serverless Devs, and SDK |
|
|
Console, Serverless Devs, and SDK |
|
|
Console, Serverless Devs, and SDK |
|
|
Serverless Devs and SDK |
|
|
Serverless Devs and SDK |
|
|
Serverless Devs and SDK |
|
|
Serverless Devs and SDK |
|
|
Serverless Devs and SDK |
For a list of languages that Custom Runtime supports, see Event function examples and HTTP function examples.
Billing
For more information about Function Compute billing, see Billing overview.
Related links
|
Link |
Description |
|
Outlines the main scenarios of Function Compute, including web applications, data extract, transform, and load (ETL) processing, AI inference, and video transcoding. |
|
|
Outlines the function types (event functions and HTTP functions), function runtimes (built-in runtimes, custom runtimes, and Custom Container runtimes), and function storage (File Storage NAS, Object Storage Service (OSS), temporary storage, and layers) that Function Compute supports. This information helps you with technology selection. |
|
|
Defines the terms specific to Function Compute to help you better understand the concepts and use Function Compute. |
|
|
Summarizes common questions and their solutions when you use the Function Compute service. |
|
|
If you have any feedback or questions, join the Function Compute user group on DingTalk. |