大家好,最近 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.
參考資料:
- https://nacos.io/zh-cn/blog/2.1.1-release.html
- https://github.com/alibaba/nacos/releases/tag/2.1.1
隨著 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開發手冊(嵩山版)》最新發布,速速下載!
覺得不錯,別忘了隨手點贊+轉發哦!
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/502281.html
標籤:Java
上一篇:docker compose搭建redis7.0.4高可用一主二從三哨兵集群并整合SpringBoot【圖文完整版】
