How to replicate databases when new cluster nodes are added in Kubernetes ? #4522
-
|
Hi, I have initially started with a 3 node cluster. And the cluster has two databases (one initialized via If I scale up the Kube cluster (a StatefulSet) from 3 to 5, I do not see the database that has been imported. Here are the relevant settings for the server ... The list of databases inside the From the above info, it is clear that the newly added nodes Note that I have first scaled down the cluster to zero from 3 and then scaled up to 5. This is typically a normal practice (it has some disruption though). Here is the output of the One particular observation from the above cluster layout is that a new node |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
I get a feeling this is likely by design. It probably is too costly to replicate the entire database over http. Trying to understand what steps would be needed to replicate the databases on new nodes. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @venkataramanam, Thanks for the detailed write-up. The cluster dump and the per-node What's happeningWith the Raft-based HA, databases reach a node in two ways:
Two things made it worse in your run:
How to recover now
Your offline-copy questionYes, that works too. A user database directory (e.g. Recommended scale-up procedureAvoid scaling to 0. Scale the StatefulSet up incrementally while the cluster stays online (3 -> 4 -> 5). Keeping a quorum of nodes-with-data online means leadership stays on an authoritative node, and you can Going forwardI agree the friction is real: a freshly added empty node should be able to acquire databases it has never seen without a manual |
Beta Was this translation helpful? Give feedback.
-
|
I opened #4727 to track the improvement (a freshly added empty node should auto-acquire databases it has never seen, instead of only refreshing the ones it already has). Follow there for progress. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks very much for the elaborate response. Was busy with some other commitments. I was trying to relate to my experience of working with Etcd and Clickhouse. While Etcd didn't have anything auto discovery of new members and member addition had to be manual, it did seamlessly replicate data across the new members. While in the case of Clickhouse, it was a case of manually having to create the data schema before the Clickhouse would start replicating. |
Beta Was this translation helpful? Give feedback.
-
|
The issue has been closed, everything has been implemented and tested, please @venkataramanam let me know if you can retry with the latest snapshot. |
Beta Was this translation helpful? Give feedback.
Hi @venkataramanam,
Thanks for the detailed write-up. The cluster dump and the per-node
databaseslisting make the situation clear.What's happening
With the Raft-based HA, databases reach a node in two ways:
OpenBeeris on-0/-1/-2.-3/-4come up with onlydbi…