What is Function Compute?

更新时间:
复制 MD 格式

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.

image

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.work_flow

The workflow is as follows.

  1. Create an account and activate Function Compute. For more information, see Step 1: Activate Function Compute.

  2. Write applications and services in a programming language. For information about the programming languages that Function Compute supports, see Code development overview.

  3. Upload your applications to Function Compute.

    You can upload applications in one of the following three ways.

  4. 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.

  5. 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

Node.js

Console, Serverless Devs, and SDK

Python

Console, Serverless Devs, and SDK

PHP

Console, Serverless Devs, and SDK

Java

Serverless Devs and SDK

C#

Serverless Devs and SDK

Go

Serverless Devs and SDK

Custom Runtime

Serverless Devs and SDK

Custom Container

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

Common scenarios

Outlines the main scenarios of Function Compute, including web applications, data extract, transform, and load (ETL) processing, AI inference, and video transcoding.

Select a function type

Select a function runtime

Select function storage

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.

Terms

Defines the terms specific to Function Compute to help you better understand the concepts and use Function Compute.

FAQ index

Summarizes common questions and their solutions when you use the Function Compute service.

Contact us

If you have any feedback or questions, join the Function Compute user group on DingTalk.