Cloud Native 9 min read

What’s New in Nacos 2.2.0? Explore the Latest Features and Plugins

The article introduces Nacos 2.2.0, explains its core functions, details major changes such as removal of legacy code, new data‑source, custom‑environment, and trace plugins, lists added features, refactorings, bug fixes, and provides reference links for further reading.

macrozheng
macrozheng
macrozheng
What’s New in Nacos 2.2.0? Explore the Latest Features and Plugins

On October 28, Nacos 2.2.0‑BETA was released, followed shortly by the official Nacos 2.2.0 version.

Nacos 2.2.0 is a significant release that adds many practical features, such as the ability to inject multiple data sources via the SPI mechanism.

Before diving into the new features, a brief introduction to Nacos is provided.

What is Nacos?

Nacos (pronounced /nɑ:kəʊs/) stands for Dynamic Naming and Configuration Service, offering service discovery, dynamic configuration, and dynamic DNS.

It is part of the Spring Cloud Alibaba family and is widely used due to its powerful, stable functionality and rich ecosystem.

The following diagram summarizes Nacos’s main functions, ecosystem, and advantages:

The panorama shows Nacos seamlessly supporting major open‑source ecosystems such as Spring Cloud and Dubbo.

What changes does Nacos 2.2.0 bring?

Changes

First major change is the removal of old redundant code, including the 1.X mode service discovery and dual‑write code. After removal, upgrading from Nacos 1.X to 2.2.0 is not possible; upgrades must start from at least version 2.0.0. This does not affect compatibility with 1.X clients, which can still connect to a 2.2.0 server.

Second major change is the addition of several plugins:

Data‑source plugin : Starting with 2.2.0, Nacos can inject multiple data sources via the SPI mechanism. After adding the corresponding data‑source implementation, the plugin is activated by configuring spring.datasource.platform in application.properties. See the data‑source plugin documentation for details.

Custom environment variable plugin : Nacos can inject custom environment variables via SPI, allowing users to define configurations (e.g., encrypt database passwords) in the plugin. Refer to the custom environment variable plugin documentation.

Connection limit plugin : The old limit module is refactored and extended to provide better protection under high concurrency.

Note: the authentication plugin was added in version 2.1.0 and can also be injected via SPI.

Third major change enhances the trace plugin and batch registration, making them easier to use. Starting with 2.2.0, a trace plugin can be injected via SPI to subscribe to and process trace events (e.g., logging, storing). See the trace plugin documentation.

Features

Support for batch registration and deregistration of services

v2 OpenAPI added for Nacos 2.0

Data‑source plugin

Data‑trace plugin

Prometheus HTTP service discovery

LDAP identity verification plugin

LDAP authentication

Refactoring

Removal of 1.x naming and redundant code

Selector optimization

Server auto‑stops on startup errors

Fuzzy query optimization

Enhanced data‑source plugin

External data source adds isEmpty for configuration checks NacosApplicationListener method visibility changed to default

Retain query conditions after returning from list configuration page

Retain query conditions after returning from list service page

Rate‑limit module refactored into a plugin

Bug Fixes

Fixed inconsistent length of group_id across tables

Fixed inability to create bean ldapAuthenticationProvider

Fixed Prometheus metric instance creation error

Fixed base64 decoding error of token.secret.key in auth plugin

Fixed namespace list issue

Fixed client worker thread null‑pointer check order

Fixed health‑check issue after changing some instances to HTTP

Fixed selection error when all instance weights are zero

Fixed console configuration query button not adapting to browser width

Fixed service metadata cleanup logic causing deregistration failure

References

[1] Nacos 2.2.0‑BETA: https://github.com/alibaba/nacos/releases/tag/2.2.0-BETA

[2] Nacos 2.2.0: https://github.com/alibaba/nacos/releases/tag/2.2.0

[3] Data‑source plugin documentation: https://nacos.io/zh-cn/docs/v2/plugin/datasource-plugin.html

[4] Custom environment variable plugin documentation: https://nacos.io/zh-cn/docs/v2/plugin/custom-environment-plugin.html

[5] Trace plugin documentation: https://nacos.io/zh-cn/docs/v2/plugin/trace-plugin.html

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.

Cloud Nativeservice discoveryNacosPlugins
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

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.