feat(cluster): rewrite cluster discovering
* Discovering process adapted from EventStore scala client * Use DNS for first discover but also for reconnoctions (the aim is to be able to reconnect even if all nodes have new IP addresses eg. after rolling update in a cloud environment) * Being able to perform proper unit testing
This commit is contained in:
98
test/fixtures/gossip.json
vendored
Normal file
98
test/fixtures/gossip.json
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
{
|
||||
"members": [
|
||||
{
|
||||
"instanceId": "bb16857d-373d-4233-a175-89c917a72329",
|
||||
"timeStamp": "2020-09-02T13:53:24.234898Z",
|
||||
"state": "Slave",
|
||||
"isAlive": false,
|
||||
"internalTcpIp": "10.0.0.1",
|
||||
"internalTcpPort": 1112,
|
||||
"internalSecureTcpPort": 0,
|
||||
"externalTcpIp": "10.0.0.1",
|
||||
"externalTcpPort": 1113,
|
||||
"externalSecureTcpPort": 0,
|
||||
"internalHttpIp": "10.0.0.1",
|
||||
"internalHttpPort": 2112,
|
||||
"externalHttpIp": "10.0.0.1",
|
||||
"externalHttpPort": 2113,
|
||||
"lastCommitPosition": 648923382,
|
||||
"writerCheckpoint": 648936339,
|
||||
"chaserCheckpoint": 648936339,
|
||||
"epochPosition": 551088596,
|
||||
"epochNumber": 201,
|
||||
"epochId": "d8f95f4b-167a-4487-9031-4d31a507e6d9",
|
||||
"nodePriority": 0
|
||||
},
|
||||
{
|
||||
"instanceId": "b3c18dcd-6476-467a-b7b8-d6672b74e9c2",
|
||||
"timeStamp": "2020-09-02T13:56:06.189428Z",
|
||||
"state": "CatchingUp",
|
||||
"isAlive": true,
|
||||
"internalTcpIp": "10.0.0.2",
|
||||
"internalTcpPort": 1112,
|
||||
"internalSecureTcpPort": 0,
|
||||
"externalTcpIp": "10.0.0.2",
|
||||
"externalTcpPort": 1113,
|
||||
"externalSecureTcpPort": 0,
|
||||
"internalHttpIp": "10.0.0.2",
|
||||
"internalHttpPort": 2112,
|
||||
"externalHttpIp": "10.0.0.2",
|
||||
"externalHttpPort": 2113,
|
||||
"lastCommitPosition": -1,
|
||||
"writerCheckpoint": 0,
|
||||
"chaserCheckpoint": 0,
|
||||
"epochPosition": -1,
|
||||
"epochNumber": -1,
|
||||
"epochId": "00000000-0000-0000-0000-000000000000",
|
||||
"nodePriority": 0
|
||||
},
|
||||
{
|
||||
"instanceId": "e802a2b5-826c-4bd5-84d0-c9d1387fbf79",
|
||||
"timeStamp": "2020-09-02T13:56:07.391534Z",
|
||||
"state": "Master",
|
||||
"isAlive": true,
|
||||
"internalTcpIp": "10.0.0.3",
|
||||
"internalTcpPort": 1112,
|
||||
"internalSecureTcpPort": 0,
|
||||
"externalTcpIp": "10.0.0.3",
|
||||
"externalTcpPort": 1113,
|
||||
"externalSecureTcpPort": 0,
|
||||
"internalHttpIp": "10.0.0.3",
|
||||
"internalHttpPort": 2112,
|
||||
"externalHttpIp": "10.0.0.3",
|
||||
"externalHttpPort": 2113,
|
||||
"lastCommitPosition": 649007631,
|
||||
"writerCheckpoint": 649024685,
|
||||
"chaserCheckpoint": 649024685,
|
||||
"epochPosition": 649023795,
|
||||
"epochNumber": 202,
|
||||
"epochId": "1f17695d-6558-4d8b-ba60-2ae273b11e09",
|
||||
"nodePriority": 0
|
||||
},
|
||||
{
|
||||
"instanceId": "24bb9031-5f21-436c-a7b5-c5f03a95e938",
|
||||
"timeStamp": "2020-09-02T13:54:39.023053Z",
|
||||
"state": "Slave",
|
||||
"isAlive": false,
|
||||
"internalTcpIp": "10.0.0.4",
|
||||
"internalTcpPort": 1112,
|
||||
"internalSecureTcpPort": 0,
|
||||
"externalTcpIp": "10.0.0.4",
|
||||
"externalTcpPort": 1113,
|
||||
"externalSecureTcpPort": 0,
|
||||
"internalHttpIp": "10.0.0.4",
|
||||
"internalHttpPort": 2112,
|
||||
"externalHttpIp": "10.0.0.4",
|
||||
"externalHttpPort": 2113,
|
||||
"lastCommitPosition": 649007631,
|
||||
"writerCheckpoint": 649023795,
|
||||
"chaserCheckpoint": 649023795,
|
||||
"epochPosition": 551088596,
|
||||
"epochNumber": 201,
|
||||
"epochId": "d8f95f4b-167a-4487-9031-4d31a507e6d9",
|
||||
"nodePriority": 0
|
||||
}
|
||||
],
|
||||
"serverIp": "10.0.0.3",
|
||||
"serverPort": 2112
|
||||
}
|
Reference in New Issue
Block a user