大家好,最近 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开发手册(嵩山版)》最新发布,速速下载!
觉得不错,别忘了随手点赞+转发哦!
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |