关于java:Nacos-211-正式发布真心强

3次阅读

共计 3434 个字符,预计需要花费 9 分钟才能阅读完成。

大家好,最近 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…

服务追踪事件: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/na…

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…
  • https://github.com/alibaba/na…

随着 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 开发手册(嵩山版)》最新公布,速速下载!

感觉不错,别忘了顺手点赞 + 转发哦!

正文完
 0