Cloud Native 10 min read

Explore Nacos 1.3.0: Embedded DB, New Raft Protocol, and High‑Availability

Nacos 1.3.0 introduces an embedded relational database, unified cluster management, an upgraded Raft consistency layer, security patches, Snowflake ID configuration, data migration guidance, new cluster addressing modes, and a set of Open‑API operations for Raft administration, all aimed at simplicity, performance, and high availability.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
Explore Nacos 1.3.0: Embedded DB, New Raft Protocol, and High‑Availability

Nacos 1.3.0: Simplicity, Performance, High Availability

Embedded relational distributed database to simplify cluster deployment

Unified cluster management with a brand‑new UI

Consistency protocol abstraction upgrade for higher performance

Security upgrades fixing Fastjson and tenant privilege risks

Embedded Relational Distributed Database

Cluster deployment can run without MySQL, reducing operational cost for small‑scale users (large‑scale production still recommends MySQL for higher performance). Start the embedded mode with: ./startup.sh -p embedded Check the startup log for the message:

Nacos started successfully in cluster mode. use embedded storage

The configuration module now provides an Open‑API to query local data storage:

GET /nacos/v1/cs/ops/derby?sql=select * from config_info

It is recommended to add pagination to avoid heavy queries; if omitted, Nacos automatically limits the result to the first 1k rows. Example paginated SQL:

select * from config_info OFFSET 0 ROWS FETCH NEXT 1000 ROWS ONLY

Sample JSON response:

{
  "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",
      "TYPE":"properties"
    }
  ]
}

Precautions

Distributed ID – Snowflake

Nacos 1.3.0 generates primary keys using the Snowflake algorithm, which requires a DataCenterId and a WorkerId. By default, WorkerId is derived from the local 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

The new embedded storage mode is a brand‑new data model. When upgrading to Nacos 1.3.0 and enabling this mode, you must deploy a fresh Nacos 1.3.0 cluster and migrate data manually via export/import, as automatic one‑click migration from MySQL is not yet supported.

New Cluster Management

New Cluster Management UI

The cluster node management has been unified into the core module, improving the display of node metadata. The UI now shows:

Old Raft metadata from the service discovery module

New Raft metadata used by the configuration module

Metadata of the Nacos node itself

New Cluster Addressing Modes

Users can choose the addressing mode for cluster nodes:

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

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

New Consistency Protocol

Nacos 1.3.0 abstracts and sinks the existing consistency layer, integrating the Raft protocol with the configuration module. Adjustable Raft parameters include:

# 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
# Number of Raft internal worker threads
nacos.core.protocol.raft.data.core_thread_num=8
# Threads for processing Raft business requests
nacos.core.protocol.raft.data.cli_service_thread_num=4
# Raft linear read strategy, 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

The core module also exposes Open‑API endpoints for Raft operations:

Switch Leader of a Raft Group

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

Reset Raft Group Members

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

This high‑risk operation should only be used when a majority of nodes have crashed and the cluster cannot achieve quorum.

Trigger Snapshot for a Raft Group

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

Remove a Member from a Raft Group

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

Batch Remove Members from a Raft Group

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

Security Upgrades

Fixed Fastjson security vulnerability

Fixed tenant privilege escalation vulnerability

For detailed release notes, visit the official documentation link.

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.

NacossecurityEmbedded DatabaseCluster ManagementRaft
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

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.