Service Version

Configure multiple versions for the same service in Dubbo

Feature description

Follow the steps below for version migration

  1. During low-stress periods, first upgrade half of the providers to the new version
  2. Upgrade all consumers to the new version
  3. Then upgrade the remaining half of the providers to the new version


  • Old and new versions of service providers
  • New and old version service consumers

scenes to be used

When an interface is implemented and an incompatible upgrade occurs, the version number can be used for transition, and services with different version numbers do not refer to each other.

Reference use case

How to use

service provider

Old version service provider configuration

<dubbo:service interface="" version="1.0.0" />

New Version Service Provider Configuration

<dubbo:service interface="" version="2.0.0" />

Service Consumer

Old version service consumer configuration

<dubbo:reference id="barService" interface="" version="1.0.0" />

New Version Service Consumer Configuration

<dubbo:reference id="barService" interface="" version="2.0.0" />

Does not distinguish between versions

If you don’t need to distinguish between versions, you can configure it in the following way

<dubbo:reference id="barService" interface="" version="*" />

Last modified January 2, 2023: Enhance en docs (#1798) (95a9f4f6c1c)