Reputation: 499
Given that CockroachDB is described as a distributed database -- e.g. running across multiple nodes -- how does it divide up data to store it on different servers? Are individual tables split up between nodes?
Upvotes: 1
Views: 1376
Reputation: 499
CockroachDB's architecture splits all the data it stores into ranges (configurable, but starts at ~64MB), and then balances the ranges among nodes in the cluster based on its replication settings.
See https://www.cockroachlabs.com/docs/configure-replication-zones.html
A table generally starts as a single range, but will be split automatically when it grows beyond the configured range size.
On the individual nodes, the data is stored in the directory specified when you start the node specified by the --store
flag, which, by default is "./cockroach-data".
Upvotes: 2