When there are multiple service providers, organize them into a cluster and masquerade as a single provider.
org.apache.dubbo.rpc.cluster.Cluster
<dubbo:protocol cluster="xxx" />
<!-- Default configuration; if <dubbo:protocol> does not configure cluster, this configuration will be used -->
<dubbo:provider cluster="xxx" />
org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterWrapperorg.apache.dubbo.rpc.cluster.support.FailoverClusterorg.apache.dubbo.rpc.cluster.support.FailfastClusterorg.apache.dubbo.rpc.cluster.support.FailsafeClusterorg.apache.dubbo.rpc.cluster.support.FailbackClusterorg.apache.dubbo.rpc.cluster.support.ForkingClusterorg.apache.dubbo.rpc.cluster.support.AvailableClusterorg.apache.dubbo.rpc.cluster.support.MergeableClusterorg.apache.dubbo.rpc.cluster.support.BroadcastClusterorg.apache.dubbo.rpc.cluster.support.registry.ZoneAwareClusterMaven project structure:
src
 |-main
    |-java
        |-com
            |-xxx
                |-XxxCluster.java (implements Cluster interface)
    |-resources
        |-META-INF
            |-dubbo
                |-org.apache.dubbo.rpc.cluster.Cluster (plain text file with content: xxx=com.xxx.XxxCluster)
XxxCluster.java:
package com.xxx;
 
import org.apache.dubbo.rpc.cluster.Cluster;
import org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker;
import org.apache.dubbo.rpc.cluster.Directory;
import org.apache.dubbo.rpc.cluster.LoadBalance;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.Invocation;
import org.apache.dubbo.rpc.Result;
import org.apache.dubbo.rpc.RpcException;
 
public class XxxCluster implements Cluster {
    public <T> Invoker<T> merge(Directory<T> directory) throws RpcException {
        return new AbstractClusterInvoker<T>(directory) {
            public Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
                // ...
            }
        };
    }
}
META-INF/dubbo/org.apache.dubbo.rpc.cluster.Cluster:
xxx=com.xxx.XxxCluster