Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
DataArts Fabric
IoT
IoT Device Access
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
Huawei Cloud Astro Canvas
Huawei Cloud Astro Zero
CodeArts Governance
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance (CCI)
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Cloud Transformation
Well-Architected Framework
Cloud Adoption Framework
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ FunctionGraph/ Best Practices/ FunctionGraph Best Practices

FunctionGraph Best Practices

Updated on 2025-07-10 GMT+08:00

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

Table 1 Performance optimization and security practices

Practice

Description

Performance Optimization

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.

Cold Start Optimization

Optimize the cold start of a function to improve user experience in building a serverless architecture.

Security Best Practices

Improve the overall security capability of FunctionGraph.

Data Processing Practices

Table 2 Data processing best 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.

Uploading Files Using APIs in FunctionGraph

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.

Converting Device Coordinate Data in IoTDA

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.

Using FunctionGraph to Encrypt and Decrypt Files in OBS

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.

Using FunctionGraph to Filter Logs in LTS in Real Time

Configure a function to extract log data, analyze and filter key information, and transfer the data to LTS.

Using FunctionGraph to Rotate Images Stored in OBS

Use a function flow to automatically rotate images in OBS.

Function flows are available in CN East-Shanghai1 and AP-Singapore.

Using FunctionGraph to Compress and Watermark Images

Use a function flow to automatically compress and watermark images.

Function flows are available in CN East-Shanghai1 and AP-Singapore.

Functional Application Practices

Table 3 FunctionGraph functional application best 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.

Using FunctionGraph to Periodically Start and Stop ECSs

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.

Using FunctionGraph HTTP Functions to Process gRPC Requests

Process gRPC requests in FunctionGraph.

Currently, only the LA-Santiago region is supported.

Using a Java Function and Log4j2 to Print Logs

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.

Using FunctionGraph to Deploy DeepSeek-R1 Distilled Model

Deploy the DeepSeek-R1 distilled model via container image-based HTTP function in collaboration with a third-party client to achieve AI dialog.

Deploying an MCP Server Using FunctionGraph

Deploy popular open-source MCP server applications in one click in FunctionGraph and provide services accessible from the Internet through APIG.

Function Building Practices

Table 4 Function building best practices

Practice

Description

Building an HTTP Function Using an Existing Spring Boot Project

Deploy a Spring Boot application as an HTTP function on FunctionGraph.

Building an HTTP Function Using Go

Deploy a Go application as an HTTP function on FunctionGraph.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback