All Products
Search
Document Center

Function Compute:What is Function Compute?

Last Updated:Feb 19, 2024

Function Compute is a fully managed, event-driven computing service. To use Function Compute, you need to only write and upload your code or images. This allows you to focus on coding without the need 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?

You can create and deploy applications and functions in an efficient manner by using Function Compute and pay only for the resources that you use. With Function Compute, you can quickly and efficiently create and deploy applications and functions, and you only pay for what you use.

What is a serverless architecture?

Compared with serverful architectures, serverless architectures allow you to run code without the need to manage servers. You pay only for the resources that you use.

Architecture

Function Compute provides services by using components, such as functions, instances, runtimes, triggers, and layers. The following figure shows the architecture of Function Compute.

For information about components in the following figure, see Terms.

image

How to use Function Compute

Before you start

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 runtimes and dependency management

  • Network knowledge, such as public networks and private networks

How Function Compute works

The following figure shows how Function Compute works.

image.png

The following information describes the workflow of Function Compute:

  1. Activate the Function Compute service. Register an Alibaba Cloud account and activate Function Compute. For more information, see Step 1: Activate Function Compute.

  2. Use a programming language to write an application and a function. For information about the languages that are available for Function Compute, see Overview.

  3. Upload the application to Function Compute.

    To upload the application, you can use one of the following methods:

  4. Trigger function execution. A function can be triggered by events or API operations. Function Compute supports auto scaling based on requests. This process is imperceptible to users.

  5. 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 one millisecond. For more information, see Overview.

Use applications and functions

You can use the following methods to create and manage your applications and functions:

  • Use the Function Compute console. Function Compute console provides a web UI that you can use to access applications and functions. For more information, see Quickly create a function.

  • Call the Function Compute SDK. SDKs provide language-specific API operations and can manage connection settings, such as signature calculation, retry policies, and error handling.

Languages

The following table lists the languages that can be used to write function code in Function Compute and the deployment methods that are supported in each language.

Programming language

Deployment method

Node.js

Function Compute console, Serverless Devs, and SDKs

Python

Function Compute console, Serverless Devs, and SDKs

PHP

Function Compute console, Serverless Devs, and SDKs

Java

Serverless Devs and SDKs

C#

Serverless Devs and SDKs

Go

Serverless Devs and SDKs

Custom Runtime

Serverless Devs and SDKs

Billing

For more information about the billing of Function Compute, see Billing overview.

References

Topic

Description

Common scenarios

Describes the common scenarios of Function Compute, including web applications, data extract, transform, data processing by using Extract, Transform, and Load (ETL), AI inference, and video transcoding.

Selection of the method to create functions

Selection of function storage

Describes function types and function storage types. Function types include event functions, web functions, and container functions. Function storage includes Apsara File Storage NAS (NAS), Object Storage Service (OSS), temporary storage, and layers. You can walk through these topics to obtain technical support in Function Compute.

Terms

Describes the terms that are used in Function Compute to help you better understand related concepts and use Function Compute.

Overview

Summarizes FAQs of different categories in Function Compute.

Contact Us

Provides methods to contact technical support when issues occur or when feedback is required.