edit-icon download-icon

What is Function Compute

Last Updated: Sep 29, 2018

Alibaba Cloud Function Compute is an event-driven and fully-managed compute service. With Function Compute, you can quickly build any type of applications or services without considering management or O&M. You can complete a set of backend services for processing multimedia data even in several days.

How it works

By using Function Compute, you can author and upload codes without worrying about procuring and managing infrastructure resources. Function Compute prepares computing resources for you and runs your codes on your behalf elastically and reliably.

In addition, Function Compute provides log query, performance monitoring, alarms, and other features.

You only pay for resources actually consumed when running the codes. No fee is incurred for application codes that are not run.

Integration

Function Compute integrates different services in an event-driven manner. When the event source service triggers an event, the associated function is automatically called to process the event.

You can trigger function invocation by using OSS, Log Service, API Gateway, Table Store, or Function Compute SDK and API. With these services and features, you can easily build elastic, reliable, and secure applications. For more information about the type of event sources supported by Function Compute, see Trigger List.

For example, if new data is uploaded to your Alibaba Cloud OSS, a function is automatically called to respond this event. In addition, API gateway can be used to trigger a function for HTTP requests. You can also use the Function Compute SDK and API to call your codes.

Workflow

The following shows the processing procedures of Function Compute:

Workfolw

Description

①. The developer compiles applications and services in a particular programming language. For the development languages supported by Function Compute, see Development languages.

②. The developer uploads the application to Function Compute. The uploading paths include Function Compute console, Function Compute API or SDK, or the command -line tool fcli.

③. Trigger calls your function. Trigger methods include OSS trigger, API Gateway, Log Service, Table Store, and Function Compute API / SDK.

④. Resize dynamically and seamlessly Function Compute based on the amount of user requests to guarantee the performance of request peak.

⑤. View the bill that are based on the actual invocation duration of the function. The billing granularity is accurate to 100ms. For more information, see Billing method.

Serverless architecture

Supposing that you plan to develop a short-video clips sharing application, you consider a lot of questions, such as

  • How to build, operate, and maintain a flexible and stable video processing backend service?
  • How many servers to be purchased?
  • What are the server specifications for the App?
  • How to configure the network and the operating system?
  • How to deploy the environment?
  • How to maintain load balance?
  • How to dynamically scale?
  • How to upgrade the configuration?
  • How to manage server downtime?
  • How to manage user request peak?
  • How to manage system alarms?
    ……

You can use computing resources in the cloud efficiently. You can requisition a server of your exact specifications in a short period of time.

However, most current cloud computing still needs servers and other infrastructure. The management and utilization of these resources is difficult and costly. Alibaba Cloud Function Compute is designed to reduce computing costs and improve efficiency. This computing service enables you to manage your application instead of infrastructure, and provides a serverless model for application design.

With Function Compute, you do not need to manage the bottom-layer infrastructure. You only need to deploy the code to Function Compute and use an event to trigger the function to run the service smoothly. You do not need to be concerned about the deployment environment, server up-scaling, server downtime, or other problems. Function Compute supports elastic up-scaling and Pay-As-You-Go. In addition, Function Compute supports log query, performance monitoring, and alarms to help you quickly locate and troubleshoot problems.

Learning path

You can use the Function Compute Learning Path as a mentor to learn Function Compute basics or add to your knowledge.

Benefits

Therefore, Function Compute has the following advantages:

  • You do not need to purchase and manage servers or other infrastructure, which lowers the operating costs.

  • You can write the code you need for the problem at hand with no concern about the entire application or the infrastructure to run it. You can use supported Development languages to design, optimize, test, review, and upload your own application code.

  • Function Compute service uses an event to trigger an application to respond to user requests. Provides seamless connection to Alibaba Cloud Object Storage OSS, API Gateway, Log Service, Table Store and other services to help you build applications quickly. For example, Function Compute can solve the storage problem of pictures and videos through OSS. When new data is written to your OSS, Function Compute automatically triggers the function to process the new data.

  • Provides log query, performance monitoring, and alarms for prompt troubleshooting.

  • Provides elastic scaling within milliseconds for bottom-layer up-scaling to deal with peak pressure.

  • Supports Pay-As-You-Go and billing to an accuracy of 100 milliseconds. You only pay for the time your code runs. Function Compute is suitable for high traffic-fluctuation scenarios. For more information, see Billing methods.

Thank you! We've received your feedback.