Definition
By definition, serverless is a method to allow developers to build and run applications without having to manage servers. It still has servers, but we don’t mind it directly and have no worries about the servers at all.
Overview
Function Compute is a serverless platform from Alibaba Cloud.
Here is the overview of Function Compute.
Why do we need to use Function Compute?
Sometimes, we have different requirements for our system. Let’s say we do not have a lot of experience in managing servers, and also need a highly available and scalable system. Function Compute is one of the best option for implementing it.
The benefits of Function Compute are:
- Efficient and O&M-free.
- Low Cost on Demand.
- Elastic and Highly Available.
- Stable and Highly Reliable
.It’s also supported for multiple programming languages like:
- NodeJS
- PHP
- Python
- C#
- Java
- Custom Runtimes (Go, Ruby, Lua, etc.)
How to use Function Compute?
Here are the procedures based on the documentation:
- Create the service.
- Create a function, write the code of the function, and then deploy the code to the function.
- Trigger the function (optional: if needed)
- Watch execution logs of the function.
- Watch service monitoring data.
What is service on Function Compute? It’s the basic unit of resources in Function Compute. More information can be found in this documentation.
In Function Compute, we will find trigger
function. It is a way to trigger function execution. For example, we have a service that needs to be executed at 7 PM every day. After we’ve done creating our service & function first, then add triggers with time trigger (EventBridge) then create rules for it.
Log Query, can help you debug your function. If you find an error, you can take a look at this log to find the root cause.
Monitoring data can show you the Metrics data related to your function. Like the number of function invocation requests, resource usage, and internet traffic. It can help you to optimize cost and system usage.
References
- Alibaba Cloud. Product: Function Compute. https://partners-intl.aliyun.com/vodafone/products/function-compute
- Alibaba Cloud. 2022. Function Compute: Getting Started. https://www.alibabacloud.com/help/en/function-compute/latest/getting-started.