如何在 Root 对等节点崩溃时 recover/prevent 出现网络故障
how to recover/prevent a network failure when the Root peer node crashes
Hyperledger-fabric 文档指定所有 VP 都应链接到根 Peer 节点。
Hyperledger documentation:http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Network-setup/
但是在任何阶段,如果根对等节点发生故障(关闭),那么整个网络(所有vp)将无法访问。
handle/avoid 这种情况的最佳方法是什么?
谢谢
if the root peer node fail (shutdown), then the entire network (all
vp) will be inaccessible.
这不是真的。网络仍将 运行,并且仍会部署、调用事务。
举个例子,
如果我有 3 个节点 运行,即 vp0
、vp1
、vp2
,其中 vp0
运行 作为根节点,并且如果我关闭这个根节点(vp0),
我仍然能够在网络中的其余节点上部署和调用事务。
您可以通过执行(对于每个容器)
来验证其余节点仍然 运行
docker exec container-id curl http://localhost:7050/network/peers
它将列出网络中的所有当前对等点。
container-id
可以通过运行docker ps
找到
但是,为了在网络中添加新节点,
我必须指定 CORE_PEER_DISCOVERY_ROOTNODE
的值并将其设置为 vp1
或 vp2
的 IP 地址(vp0 已关闭)。
Hyperledger-fabric 文档指定所有 VP 都应链接到根 Peer 节点。
Hyperledger documentation:http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Network-setup/
但是在任何阶段,如果根对等节点发生故障(关闭),那么整个网络(所有vp)将无法访问。
handle/avoid 这种情况的最佳方法是什么?
谢谢
if the root peer node fail (shutdown), then the entire network (all vp) will be inaccessible.
这不是真的。网络仍将 运行,并且仍会部署、调用事务。
举个例子,
如果我有 3 个节点 运行,即 vp0
、vp1
、vp2
,其中 vp0
运行 作为根节点,并且如果我关闭这个根节点(vp0),
我仍然能够在网络中的其余节点上部署和调用事务。
您可以通过执行(对于每个容器)
来验证其余节点仍然 运行docker exec container-id curl http://localhost:7050/network/peers
它将列出网络中的所有当前对等点。
container-id
可以通过运行docker ps
但是,为了在网络中添加新节点,
我必须指定 CORE_PEER_DISCOVERY_ROOTNODE
的值并将其设置为 vp1
或 vp2
的 IP 地址(vp0 已关闭)。