pranadb
pranadb copied to clipboard
Cluster scale up/down
Currently the number of nodes and shards in a cluster is fixed and cannot change.
We can keep the number of shards in a cluster fixed but we should allow for the number of nodes in a cluster to be scaled up or down.
To scale up a cluster - a new node can be started, and the management client can be used to add it to the cluster. We should make sure this works well with Kubernetes (A new Kubernetes operator?)
Some partitions (1/N where N is cluster size) will then be migrated to the new node and once they have become synced, it will become active. In order to migrate partitions, the data needs to be copied from one node to another. To do this efficiently we will stream partition data from one server to another using a gRPC API. Once the data has been copied the follower can resync with the raft leader to get it up to date.