|
| 1 | +# Operation Guide |
| 2 | + |
| 3 | +**Principle: Don't terminate all Raft members at the same time.** |
| 4 | + |
| 5 | +To achieve this principle, you carefully do cluster operations. |
| 6 | +This document supposes that you will use three `multi-raft-roles` (`replica-group-1`, `replica-group-2`, `replica-group-3`). |
| 7 | + |
| 8 | + |
| 9 | +## Start a new cluster |
| 10 | +The important point is to start only one node in at least one role. |
| 11 | + |
| 12 | +A possible full cluster start operation is the following: |
| 13 | +* Start a node (or multiple nodes) with role `replica-group-1`. |
| 14 | +* Start a node (or multiple nodes) with role `replica-group-2`. |
| 15 | +* Start exactly one node with `replica-group-3`. |
| 16 | + |
| 17 | +You can do the above operations simultaneously. |
| 18 | +You have to wait for all Raft members to be running |
| 19 | +before adding more nodes with `replica-group-3`. |
| 20 | +The waiting time depends on your settings, such as the following: |
| 21 | +* `lerna.akka.entityreplication.raft.election-timeout` |
| 22 | +* `lerna.akka.entityreplication.raft.heartbeat-interval` |
| 23 | +* `lerna.akka.entityreplication.raft.number-of-shards` |
| 24 | +* `lerna.akka.entityreplication.raft.raft-actor-auto-start` |
| 25 | + |
| 26 | + |
| 27 | +## Add nodes |
| 28 | +Don't add nodes with different roles at the same time. |
| 29 | + |
| 30 | +Any of the following operations is possible: |
| 31 | +* Add a node (or multiple nodes) with `replica-group-1`. |
| 32 | +* Add a node (or multiple nodes) with `replica-group-2`. |
| 33 | +* Add a node (or multiple nodes) with `replica-group-3`. |
| 34 | + |
| 35 | +You **should not** do the above operations simultaneously. |
| 36 | +You have to wait for all Raft members to be running |
| 37 | +before adding more nodes or removing nodes. |
| 38 | +The waiting time depends on your settings, such as the following: |
| 39 | +* `lerna.akka.entityreplication.raft.election-timeout` |
| 40 | +* `lerna.akka.entityreplication.raft.heartbeat-interval` |
| 41 | + |
| 42 | +Any of the following operations is possible but **not recommended**. |
| 43 | +It is because you cannot ensure that any of nodes with untouched roles won't crash. |
| 44 | +* Add nodes with `replica-group-1` and nodes with `replica-group-2`. |
| 45 | +* Add nodes with `replica-group-2` and nodes with `replica-group-3`. |
| 46 | +* Add nodes with `replica-group-3` and nodes with `replica-group-1`. |
| 47 | + |
| 48 | + |
| 49 | +## Remove nodes |
| 50 | +Don't remove nodes with different roles at the same time. |
| 51 | + |
| 52 | +Any of the following operations is possible: |
| 53 | +* Remove a node (or multiple nodes) with `replica-group-1`. |
| 54 | +* Remove a node (or multiple nodes) with `replica-group-2`. |
| 55 | +* Remove a node (or multiple nodes) with `replica-group-3`. |
| 56 | + |
| 57 | +You **should not** do the above operations simultaneously. |
| 58 | +You have to wait for all Raft members to be running |
| 59 | +before adding nodes or removing more nodes. |
| 60 | +Waiting time depends on your settings, such as the following: |
| 61 | +* `lerna.akka.entityreplication.raft.election-timeout` |
| 62 | +* `lerna.akka.entityreplication.raft.heartbeat-interval` |
| 63 | + |
| 64 | +Any of the following operations is possible but **not recommended**. |
| 65 | +It is because you cannot ensure that any of nodes with untouched roles won't crash. |
| 66 | +* Remove nodes with `replica-group-1` and nodes with `replica-group-2`. |
| 67 | +* Remove nodes with `replica-group-2` and nodes with `replica-group-3`. |
| 68 | +* Remove nodes with `replica-group-3` and nodes with `replica-group-1`. |
0 commit comments