Search code examples
distributed-computingcockroachdbraft

What happens if I add a new node to a CockroachDB cluster with more storage than existing nodes?


Having a 3x 1TB CockroachDB cluster, what happens if I add a single 4 TB node? Presumably only some of the 4TB can be used as not all can be replicated? If I add 3 new nodes with 4TB each, can all disk space be replicated/used?


Solution

  • I think everything you say is right. If you only have a single large store, you need sufficiently many small nodes around it in order to fill the large one. Our disk balancing tries to keep equal amounts of data on each store until a store is almost full, at which point it will prefer less full ones.