sofastack / sofa-registry

SOFARegistry is a production-level, low-latency, high-availability service registry powered by Ant Financial.
https://www.sofastack.tech/sofa-registry/docs/Home
Apache License 2.0
651 stars 247 forks source link

Is there a long polling push-pull combination mechanism between client and session? #44

Open wei7202839 opened 5 years ago

wei7202839 commented 5 years ago

如题,如果没有做推拉结合的话,至少心跳要有吧 如果client断电了,session节点是发现不了的

sofastack-bot[bot] commented 5 years ago

Hi @wei7202839, we detect non-English characters in the issue. This comment is an auto translation by @sofastack-robot to help other users to understand this issue.

We encourage you to describe your issue in English which is more friendly to other users.

As the title, if there is no push-pull combination, at least the heartbeat should have it. If the client is powered off, the session node cannot be found.

Synex-wh commented 5 years ago

SOFARegistry不同于Eureka只负责服务发现,对于地址变更不主动推送客户端,通过客户端主动获取方式,对于客户端进行心跳检测租约方式获取状态。

我们目前client是session长连接机制,对于client断链后会触发服务端断链事件,这个事件就会触发对应的服务提供方下线通知告诉所有订阅方,这个过程是服务端主动决定和推送客户端感知的,不存在发现不了

wei7202839 commented 5 years ago

一开始在sofa-registry项目内没看到心跳机制 后来发现心跳机制应该在bolt底层实现了,有心跳确实是OK的

jacky1193610322 commented 3 years ago

那如果server宕机之后,那么那台server上面注册的数据,如果清理?