我正在使用 Akka Cluster 2.4.8 开发一个项目。
有没有办法使用 AkkCluster 检测崩溃的节点(如computer failure
、kill -9
等)?
我目前有一个 3 节点环境,使用static-quorum
裂脑解决策略。
akka.cluster.split-brain-resolver {
active-strategy = static-quorum
stable-after = 5s
static-quorum {
quorum-size = 2
role = ""
}
我希望在杀死一个实例时,剩余的集群成员会将其标记为DOWN
. 但是,它仍然存在UNREACHABLE
(见下文)。有没有办法做到这一点?
clusterStatus": {
"members": [
{
"uniqueAddress": {
"address": {
"protocol": "akka.tcp",
"system": "test-actor-system",
"host": "test-out-00",
"port": 2552
},
"uid": 1998600863
},
"upNumber": 1,
"status": "Up",
"roles": []
},
{
"uniqueAddress": {
"address": {
"protocol": "akka.tcp",
"system": "test-actor-system",
"host": "test-out-01",
"port": 2552
},
"uid": 1371217592
},
"upNumber": 3,
"status": "Up",
"roles": []
},
{
"uniqueAddress": {
"address": {
"protocol": "akka.tcp",
"system": "test-actor-system",
"host": "test-out-02",
"port": 2552
},
"uid": -796176254
},
"upNumber": 2,
"status": "Up",
"roles": []
}
],
"unreachable": [
{
"uniqueAddress": {
"address": {
"protocol": "akka.tcp",
"system": "test-actor-system",
"host": "test-out-01",
"port": 2552
},
"uid": 1371217592
},
"upNumber": 3,
"status": "Up",
"roles": []
}
]