Function Compute is an event-driven, fully managed computing service. To use Function Compute, you need to only upload your code or images. This allows you to focus on coding without needing to plan and purchase infrastructure such as servers. Function Compute allocates computing resources, runs tasks in an elastic and reliable manner, and provides features such as logging, performance monitoring, and alerting.
Tutorial video
What is Function Compute?
Function Compute is a serverless compute engine that is designed with function computing in mind. It provides an event-driven solution to implement end-to-end functions between Alibaba Cloud services. Function Compute allows you to create and deploy applications and services of any type in a quick and efficient manner. Furthermore, you are charged only for the actual resources used when you run your code.
What is a serverless architecture?
Compared with serverful architectures, serverless architectures lets you pay only for the resources you use instead of all provisioned servers. This allows enterprises to focus only on developing their business logic without the need to manage servers.
Architecture
Function Compute consists of several components, including services, functions, instances, runtime environments, triggers, and layers. The following figure shows the architecture of Function Compute.
For description about the features and components shown in the figure, see Terms.

Key features
Feature | Description | Reference | |
Triggers | Function Compute supports HTTP triggers and event triggers, such as Object Storage Service (OSS) triggers and Log Service triggers. In addition, Function Compute is seamlessly integrated with EventBridge, which expands the scope of triggers that can be used with Function Compute. | ||
Multiple programming languages | Function Compute supports Java, Python, Node.js, PHP, Go, and .Net Core. You can also build the runtime of other languages by using custom runtimes, such as Go custom runtime, Ruby custom runtime, and PowerShell custom runtime. You can also use custom images as runtime environments. | ||
Canary release | You can perform canary releases in Function Compute. This lets you have both the new version and the old version available at the same time to verify the capabilities of the new version before you completely replace the old version. You can also switch between the main version and the canary release version by changing the version number to which the alias points. This lets you switch traffic smoothly between both versions. | ||
High concurrency | Function Compute supports high concurrency of a single instance to help reduce usage of instance resources, optimize resource costs, and reduce cold starts. By default, the concurrency value of an instance is one. In this case, a single instance can process only one request at a time. If you set the concurrency to a value greater than 1, Function Compute creates a new instance only when the number of concurrent requests that are being processed by the existing instance exceeds the specified value. | ||
Observability | Log Service | Function Compute allows you to store function invocation logs in Log Service, and then perform operations such as code debugging, fault analysis, and data analysis based on the logs. | |
Metric monitoring | Function Compute provides monitoring metrics of multiple levels and dimensions. Real-time monitoring data and performance data are visualized as easy-to-read graphs and charts. This enables you to perform end-to-end monitoring and troubleshooting. | ||
Tracing Analysis | Tracing Analysis adopts the OpenTracing standard and is compatible with open source communities. Tracing Analysis provides developers of distributed applications with various features. For example, it enables developers to query and diagnose distributed traces, dynamically discover distributed topologies, and summarize application performance in real time. Function Compute integrates Tracing Analysis. You can use Jaeger to upload trace information so that you can track function invocation. Tracing Analysis helps you analyze and diagnose performance bottlenecks in serverless architectures. This improves development and diagnostics efficiency in serverless scenarios. |
Preparations
Before you use Function Compute to deploy and debug applications, we recommend that you familiarize yourself with the following aspects:
Basic concepts of serverless architectures and forms of serverless architectures: function as a service (FaaS), platform as a service (PaaS), and backend as a service (BaaS)
A high-level programming language, such as Python, Node.js, Java, Go, and. NetCore, as well as basic concepts such as runtime environments and dependency management
Network knowledge, such as public networks and private networks
Workflow
The following figure shows the workflow of Function Compute.
The preceding procedure consists of the following steps:
Activate the Function Compute service. Create an Alibaba Cloud account and activate Function Compute.
Develop an application or service by writing code. For information about the programming languages supported by Function Compute, see Overview.
Upload the application to Function Compute.
You can use one of the following methods to upload the application:
(Recommended) Use the Function Compute console.
(Recommended) Use Serverless Devs.
For more information about how to use Serverless Devs, see Serverless Devs.
Use an API operation or SDK.
For more information, see SDK Reference (2021-04-16, recommended).
Trigger function execution. A function can be triggered by events or API operations. Function Compute supports automatic scaling based on the number of requests. This process is transparent to you and your customers.
You are charged based on the actual execution duration of the function. After the function is executed, you can view the execution fees on the bill. The billing granularity is accurate to the millisecond. For more information, see Billing overview.
How to use a function
You can use the following methods to create and manage your application functions:
Use the Function Compute console. The Function Compute console provides a web UI for you to access functions. For more information, see Create a function in the Function Compute console.
Use Serverless Devs. You can download Function Compute application templates and use the templates to develop and deploy function applications. For more information, see Manage function resources by using Serverless Devs.
Call SDKs of Function Compute. SDKs provides language-specific API operations and can manage connection settings, such as signature calculation, retry handling, and error handling. For more information, see Use SDKs to run HTTP trigger functions.
Support for multiple languages
The following table lists the languages that can be used to write function code in Function Compute and the editing methods that are supported by each language.
Programming language | Supported deployment methods |
Function Compute console, Serverless Devs, and SDKs | |
Function Compute console, Serverless Devs, and SDKs | |
Function Compute console, Serverless Devs, and SDKs | |
Serverless Devs and SDKs | |
Serverless Devs and SDKs | |
Serverless Devs and SDKs | |
Serverless Devs and SDKs | |
Serverless Devs and SDKs |
For information about the languages that are supported by custom runtimes, see Event handlers and HTTP handlers.
Pricing
For more information about the billing of Function Compute, see Billing overview.
References
Topic | Description |
Describes the types of functions that are supported by Function Compute and the deployment methods of functions. Types of functions include event functions and HTTP functions. Methods to deploy function include Use Built-in Runtime, Use Custom Runtime, and Use Container Image. | |
Describes terms in Function Compute to help you better understand and use Function Compute. | |
Provides answers to commonly asked questions about Function Compute. | |
Provides methods to contact technical support when you encounter problems or want to provide feedback. |