Serverless App Engine (SAE) allows you to use the following types of Nacos registries in the SAE console: self-managed Nacos registry, SAE built-in Nacos registry, and Microservices Engine (MSE) Nacos registry. This topic describes how to configure the Nacos registry-based service registration and discovery feature for an application in the SAE console.
Prerequisites
Prerequisites vary depending on the Nacos registry type. For more information, see the following topics:
If you use an MSE Nacos registry, follow the instructions that are provided in Use an MSE Nacos registry.
If you use a self-managed Nacos registry, follow the instructions that are provided in Use a self-built Nacos service registry.
If you use the SAE built-in Nacos registry, follow the instructions that are provided in this topic. SAE automatically modifies the registry address and the configuration center address of the program that you want to deploy by injecting related environment variables and using a Java agent to modify bytecode. You can deploy a program on SAE without the need to modify the program.
Usage notes
- MSE Nacos registry
- Self-managed service registry
- SAE built-in service registry
For more information, see MSE Nacos and Open source Nacos.
Feature
SAE supports automatic modification of the program's registry and configuration center addresses by automatically injecting related environment variables and using Java Agent to modify bytecode. Consequently, you can deploy the program directly to SAE without any modifications.
SAE built-in Nacos has authentication enabled by default, providing authentication protection without additional configuration.
Limits
SAE built-in Nacos registry does not support Seata Server.
SAE built-in Nacos registry only supports the Java language.
- Note
If you are using the Nacos SDK version 1.x, upgrade is necessary for the following reasons:
If you use Nacos SDK version 1.x, configuration changes are listened in long polling mode, with a default timeout of 30 seconds. In this case, the timeout period is identified by ARMS as a slow calll, triggering unnecessary alerts. However, this issue can be avoided by the configured persistent connections that comply with gRPC in Nacos SDK version 2.x.
Version 2.x has significant upgrades in architecture, performance, stability, and features. For more information, see Release notes.
Procedure
The operation entry varies depending on the scenario:
Create an application
Log on to the SAE console. In the left-side navigation pane, choose . Select a destination region and a namespace. Click Create Application.
On the Basic Information section, configure the parameters and click Next: Advanced Settings.
Modify a running application
After you redeploy an application, the application is restarted. To prevent unpredictable errors such as business interruptions, we recommend that you deploy applications during off-peak hours.
Log on to the SAE console. In the left-side navigation pane, choose . Select a destination region and a destination namespace. Click the name of the target application.
On the Basic Information page, click Deploy Application.
Modify a stopped application
Log on to the SAE console. In the left-side navigation pane, choose . Select a destination region and a destination namespace. Click the name of the target application.
On the Basic Information page, click Modify Application Configurations.
Configure service registration and discovery
Find and expand the Service Registration And Discovery section. Select SAE Built-in Nacos as the Nacos-based Registry Service and Discovery.
