You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/03/02 11:53:24 UTC
[GitHub] [dubbo-go] bobopan opened a new issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
bobopan opened a new issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072
What happened:
当配置多个注册中心,在配置注册中心优先级的时候,preferred=true,如果优先级的这个注册中心的节点全部下了后,正常应该直接调用其他注册中心对应的节点,但是目前,会等待前一个注册中心最后一个节点的session,超时后才会使用其他注册中心的节点
What you expected to happen:
配置优先级的节点全部宕机后,快速使用正常注册中心的节点
How to reproduce it (as minimally and precisely as possible):
dubbo go: 1.5.5
consumer配置
registries:
"nacos1":
protocol: "nacos"
timeout: "1s"
address: "127.0.0.1:8848"
"nacos2":
protocol: "nacos"
timeout: "1s"
address: "127.0.0.2:8848"
preferred: true
将127.0.0.2的节点全部去掉后,会先重试一次127.0.0.2的节点,在去127.0.0.1的节点
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] zhaoyunxing92 commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
zhaoyunxing92 commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-841282688
nacos-go-sdk 那边修改了 https://github.com/nacos-group/nacos-sdk-go/pull/196
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] bobopan commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
bobopan commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-792424028
> > 问题核心在于收到节点上下线的invker处理逻辑上是有问题的
>
> 我感觉这里是有坑的。因为按照我们的设计,如果你provider节点直接下线,那么consumer应该是直接清理了本地的provider列表,连重试都不会。
>
> 也就是说,可能是最后一个provider下线的时候,我们并没有做判断,说是不是这个配置中心提供的服务节点全部下线了,然后直接切换。问题可能是在这里。
是的,主要问题在这
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] AlexStocks commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-841277049
云兴反馈,这个问题是 nacos 的问题,已经给 nacos 提交了 pr fix 掉。
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] williamfeng323 commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
williamfeng323 commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-799953688
> > > 问题核心在于收到节点上下线的invker处理逻辑上是有问题的
> >
> >
> > 我感觉这里是有坑的。因为按照我们的设计,如果你provider节点直接下线,那么consumer应该是直接清理了本地的provider列表,连重试都不会。
> > 也就是说,可能是最后一个provider下线的时候,我们并没有做判断,说是不是这个配置中心提供的服务节点全部下线了,然后直接切换。问题可能是在这里。
>
> 是的,主要问题在这
总结一下,所以问题不是需要改变注册中心的重试机制,而是需要在某注册中心下的服务下线时需要帮助consumer可以直接切换到在另外的注册中心注册的对等服务,对吗?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] bobopan commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
bobopan commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-791852222
问题核心在于收到节点上下线的invker处理逻辑上是有问题的
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] zouyx commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
zouyx commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-806898960
关于 nacos 的问题,是因为这里判断的是 Service 中的 valid
https://github.com/apache/dubbo-go/blob/274718b650e71ee55a832203e87088f9762d4ff7/registry/nacos/listener.go#L127
而对应的 Service 来自于 nacos server 返回的每一个 host
https://github.com/nacos-group/nacos-sdk-go/blob/a63411bd5ac0f794a52d055a1539289a70220404/clients/naming_client/subscribe_callback.go#L81
关键点来了,nacos server 在 host 中没有返回该字段。。。。 - -
```
{
"name": "DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
"groupName": "DEFAULT_GROUP",
"clusters": "",
"cacheMillis": 10000,
"hosts": [{
"instanceId": "127.0.0.1#20000#DEFAULT#DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
"ip": "127.0.0.1",
"port": 20000,
"weight": 1.0,
"healthy": true,
"enabled": true,
"ephemeral": true,
"clusterName": "DEFAULT",
"serviceName": "DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
"metadata": {
"registry.role": "3",
"cluster": "mock",
"path": "/com.ikurento.user.UserProvider",
"protocol": "dubbo",
"category": "providers",
"interface": "com.ikurento.user.UserProvider",
"version": "1.0.0",
"group": "guangzhou-idc"
},
"instanceHeartBeatInterval": 5000,
"ipDeleteTimeout": 30000,
"instanceHeartBeatTimeOut": 15000
}],
"lastRefTime": 1616683093784,
"checksum": "",
"allIPs": false,
"reachProtectionThreshold": false,
"valid": true
}
```
如果非要实例。。就是这个。。。http://console.nacos.io/nacos/v1/ns/instance/list?serviceName=DEFAULT_GROUP@@demo.go&clusters=&udpPort=55043&healthyOnly=false&clientIp=192.168.199.214&namespaceId=。。。
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] flycash commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
flycash commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-792257622
> 问题核心在于收到节点上下线的invker处理逻辑上是有问题的
我感觉这里是有坑的。因为按照我们的设计,如果你provider节点直接下线,那么consumer应该是直接清理了本地的provider列表,连重试都不会。
也就是说,可能是最后一个provider下线的时候,我们并没有做判断,说是不是这个配置中心提供的服务节点全部下线了,然后直接切换。问题可能是在这里。
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] AlexStocks edited a comment on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
AlexStocks edited a comment on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-841277049
云兴反馈,这个问题是 nacos 的问题,已经给 nacos 提交了 pr fix 掉。
相关 samples https://github.com/apache/dubbo-go-samples/pull/69
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] zouyx edited a comment on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
zouyx edited a comment on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-806898960
关于 nacos 的问题,是因为这里判断的是 Service 中的 valid
https://github.com/apache/dubbo-go/blob/274718b650e71ee55a832203e87088f9762d4ff7/registry/nacos/listener.go#L127
而对应的 Service 来自于 nacos server 返回的每一个 host
https://github.com/nacos-group/nacos-sdk-go/blob/a63411bd5ac0f794a52d055a1539289a70220404/clients/naming_client/subscribe_callback.go#L81
关键点来了,nacos server 在 host 中没有返回该字段。。。。 - -
```
{
"name": "DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
"groupName": "DEFAULT_GROUP",
"clusters": "",
"cacheMillis": 10000,
"hosts": [{
"instanceId": "127.0.0.1#20000#DEFAULT#DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
"ip": "127.0.0.1",
"port": 20000,
"weight": 1.0,
"healthy": true,
"enabled": true,
"ephemeral": true,
"clusterName": "DEFAULT",
"serviceName": "DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
"metadata": {
"registry.role": "3",
"cluster": "mock",
"path": "/com.ikurento.user.UserProvider",
"protocol": "dubbo",
"category": "providers",
"interface": "com.ikurento.user.UserProvider",
"version": "1.0.0",
"group": "guangzhou-idc"
},
"instanceHeartBeatInterval": 5000,
"ipDeleteTimeout": 30000,
"instanceHeartBeatTimeOut": 15000
}],
"lastRefTime": 1616683093784,
"checksum": "",
"allIPs": false,
"reachProtectionThreshold": false,
"valid": true
}
```
如果非要实例。。就是这个。。。http://console.nacos.io/nacos/v1/ns/instance/list?serviceName=DEFAULT_GROUP@@demo.go&clusters=&udpPort=55043&healthyOnly=false&clientIp=192.168.199.214&namespaceId=
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] flycash commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
flycash commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-790714335
我先捋一捋这个问题。其实是应用在prefer的注册中心挂掉之后,不会立刻调度连接下一个,而是尝试重连,失败再调度下一个。
如果问题是这样的话,那么这个问题会比较恶心。
我觉得问题的根源在于,节点在连不上注册中心之后,无法判断这个注册中心是临时崩了,又或者网络导致连不上,还是永久性的下线了。
从现有的做法来看,应该是认为,连不上并不意味着挂掉,因此会尝试重连。
所以问题的根源就在于,如果不引入重试机制,那么我们在连不上的时候就切换下一个,可能会误伤——即可能只是网络抖动临时连不上。
所以我们需要的是一个清楚的辨别两种情况的机制。目前来看比较难识别这两种可能。
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] zouyx edited a comment on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
zouyx edited a comment on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-806898960
关于 nacos 的问题,是因为这里判断的是 Service 中的 valid
https://github.com/apache/dubbo-go/blob/274718b650e71ee55a832203e87088f9762d4ff7/registry/nacos/listener.go#L127
而对应的 Service 来自于 nacos server 返回的每一个 host
https://github.com/nacos-group/nacos-sdk-go/blob/a63411bd5ac0f794a52d055a1539289a70220404/clients/naming_client/subscribe_callback.go#L81
关键点来了,nacos server 在 host 中没有返回该字段。。。。 - -
```
{
"name": "DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
"groupName": "DEFAULT_GROUP",
"clusters": "",
"cacheMillis": 10000,
"hosts": [{
"instanceId": "127.0.0.1#20000#DEFAULT#DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
"ip": "127.0.0.1",
"port": 20000,
"weight": 1.0,
"healthy": true,
"enabled": true,
"ephemeral": true,
"clusterName": "DEFAULT",
"serviceName": "DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
"metadata": {
"registry.role": "3",
"cluster": "mock",
"path": "/com.ikurento.user.UserProvider",
"protocol": "dubbo",
"category": "providers",
"interface": "com.ikurento.user.UserProvider",
"version": "1.0.0",
"group": "guangzhou-idc"
},
"instanceHeartBeatInterval": 5000,
"ipDeleteTimeout": 30000,
"instanceHeartBeatTimeOut": 15000
}],
"lastRefTime": 1616683093784,
"checksum": "",
"allIPs": false,
"reachProtectionThreshold": false,
"valid": true
}
```
如果非要实例。。就是这个。。。http://console.nacos.io/nacos/v1/ns/instance/list?serviceName=DEFAULT_GROUP@@demo.go&clusters=&udpPort=55043&healthyOnly=false&clientIp=192.168.199.214&namespaceId=
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] AlexStocks closed issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
AlexStocks closed issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] bobopan commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
bobopan commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-789343716
dubbo-go版本1.5.5
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] bobopan commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
bobopan commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-801547380
> > > > 问题核心在于收到节点上下线的invker处理逻辑上是有问题的
> > >
> > >
> > > 我感觉这里是有坑的。因为按照我们的设计,如果你provider节点直接下线,那么consumer应该是直接清理了本地的provider列表,连重试都不会。
> > > 也就是说,可能是最后一个provider下线的时候,我们并没有做判断,说是不是这个配置中心提供的服务节点全部下线了,然后直接切换。问题可能是在这里。
> >
> >
> > 是的,主要问题在这
>
> 总结一下,所以问题不是需要改变注册中心的重试机制,而是需要在某注册中心下的服务下线时需要帮助consumer可以直接切换到在另外的注册中心注册的对等服务,对吗?
是的
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] bobopan commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试
Posted by GitBox <gi...@apache.org>.
bobopan commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-791851378
这里连接的不是注册中心,注册中心本身没有问题,和注册中心的链接也没有问题,是和他下面provider链接的,连不上,这个是不是分成两种一种是保活机制,重试是否有必要放到每次链接都去使用?在网络抖动或者临时链接不上,在rpc调用的时候应该优先使用存活的,而在心跳调用的时候,失败的用于心跳链接上去?而且在provider下线的时候也会有明显的通知,同时各个consumer,我节点下线的
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org