在Vertx群集中,群集主机/端口和公共群集主机/端口之间有何区别? [英] In Vertx clustering, what's the difference between cluster host/port and public cluster host/port?

查看:111
本文介绍了在Vertx群集中,群集主机/端口和公共群集主机/端口之间有何区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理需要在多台计算机上集群的应用程序,因此我必须配置

I'm working on an application that is required to be clustered on multiple machines, so I have to configure VertxOptions object by setting the cluster host and port on each node (machine), but I came across different methods for setting hosts and ports: setClusterhost/port, setPublicClusterHost/port. What is the difference?

推荐答案

clusterHost 属性告诉Vert.x应该将套接字绑定到哪个主机. clusterPublicHost 其他节点应如何连接.默认情况下,值是相同的,但有时由于代理服务器的原因,您需要一种使其与众不同的方法.

The clusterHost property tells Vert.x which host it should bind the socket to. The clusterPublicHost how other nodes should connect. By default the values are the same, but sometimes because of proxies you need a way to make them different.

这在Javadoc中进行了解释:

This is explained in the Javadoc:

设置用于群集的面向公众的主机名.有时,例如在某些云上运行时,服务器的本地地址侦听集群与其他节点的地址不同连接到它的位置,因为OS/云基础架构会执行某种操作代理.在这种情况下,您可以指定一个公共主机名与服务器侦听的主机名不同.默认值值为null,表示使用与群集主机名相同的值.

Set the public facing hostname to be used for clustering. Sometimes, e.g. when running on certain clouds, the local address the server listens on for clustering is not the same address that other nodes connect to it at, as the OS / cloud infrastructure does some kind of proxying. If this is the case you can specify a public hostname which is different from the hostname the server listens at. The default value is null which means use the same as the cluster hostname.

这篇关于在Vertx群集中,群集主机/端口和公共群集主机/端口之间有何区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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