We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
venus-miner 请求一些接口的耗时比较高,目前想通过请求多个节点的同一接口,找到耗时最短的请求,然后把其作为结果返回
The text was updated successfully, but these errors were encountered:
现在的情形是这样的,假设chain-co选择最优节点时有3个节点都正在计算链的新状态,距离计算完成剩余时间分别为:5s,10s,3s; 目前的逻辑并不能做到请求剩余时间最少的同步节点API. 如果选择了剩余10s的节点,会导致API耗时很久,影响正常的业务,如出块的某些接口:MinerGetBaseInfo,MinerCreateBlock,MpoolSelects
Sorry, something went wrong.
第一个参考设计: (2) chain-co选择最优节点时,如果有多个节点同步高度相同,则全部记录,不是从中随机选一个作为最优; (2) 对需要状态计算完成才可以返回的接口,多线程调用最优列表中节点的API,返回第一个请求到的结果.
假设chain-co有3个同步节点,高度和同步新区块剩余时间分别为:
在这种情形下,chain-co选择最优节点大概率会是第一个,部分API需要等待最新区块同步完成,故耗时很久,如选择消息,请求BaseInfo等接口。
miner 连接 chain-co,chain-co下面有多个节点,节点的状态不一致,miner 提交新的区块到节点时,可能会遇到区块找不到,或者消息找不到的问题,目前可以通过给 SubmitNodes 配置多个节点来缓解这个问题。chain-co 后续考虑 SyncSubmitBlock 接口向连接的全部节点广播?
No branches or pull requests
链服务模块 / Chain Service Components
订单服务模块 / Deal Service Components
算力服务模块 / Storage Power Service Components
描述 / Description
venus-miner 请求一些接口的耗时比较高,目前想通过请求多个节点的同一接口,找到耗时最短的请求,然后把其作为结果返回
The text was updated successfully, but these errors were encountered: