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

Cluster BrokerServer 动态增加减少请教 #10

Open
KING754 opened this issue Nov 29, 2024 · 2 comments
Open

Cluster BrokerServer 动态增加减少请教 #10

KING754 opened this issue Nov 29, 2024 · 2 comments

Comments

@KING754
Copy link

KING754 commented Nov 29, 2024

最近在学习IoGame的集群网关:

BrokerServer brokerServer = NettyClusterSimpleHelper.createBrokerServer(seedAddress, gossipListenPort, port);
集群网关通过如上构造。
其中seedAddress 如下:

    public List<String> seedAddress = List.of(
            "127.0.0.1:30056"
            , "127.0.0.1:30057"
            , "127.0.0.1:30058"
    );

这个seedAddress是指什么?就是指我们集群内的网关的地址吗?

还是指最基本(种子)的网关服务器。
后续增加或者减少只要保证seedAddress 中有一个是活着的就好了。因为活着的会通知其它的?

那如果一开始,就构造好这个列表了?
我需要如何动态增加/减少网关的数量。

需要修改代码或者配置,然后重启网关吗?

@iohao
Copy link
Owner

iohao commented Dec 3, 2024

集群使用 gossip 协议,seedAddress 是种子节点。

如果一开始指定了种子节点,后续新增的网关可以不需要配置种子节点了。

@KING754
Copy link
Author

KING754 commented Dec 4, 2024

那么,实际开发中。
比如一开始开了一个网关。
然后有一个配置:seedList:11.11.11.11:9999

以后再开新的网关时,seedlist配置不变就行了是吧。
直接启来,然后也是这个种子节点。就可以了是吧。

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

No branches or pull requests

2 participants