Dubbo 3 maintains the classic architecture of 2.x, focusing on inter-process communication for microservices and providing rich service governance capabilities (such as address discovery, traffic management, etc.) to better manage microservice clusters. The upgrade of Dubbo3 comprehensively enhances stability, performance, scalability, and usability throughout core Dubbo features.
New features in Dubbo 3.0 include:
During the cross-version upgrade process, the risk points from greatest to least are: directly modifying Dubbo source code -> extending based on Dubbo SPI extension points -> using APIs or Spring.
For direct modifications to the Dubbo source code, it is up to the modifying party to determine if it functions correctly in the higher version; Dubbo cannot guarantee previous compatibility for these non-standard behaviors. Additionally, modifications made to Dubbo at runtime via javagent or asm also fall within this scope. Most of these modifications can be detected using the scanning tools provided later.
For SPI extensions, except for the destructive changes to application-level service direction and EventDispatcher mechanisms in 3.x, most extensions provided in 2.7.x are also available in 3.x. Areas of concern include:
In addition, Dubbo 3.x has optimized the working mechanisms of certain extension points, which can significantly enhance application performance.
org.apache.dubbo.rpc.Filter
SPI extension point to the new org.apache.dubbo.rpc.cluster.filter.ClusterFilter
SPI extension point. The method definitions of the two interfaces are identical.For API or Spring usage, the methods used in Dubbo 3.x and 2.7.x are aligned, and Dubbo 3.x has strong validation for invalid configurations; errors in this regard will be reported during startup, and adjustments should be made as prompted.
If using Nacos as the registry center, due to the supported features of Nacos, Nacos Server must be upgraded to 2.x before upgrading to Dubbo 3.x (refer to https://nacos.io/zh-cn/docs/v2/upgrading/2.0.0-upgrading.html), and then upgrade the application’s Nacos Client accordingly. If using Zookeeper as the registry center, no action is required. If you are using Spring Cloud Alibaba Dubbo, please upgrade to xxx due to changes in some internal Dubbo APIs.
Please upgrade Dubbo dependencies to the latest version 3.1.3, with the following GAV for Dubbo and the corresponding springboot starter.
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>3.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>3.1.3</version>
</dependency>
The upgrade to Dubbo 3 does not impose special restrictions on the release process; it can be done according to normal business releases. Since Dubbo undergoes cross-major version changes, please perform multiple phased releases and extend the time gap between the first and second batch of releases to allow for thorough observation. During the release process, we recommend upgrading the downstream applications (i.e., service providers) first and continue subsequent releases after verifying normal service handling.
During the release process, there are several dimensions of metrics to assess whether issues occur during the upgrade.
Due to design issues with the application-level service discovery model in Dubbo 2.7, there have been significant format changes in Dubbo 3.x, which may cause incompatibility between application-level service discovery in 2.7.x and 3.x. Although Dubbo will filter out unrecognizable instances, for stability’s sake, if you have enabled the application-level service discovery feature in 2.7.x (which is non-default registered in 2.7.x), we recommend disabling it in 2.7.x and re-enabling it after upgrading to 3.x.