Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arangodb 当主机A(主节点)死亡时,是否有任何方法可以自动重定向到集群中的另一个活动节点(在这种情况下为B、C)?_Arangodb - Fatal编程技术网

Arangodb 当主机A(主节点)死亡时,是否有任何方法可以自动重定向到集群中的另一个活动节点(在这种情况下为B、C)?

Arangodb 当主机A(主节点)死亡时,是否有任何方法可以自动重定向到集群中的另一个活动节点(在这种情况下为B、C)?,arangodb,Arangodb,为了在每台不同的机器上群集主机A(主)、B、C 为了在守护进程中集群3机器,我执行了下面的3个命令 在主机A上 nohup arangodb--starter.data dir=/mypath/arangodb/& 在主机B上 nohup arangodb--starter.join A(A的ip地址)--starter.data dir=/mypath/arangodb/& 关于主机C nohup arangodb--starter.join A(A的ip地址)--starter.data d

为了在每台不同的机器上群集主机A(主)、B、C

为了在守护进程中集群3机器,我执行了下面的3个命令

在主机A上
nohup arangodb--starter.data dir=/mypath/arangodb/&

在主机B上
nohup arangodb--starter.join A(A的ip地址)--starter.data dir=/mypath/arangodb/&

关于主机C
nohup arangodb--starter.join A(A的ip地址)--starter.data dir=/mypath/arangodb/&

我得到了3个协调器(端口:8529)、3个db服务器(端口:8530)和3个代理(端口:8531),然后成功地进行了集群

我使用java客户机作为基本CRUD进行集群。
ArangoDB ArangoDB=new ArangoDB.Builder().host(主机,端口).build()
主机:主机的主机(主),端口:8529

我有个问题

如果主机A(主)死亡,则对主机A的任何请求都将被阻止,连接将被拒绝


当主机A死机时,有没有办法自动重定向到集群中的另一个活动节点(在这种情况下是B,C)

自版本
4.1.10
以来,ArangoDB Java驱动程序支持主机回退。只需对每个协调员多次使用方法
host(String,int)

一旦驱动程序与主机A失去连接,它就会尝试连接到主机B,以此类推。只有在每个主机都无法访问之后,才会引发异常

ArangoDB arangoDB = new ArangoDB.Builder()
  .host(hostA, PORTA)
  .host(hostB, PORTB)
  .host(hostC, PORTC)
  .build();