FunctionGraph Best Practices
This document summarizes practices in common application scenarios of FunctionGraph. Each practice case is given detailed solution description and operation guidance, helping you easily build your services based on FunctionGraph.
Performance Optimization and Security
Practice |
Description |
---|---|
Introduces performance optimization practices including cold start and function execution improvement and provides guidance to help you build more efficient and stable applications on FunctionGraph. |
|
Optimize the cold start of a function to improve user experience in building a serverless architecture. |
|
Improve the overall security capability of FunctionGraph. |
Data Processing Practices
Practice |
Description |
---|---|
Using FunctionGraph to Convert DIS Data Format and Store the Data to CloudTable |
Use functions and DIS to collect real-time IoT data streams, convert the format of the collected data, and store the data to CloudTable Service. |
Use Node.js and Python as examples to describe how to configure a backend parsing function and use APIG to upload files from devices to cloud servers. This feature applies to web and app scenarios, such as reporting service run logs and uploading web app images. |
|
Use functions and IoTDA to transfer data reported by IoT devices and device status changes to FunctionGraph to trigger function running and convert coordinates (from WGS84 coordinates to GCJ02 coordinates). It is applicable to scenarios such as processing device-reported data for storage in OBS, structuring and cleansing reported data before storing it in databases, and triggering event notifications based on device status changes. |
|
Use a function and an OBS Application Service trigger to encrypt and decrypt files in OBS. |
|
Identifying Abnormal Service Logs in LTS and Storing Them in OBS |
Use LTS to configure a function for extracting alarm logs, identify abnormal log data in LTS, store the data in an OBS bucket, and use SMN to push alarm SMS messages and emails to service personnel. |
Configure a function to extract log data, analyze and filter key information, and transfer the data to LTS. |
|
Use a function flow to automatically rotate images in OBS. Function flows are available in CN East-Shanghai1 and AP-Singapore. |
|
Use a function flow to automatically compress and watermark images. Function flows are available in CN East-Shanghai1 and AP-Singapore. |
Functional Application Practices
Practice |
Description |
---|---|
Using FunctionGraph and CTS to Identify Login and Logout Operations from Invalid IP Addresses |
Configure functions for obtaining, analyzing, and processing cloud service resource operation information using CTS, and then push alarm SMS messages and emails using SMN to notify service personnel of handling the alarms. |
Configure a function to periodically enable or disable the ECS function of Huawei public cloud VMs. |
|
Using FunctionGraph Functions As the Backend to Implement APIG Custom Authorizers |
Quickly create an API whose backend service is FunctionGraph and call the API using custom authorizer. |
Process gRPC requests in FunctionGraph. Currently, only the LA-Santiago region is supported. |
|
Use Java functions to configure Log4j2 to print logs. |
|
Using FunctionGraph to Deploy Stable Diffusion for AI Drawing |
Deploy Stable-Diffusion applications in the application center of FunctionGraph and provides multiple methods for customizing AI drawing applications. |
Deploy popular open-source MCP server applications in one click in FunctionGraph and provide services accessible from the Internet through APIG. |
Function Building Practices
Practice |
Description |
---|---|
Building an HTTP Function Using an Existing Spring Boot Project |
Deploy a Spring Boot application as an HTTP function on FunctionGraph. |
Deploy a Go application as an HTTP function on FunctionGraph. |
|
This section describes how to access RDS for MySQL from FunctionGraph and query data, and provides sample code for testing. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot