如何在仅使用简单分布式缓存的情况下打开 Ignite 的最少端口?

huangapple go评论75阅读模式
英文:

How to open the bare minimum number of ports for Ignite when only using a simple distributed cache?

问题

以下是翻译好的内容:

这个问题与以下链接相关:
https://stackoverflow.com/questions/53618478/ports-required-for-apache-ignite-cluster

在我的情况下,我只使用Apache Ignite来创建几个简单的分布式Cache<String, String>对象。我有6个服务器节点,它们都需要异步共享这些缓存。

我的网络团队希望为我的用例只打开绝对最少数量的端口。我们不需要任何高级功能。我们不会使用多播。我们将会为发现指定所有6个节点的IP,Port

这是我将要使用的代码:

TcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
ipFinder.setAddresses(Arrays.asList("127.0.0.1:47500"));
tcpDiscoverySpi.setIpFinder(ipFinder);

到目前为止还不错。我在开发集群上进行了测试,可以验证缓存被正确分发。这个开发集群是在同一台机器上的2个JBoss服务器。

现在我要部署到6个单独的虚拟机上。

是否会变成ipFinder.setAddresses(Arrays.asList("10.0.1.5:47500", "10.0.1.6:47500", "10.0.1.7:47500", "10.0.1.8:47500", "10.0.1.9:47500", "10.0.1.10:47500"));

我在代码中大约有8个不同的Cache<String, String>。使用的缓存对象数量会影响我需要的端口数量吗?

在我的用例中,47500是唯一使用的端口吗?如果不是,我还需要哪些其他端口?如何设置才能在我的用例中使用绝对最少数量的端口?

英文:

This question is related to:
https://stackoverflow.com/questions/53618478/ports-required-for-apache-ignite-cluster

In my case, I have only one use for Apache ignite and that is for several simple distributed Cache<String, String> objects. I have 6 server nodes and they all need to asynchronously share these caches.

My networking team wants to open only the bare minimum number of ports for my use case. We don't need anything fancy. We will not be using multi-cast. We will be specifying the IP,Port of all 6 nodes for use with discovery.

Here is the code I will be using:

TcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
ipFinder.setAddresses(Arrays.asList("127.0.0.1:47500"));
tcpDiscoverySpi.setIpFinder(ipFinder);

So far so good. I ran a test on a development cluster and I can verify the cache is properly distributing. This development cluster is 2 JBoss servers on the same machine.

Now I am moving to deploy this on 6 separate VMs.

Will this become ipFinder.setAddresses(Arrays.asList("10.0.1.5:47500", "10.0.1.6:47500", "10.0.1.7:47500", "10.0.1.8:47500", "10.0.1.9:47500", "10.0.1.10:47500")); ?

I have have about 8 different Cache<String, String> in my code. Does the number of Cache objects I'm using affect the number of ports I need?

Is 47500 the only port being used here in my use case? If not, which other ports do I need? How do I set this up to use the absolute bare minimum number of ports for my use case?

答案1

得分: 2

以下是翻译好的部分:

对于最低限度配置 <br>
您需要发现(默认情况下为端口47500)和通信(默认情况下为端口47100)

详见:https://ignite.apache.org/docs/latest/clustering/tcp-ip-discovery
和:https://ignite.apache.org/docs/latest/clustering/network-configuration#communication
<br>请注意端口范围参数,Ignite将使用它来查找可用端口,如果默认端口被占用。
详见:
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.html#setLocalPortRange-int-
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.html#setLocalPortRange-int-

以下是可选的: <br>
8080 — REST API 端口 - https://ignite.apache.org/docs/latest/restapi

11211 - 用于使用 visor/control.sh 工具的端口<br>
&nbsp;&nbsp;&nbsp;https://ignite.apache.org/docs/latest/tools/control-script#connecting-to-cluster<br>
&nbsp;&nbsp;&nbsp;https://ignite.apache.org/docs/latest/tools/visor-cmd

49112 — 默认的 JMX 端口(此端口可能在以后的版本中会有变化)

10800 — 细客户端/JDBC/ODBC 端口<br>
&nbsp;&nbsp;&nbsp;https://ignite.apache.org/docs/latest/thin-clients/getting-started-with-thin-clients#configuring-thin-client-connector

英文:

For bare minimum <br>
you need discovery (port 47500 by default) and communication (port 47100 by default)

see: https://ignite.apache.org/docs/latest/clustering/tcp-ip-discovery
and: https://ignite.apache.org/docs/latest/clustering/network-configuration#communication
<br> pay attention to port range parameters, as Ignite will use it to find an available
port if the default one is taken.
see:
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.html#setLocalPortRange-int-
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.html#setLocalPortRange-int-

The following are optional: <br>
8080 — REST API port - https://ignite.apache.org/docs/latest/restapi

11211 - for using visor/control.sh tools<br>
&nbsp;&nbsp;&nbsp;https://ignite.apache.org/docs/latest/tools/control-script#connecting-to-cluster<br>
&nbsp;&nbsp;&nbsp;https://ignite.apache.org/docs/latest/tools/visor-cmd

49112 — the default JMX port (this one is subject to change in later releases)

10800 — thin client/JDBC/ODBC port<br>
&nbsp;&nbsp;&nbsp;https://ignite.apache.org/docs/latest/thin-clients/getting-started-with-thin-clients#configuring-thin-client-connector

huangapple
  • 本文由 发表于 2020年10月24日 00:55:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/64504258.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定