This topic describes the definition of Function Compute services and how to create, update, and delete services in the Function Compute console.
What is a service?
A service is a resource management unit in Function Compute. Before you create a function, you must create a service. All functions of the same service share the same settings such as service authorization and log configuration.
From a business scenario, an application can be split into multiple services. From the resource utilization perspective, a single service can consist of multiple functions. For example, a data processing service is divided into two parts: data preparation and data processing. During data preparation, you can select a low-specification instance due to undemanding requirements for function resources. During data processing, however, you need to select a high-specification instance due to demanding requirements for function resources.
Create a Service
Update a Service
- Log on to the Function Compute console.
- In the left-side navigation pane, click Services and Functions.
- In the top navigation bar, select the region where your Kubernetes cluster is deployed.
- On the Services page, find the target service. In the Actions column, click Configure.
- On the Edit Service page, set the configuration items as needed, and then click Save.
- Optional:Basic Information
Configure the basic information of the service. Currently, you can only modify the service description.
Parameter setting Description Description The description of the service to help you identify the purpose of the service. - Optional:Other configurations
Property Description References role configuration Configure the role used by the function in the service so that the function can obtain the permissions of the role. Grant Function Compute permissions to access other Alibaba Cloud services Logging Configure the log feature of the service. After the log feature is enabled, you can view the execution logs of the function. This allows you to perform code debugging, fault analysis, and data analysis. Tracing Analysis configuration After you enable the Tracing Analysis feature, you can use Jaeger to upload link information. This enables you to track the execution of functions and helps you quickly analyze and diagnose performance bottlenecks under the Serverless architecture. Configure Tracing Analysis Network Settings Configure the network used by the function in the service. For example, configure whether the function can access the Internet and whether it can access resources in the VPC. NAS file system configuration Configure the NAS file system used by the functions in the service. After the configuration, your function can access files stored on one of the NAS file systems just like accessing the local file system. Configure a NAS file system
- Optional:Basic Information
Delete a service
References
In addition to the Function Compute console, you can also use the Serverless Devs tool to manage services. For more information, see Service-related commands.