Nacos 2.1.1 正式發佈,真心強!

大家好,最近 Nacso 2.1.1 正式發佈了!

2.1.1 版本特性

該版本核心解決 Nacos 2.0 廣泛使用暴露出的一些穩定性問題(包括默認實現鑑權插件、Grpc 請求和 distro 一致性協議的性能等),另外 Beta 測試 “批量註冊服務” 和 “服務追蹤事件” 兩個新功能。

批量註冊服務:batchRegister

批量註冊服務的需求主要來自於 Nacos 社區的另一個組件 -- Nacos-Sync,Nacos-Sync 作爲一個支持多註冊中心遷移的第三方工具,一直幫助社區用戶平滑的從 Eureka,Consul 等其他註冊中心遷移到 Nacos 中。

在 Nacos 2.0 發佈後,Nacos-Sync 第一時間進行了更新。但在更新後,由於 Nacos 2.0 的註冊機制發生了一定的變化,同一個客戶端針對同一個服務只能註冊一個實例,這導致了 Nacos-Sync 這種代理服務模式無法使用同一個客戶端進行同一個服務的多個實例的代理註冊,易用性大大降低。

同時社區發現,有一些特殊的應用,如網關,proxy,dubbo3 多協議支持等,也需要一些代理註冊的能力,因此社區在進行數次方案討論後,最終由社區同學 chenhao26-nineteen 完成批量註冊服務的功能開發,並在 2.1.1 版本進行 beta 測試。

批量註冊服務功能主要用於代理註冊的場景,允許應用使用同一個客戶端對同一個服務進行多個實例的註冊請求。大多數傳統使用場景下,用戶仍然使用 registerService 功能即可。

這裏推薦一個 Spring Boot 基礎教程,含所有示例源碼:

https://github.com/javastacks/spring-boot-best-practice

服務追蹤事件:trace event

自從阿里雲的 MSE Nacos 發佈了關於推送軌跡相關的文章後,社區反響熱烈,都希望能在開源添加對應的功能。

MSE 團隊得知社區的強烈需求後,由 scienceZ 同學完成對事件抽象剝離,並貢獻到開源社區。

目前該功能同樣屬於 beta 測試,暫時只能通過在源碼中訂閱對應事件的方式進行追蹤,後續版本同樣會將該功能作爲SPI插件的形式開放,方便社區同學按照自己的需求定製推送軌跡。

注意: 上述兩個功能均屬於 Beta 測試階段,其 API,功能可能與後續正式發佈時的有一定區別。

Nacos 越來越強了,作爲 Spring Cloud Alibaba 的主要成員之一,現在也是必學的組件,也包含在棧長的 Spring Cloud Alibaba 微服務課程中,建議大家報名學習下。

更多更新內容

Nacos 2.1.1 的更多變更內容可查看:

https://github.com/alibaba/nacos/releases/tag/2.1.1

Features

[#5863] (BETA) Support batch register service.
[#7424] Add version data compare in the history list.
[#8305] (REMOVE) Remove leave nacos server nodes API temporarily.
[#8481] (BETA) Add TRACE Event to server.
[#8755] Add default fuzzy search feature.

Enhancement

[#8099] Fast failure for distro sync task and verify task if cluster disconnect.
[#8150] Add the namespace description item to the namespace list page.
[#8345] Add validation for service cluster name.
[#8515] Optimize some code in InetUtils.
[#8561] Enhance default authentication plugin performance.
[#8574] Enhance filter service info for push callback.
[#8592] Ehhance GrpcUtil memory and cpu cost.
[#8622] Add NacosEnvironment and add some unit tests.

Refactor & dependency

[#8369] Remove mina dependency.
[#8383] Upgrade jackson version to 2.12.6.1.
[#8421] Remove commonOkHttp dependency.
[#8472] Remove useless dependency.
[#8479] Refactor singleton construction as private.
[#8540] Upgrade spring-boot version to 2.6.8.
[#8594] Makes distro data load timeout can be configured.
[#8596] Explicitly specify spring-boot-maven-plugin version same as spring-boot.
[#8623] Upgrade mysql-connector-java to 8.0.28.

BugFix

[#7039] Fix config encryptedData md5 calculation problem.
[#8153] Fix NPE for AutoExpireCache.
#8243 Fix health check plugin problem.
[#8275] Fix can't register service when use skywalking.
[#8295] Fix can't login when use embedded storage in cluster model.
[#8318] Fix findAllConfigInfoForDumpAll sql args error.
[#8372] Fix client can't use https connection.
[#8424] Fix cycle dependency problem.
[#8428] Fix naming subscribe bug when multiple NamingService.
[#8505] Fix log configuration conflict in spring-boot project.
#8514 Fix prometheus api error in client.
[#8516] Fix the persistent instance becomes a temporary instance.
[#8602] Fix display error after delete current namespace.
[#8632] Fix subscribe disabled instance problem in the first time.
[#8635] Fix NPE when call the shutdown method.
[#8720] Fix the problem that config aspect invalid problem.
[#8742] Fix change instance metadata, the revision of service not change.
[#8784] Fix some bugs for Console UI.
[#8833] Fix import config failed when open auth.
[#8880] Fix constantly loading config when not read permission.

參考資料:

隨着 Eureka 2.x 的停止維護,Nacos 現在成了目前最主流的微服務組件,起到了註冊中心和配置中心的雙重作用,Nacos 也是 Spring Cloud Alibaba 最重要的成員之一,所以 Nacos 是必學的,如果你想系統學習 Spring Cloud Alibaba,可以報名棧長的 Spring Cloud Alibaba 實戰課,一次付費,後續都提供免費更新,永久學習。

近期熱文推薦:

1.1,000+ 道 Java面試題及答案整理(2022最新版)

2.勁爆!Java 協程要來了。。。

3.Spring Boot 2.x 教程,太全了!

4.別再寫滿屏的爆爆爆炸類了,試試裝飾器模式,這纔是優雅的方式!!

5.《Java開發手冊(嵩山版)》最新發布,速速下載!

覺得不錯,別忘了隨手點贊+轉發哦!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章