Nacos configurations let you externalize application settings -- such as feature flags, connection pools, and log levels -- so you can update them at runtime without redeploying code. Each configuration is identified by a unique combination of Data ID, Group, and Namespace.
Prerequisites
Before you begin, make sure that you have:
An activated MSE subscription (activate MSE)
An MSE Nacos instance running Nacos 1.2.1 or later (Create a Nacos engine)
Create a configuration in the console
Log on to the MSE console and select a region in the top navigation bar.
In the left-side navigation pane, choose Microservices Registry > Instances.
On the Instances page, click the name of the instance.
In the left-side navigation pane, choose Configuration Management > Configurations.
On the Configurations page, select a namespace from the Namespace drop-down list in the upper-left corner, then click Add Configuration.
In the Add Configuration panel, set the following parameters, then click Release.
Parameter Required Description Region -- Auto-populated from the current Nacos instance. Cannot be changed. Namespace -- Auto-populated from the namespace selected in step 5. Cannot be changed. Data ID Yes A unique identifier for the configuration within its group. Use the package.classnaming convention, such ascom.foo.bar.log.level.Group Yes A logical grouping for related configurations. Use a product name or module name, such as order-serviceorpayment-module. Must be unique.Data Encryption No Encrypts the configuration content to protect sensitive values such as database credentials. When enabled, the Data ID is automatically prefixed with cipher-. For more information, see Configure encryption.Configuration Format Yes The data format: Properties, JSON, YAML, XML, or plain text. Description No A brief note describing the purpose of this configuration. More Settings > Application No The application that uses this configuration. More Settings > Configuration Tag No Tags for filtering and organizing configurations. Type a keyword and select from the drop-down list. Configuration Content Yes The configuration data, entered in the right-side panel. For example: threadPoolSize=5andlogLevel=WARN.
After you click Release, the configuration appears on the Configurations page.
Configuration content examples
Application settings (Properties format)
# Database connection pool
db.pool.maxActive=20
db.pool.minIdle=5
db.pool.maxWait=60000
# Logging
log.level=WARN
log.path=/var/log/appFeature flags (JSON format)
{
"features": {
"new_checkout_flow": {
"enabled": true,
"rollout_percentage": 25
},
"dark_mode": {
"enabled": false
}
}
}Service endpoint configuration (YAML format)
upstream:
payment-service:
url: https://pay.example.com/api/v2
timeout: 3000
retries: 3
inventory-service:
url: https://inv.example.com/api/v1
timeout: 5000
retries: 2Limits
| Configuration type | Maximum size |
|---|---|
| Non-encrypted | 100 KB |
| Encrypted | 50 KB |
If a configuration exceeds these limits, split it into multiple smaller configurations. To request a larger quota, go to Quota Center.
Changing the content size limit may affect Nacos stability. Evaluate the impact before you request a quota adjustment.