0

Akka Multi Node テストを行い、何らかの障害に達したときに 1 つのノードを再起動したいと考えています。何かのようなもの:

runOn(nodeA) {
  // do something while both nodes are up and running

  enterBarrier("nodeBCrashes")

  // do something while I'm the only node up and running

  enterBarrier("bothNodesUp")

  // do something with both nodes up and running again
}

runOn(nodeB) {
  // do something while both nodes are up and running

  crash()
  enterBarrier("nodeBCrashes")

  // do nothing because I'm out

  enterBarrier("bothNodesUp")
  start()

  // do something with both nodes up and running again

}

これを行うことはできません。少なくとも nodeB をシャットダウンし、同じ akka.remote.netty.tcp.port で別の nodeC を開始できる方法が必要です(これは厳密に必要です)。このようなもの

runOn(nodeA) {
  // do something while both nodes are up and running

  enterBarrier("nodeBCrashes")

  // do something while I'm the only node up and running

  enterBarrier("bothNodesUp")

  // do something with both nodes up and running again
}

runOn(nodeB) {
  // do something while both nodes are up and running

  enterBarrier("nodeBCrashes")
  shutdown()

}

// How I can delay nodeC start until nodeA reaches bothNodesUp barrier?
runOn(nodeC) {      
  // do something when both nodes are up and running
} 

質問は次のように再開できます。

1 つのノードがクラッシュして再起動する状況を再現できますか?

  1. ノードを再起動できますか?
  2. そうでない場合、残りのノードが berrier に達したときにノードを開始できますか?
  3. 同じ akka.remote.netty.tcp.port を異なるノードに割り当てることはできますか (並行して実行すべきではありません)。*.optsファイルを試してみましたが、成功しませんでした。これでよろしいですか?
4

1 に答える 1