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

CAE Best Practices

This document summarizes practices in common application scenarios of Cloud Application Engine (CAE). Each practice case is given detailed solution description and operation guidance, helping you easily build your services based on CAE.

Table 1 CAE best practices

Best Practice

Description

Using CAE to Host Nginx Static File Servers

This section describes how to use CAE to host the Nginx static file server. Create an image for service code and deploy it to CAE, and store the static files in the parallel file system associated with a component. In this way, you can host the frontend components of services and static files.

Interconnecting GitLab with Jenkins for Automatic Build and Deployment on CAE

This section uses Java project build and deployment as an example to describe how to complete the following process: code submission > Jenkins build > software package upload/image upload > CAE deployment.

Deploying Components Based on the Dependency Sequence Using the Jenkins Pipeline

This section describes how to use Jenkins to deploy and upgrade microservice components. The upgrade involves multiple microservice components.

Deploying Spring Cloud Applications to CAE to Automatically Connect to the Nacos Engine

This section describes how to use the CAE source code deployment capability to automatically deploy a provider service and a consumer service, helping you experience automatic access to the Nacos engine.

Graceful Startup of a Spring Cloud Application

This section describes how to configure graceful startup for Spring Cloud application to perform operations such as upgrade, restart, and scale-out during component O&M.

Health Check

This section describes how to use three health check mechanisms (liveliness probe, readiness probe, and startup probe) provided by CAE to check whether your application instances are running properly to ensure normal service running.

Lifecycle Management

Lifecycle management is a method used to execute calls at a specific stage. This topic describes how to use lifecycle (processing after startup and processing before stopping) provided by CAE to process events.

Sending Event Alarms to WeCom

This section describes how to set event notification rules to help you understand the component running status in a timely manner and quickly locate faults.

Connecting to the CodeArts Pipeline to Automatically Upgrade CAE Components

CAE provides the CodeArts commercial extension, which can connect to the CodeArts pipeline to automatically upgrade CAE components. This section describes how to use the CAE upgrade extension in different scenarios.

Configuring PromQL to Implement Custom Auto Scaling

Assume that a component provides a custom metric http_requests_total (indicating the total number of HTTP requests). This section uses this metric as an example to describe how to use PromQL to implement custom auto scaling.

Configuring the Interconnection Between CAE and DEW to Help Applications Obtain Encrypted Secrets from DEW

This section describes how to configure the interconnection between CAE and DEW to help applications obtain encrypted secrets from DEW.

Deploying ASP.NET Core Applications to CAE

CAE source code deployment supports Docker running. You can configure a Dockerfile, install the build environment in this file, and define build commands. In this way, more projects programmed in various languages can be deployed in CAE.

This section uses the ASP.NET Core application as an example to describe how to deploy the ASP.NET Core application to CAE.

Connecting the Network Through Enterprise Routes

CAE allows the CAE environment to access the VPC on the tenant side. This section describes how to use enterprise routes to connect the network after the public network is disabled.

CAE Security Best Practices

This section provides actionable guidance for enhancing the overall security of CAE.

Interconnecting CodeArts with CAE

This section describes how to interconnect CodeArts with CAE.

Implementing Automatic E2E RDS Credential Rotation Using EG

To protect the database password, Huawei Cloud Data Encryption Workshop (DEW) periodically rotates and changes the Relational Database Service (RDS) credentials, and updates the changes to the RDS instances in real time. This section describes how to use EventGrid (EG) to implement automatic E2E RDS credential rotation.

Implementing Public Network and Cross-VPC Access for CAE Applications Through a NAT Gateway

This section describes how to use a NAT gateway to implement public network and cross-VPC access for CAE applications.

Using ELB to Build a Unified Public Network Access Entry for CAE Applications

This section describes how to use ELB to configure a public network access entry for CAE applications.