限制Hazelcast集群中的成员 [英] Restrict members in Hazelcast cluster

查看:67
本文介绍了限制Hazelcast集群中的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个春季启动项目中,在这里我使用Hazelcast作为缓存.我已经启用了tcp作为连接方法,并且我还提到了一些成员.成员能够加入.但是问题在于,其他节点也可以与成员分开加入.谁能告诉我如何限制它?

I am working on a spring boot project where i am using Hazelcast as Cache. I have enabled tcp as join method and i also mentioned some members. The members are able to join. But the problem is other nodes are also able to join apart from the members. can anyone tell me how i can restrict it?

这是我的配置,

@Bean
    public Config hazelcastConfig() {
        Config config = new Config()
                .setClusterName("myCluster");
        List<String> members = new ArrayList<>();
        members.add("192.168.99.1:5523");
        members.add("192.168.99.2:5542");
        config.getNetworkConfig().getJoin()
                .setMulticastConfig(new MulticastConfig().setEnabled(false))
                .setTcpIpConfig(new TcpIpConfig().setEnabled(true).setMembers(members));
        config.getNetworkConfig().setPort(5523);
        return config;
    }

推荐答案

Hazelcast IMDG(社区版)的主要方法是配置不同的群集名称.

The main approach in the Hazelcast IMDG (community edition) is to configure the different cluster names.

您还可以研究具有一组安全功能(JAAS身份验证,TLS,对称加密等)的Hazelcast Enterprise.

You can also look into Hazelcast Enterprise which has a set of security features (JAAS authentication, TLS, symmetric encryption, ...).

这些答案中的更多详细信息:

More details in these answers:

这篇关于限制Hazelcast集群中的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆