Operations 9 min read

Unlock Nacos 1.3.0: Embedded DB, New Raft Protocol, and Cluster Management Tips

Nacos 1.3.0 introduces an embedded relational database, unified cluster management, an upgraded Raft consistency protocol, and security fixes, providing simpler deployment, higher performance, and safer operations for both small‑scale and enterprise environments.

Programmer DD
Programmer DD
Programmer DD
Unlock Nacos 1.3.0: Embedded DB, New Raft Protocol, and Cluster Management Tips

Starting from version 1.3.0, Nacos focuses on three core goals: simplicity, performance, and high availability.

Embedded relational distributed database to simplify cluster deployment.

Unified cluster management with new management capabilities.

Upgraded consistency protocol for higher performance.

Security upgrades fixing Fastjson and privilege escalation risks.

Embedded Relational Distributed Database

Clusters can be started without MySQL to reduce deployment cost for small users (large‑scale production still recommends MySQL for higher performance). Use the following command to enable embedded storage: ./startup.sh -p embedded Check the startup log for the message:

Nacos started successfully in cluster mode. use embedded storage

Nacos 1.3.0 also opens a new Open‑API for querying local data storage status: GET /nacos/v1/cs/ops/derby?sql=select * from config_info It is recommended to add pagination to avoid heavy queries. Example pagination SQL:

select * from config_info OFFSET 0 ROWS FETCH NEXT 1000 ROWS ONLY
{
    "code":200,
    "message":null,
    "data":[
        {
            "ID":242149783664332800,
            "DATA_ID":"application.properties",
            "GROUP_ID":"DEFAULT_GROUP",
            "TENANT_ID":"",
            "APP_NAME":"",
            "CONTENT":"this.is.test=liaochuntao",
            "MD5":"bedbfd7069e999edf2adf9d8a1af3083",
            "GMT_CREATE":"2020-06-03T05:30:47.345+0000",
            "GMT_MODIFIED":"2020-06-03T05:30:47.345+0000",
            "SRC_USER":null,
            "SRC_IP":"127.0.0.1",
            "C_DESC":null,
            "C_USE":null,
            "EFFECT":null,
            "TYPE":"properties",
            "C_SCHEMA":null
        }
    ]
}

Distributed ID – Snowflake

The primary key of Nacos 1.3.0 data relies on the Snowflake algorithm, which requires a DataCenterId and a WorkerId. By default, WorkerId is calculated from the host address; it can be set manually in application.properties:

### set the dataCenterID manually
nacos.core.snowflake.data-center=
### set the WorkerID manually
nacos.core.snowflake.worker-id=

Data Migration

Because the embedded storage mode is a brand‑new data model, upgrading Nacos‑Server to use it requires deploying a separate Nacos 1.3.0 cluster and manually exporting/importing data from the original MySQL instance.

New Cluster Management

New Cluster Management Page

The cluster node management of both the configuration and service discovery modules has been unified and moved to the core module, improving the display of node information such as Raft metadata, RPC ports, version, weight (future use), and last refresh time.

New Cluster Addressing Modes

Users can choose the addressing mode for cluster nodes:

File addressing mode (default): nacos.core.member.lookup.type=file Address‑server mode:

nacos.core.member.lookup.type=address-server

New Consistency Protocol

Nacos 1.3.0 abstracts and sinks the Raft protocol into the core, allowing configuration of Raft parameters via Open‑API. Example configuration:

# Sets the Raft cluster election timeout, default 5 seconds
nacos.core.protocol.raft.data.election_timeout_ms=5000
# Sets the Raft snapshot interval, default 30 minutes
nacos.core.protocol.raft.data.snapshot_interval_secs=30
# Raft internal worker threads
nacos.core.protocol.raft.data.core_thread_num=8
# Threads for Raft business request processing
nacos.core.protocol.raft.data.cli_service_thread_num=4
# Raft read index type, default ReadOnlySafe
nacos.core.protocol.raft.data.read_index_type=ReadOnlySafe
# RPC request timeout, default 5 seconds
nacos.core.protocol.raft.data.rpc_request_timeout_ms=5000

Operational Open‑API for Raft includes commands such as transferring leader, resetting cluster members, triggering snapshots, and removing peers. Example to transfer leader:

POST /nacos/v1/core/ops/raft
{
    "groupId": "xxx",
    "command": "transferLeader",
    "value": "ip:{raft_port} or ip:{raft_port},ip:{raft_port},ip:{raft_port}"
}

These high‑risk operations should only be used when a majority of Raft nodes have crashed.

Security Upgrades

Fixed Fastjson security vulnerability.

Fixed tenant privilege escalation vulnerability.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

OperationsNacosEmbedded DatabaseCluster ManagementRaft Protocol
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.