zrlw commented on issue #13293: URL: https://github.com/apache/dubbo/issues/13293#issuecomment-1788434675
翻到之前提过的一个issue: https://github.com/apache/dubbo/issues/8307 当时给出的解决办法是应用配置dubbo.application.metadata-type=remote 这样注册中心就会记录各个instance的元数据(里面有dubbo.tag):  注册中心metadata-type元数据的DataId是应用名、Group是各个instance的dubbo.metadata.revision:  注册中心该服务的实例明细情况: 对于没有nacos-sync同步跨集群同步注册实例的应用场景,这种方法是可行的。 但是我们需要通过nacos-sync(自己修订的0.4.9,适配nacos2批量同步临时实例)把A机房注册中心的dubbo服务实例复制到B机房的nacos注册中心,nacos-sync现在只有同步服务实例明细的功能,配置数据同步并不在它最初的功能设计范畴。 如果只是接口名到应用名的映射关系,还可以手工汇总导入到B机房的nacos注册中心存储元数据的config_info表,但是dubbo的metadata-type这种元数据是服务注册时动态生成的,除非在nacos-sync基础上再搞一套dubbo的metadata-type元数据同步(深度捆定dubbo,从A机房获取instance对象的dubbo.metadata.revision,然后从A机房注册中心拉取相关的metadata-type元数据,再将其发布到B机房的nacos注册中心)。否则没办法搞应用级别实例的跨机房同步。 这种方式有点复杂,所以能否直接在InstanceRequest请求数据加个dubbo.tag呢?或者增加个配置选项,把实例元数据都留在InstanceRequest里? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
