Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nacos 缺少优雅上线机制 #8125

Closed
wangdongyun opened this issue Apr 11, 2022 · 6 comments
Closed

Nacos 缺少优雅上线机制 #8125

wangdongyun opened this issue Apr 11, 2022 · 6 comments

Comments

@wangdongyun
Copy link

wangdongyun commented Apr 11, 2022

Is your feature request related to a problem? Please describe.

谈一谈 nacos 的优雅上线机制?

预期: 重启节点,在 数据准备完毕之前,暂时不能对外提供服务!
数据准备包含: 配置加载,jraft 数据加载, distro 数据同步完毕
对外提供服务: 在服务未准备完毕前,http 端口 和 grpc 端口 不能打开
客户端判定节点正常: 目前发现 client,只要连接可以连接上,就开始正常请求,并没有check 是否数据准备好
目前如何重启:目前走的是 ng,摘除流量-重启-流量重新挂载(人工)

@KomachiSion
Copy link
Collaborator

以前有,然后社区说不好用不符合预期,之后就取消了。您可以研究下,提一个方案出来讨论下。

#5344
#5346

@wangdongyun
Copy link
Author

👌🏻 我看看

@nocvalight
Copy link
Contributor

对于服务数据的同步完毕,这个应该是一个比较容易实现的点:

  1. sofa-registry目前的做法是session和data分层,session存储来自client的pub和sub数据,data上聚合dataInfoId维度的pubs list数据,根据slot分片在data上分片存储dataInfoId。当data运维时启动后,data的状态为migrating,此时可以接受pubs写不接收读(因为读的数据可能不完整),向所有的session进行数据获取,完成后认为数据已经准备完毕,切换状态开始提供读。结合slot的leader与follower机制,千万级别的pubs线上集群的不可读时间,可以控制在3秒内。
  2. 对于nacos,启动后也在完成member之间的同步前,这台data对client不可见,client的请求也不会转发到这台机器,同步完成后再打开端口,加入到healthy members列表中。这样服务的数据我理解是可以优雅上线的。
  3. raft配置不能优雅上线的原因,我再学习下。

@KomachiSion
Copy link
Collaborator

  1. sofa-registry 过于复杂了, 对用户运维技术能力要求过高。本来data session两层设计就已经高维护成本了,registry还加了个maintaner。
  2. nacos也规划过data session分离的架构,只不过我们觉得没有必要。或许nacos3.0会采用这种架构吧

@KomachiSion
Copy link
Collaborator

No more discussion in issue.

@yangzhongj
Copy link

  1. 数据

sofa-registry设计上多少和redis-cluster有点像,数据分片,数据迁移。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants