Sammy Roberts
Sammy Roberts

Reputation: 657

Does each node need to be able to hold the full database?

Could I, in theory, have 10,000 nodes all with a 1 gig hd and store a 100 gig db between them?

Is there certain options I need to set for this? Or config I need?

Thank you.

Upvotes: 2

Views: 159

Answers (1)

Loiselle
Loiselle

Reputation: 482

Each node does not need to hold the entire database.

The cockroach binary inspects the machine it's running on and find the available disk space; this information gets shared with other nodes via the Gossip protocol, and Cockroach algorithmically decides how best to store the data (controlled by your Replication Zones).

However, the aggregate disk space available should be > 3x the size of your database. For example, a 100gig DB needs at least 300gigs total across all of the machines in your cluster.

To answer your follow-on questions:

  • You could theoretically have 10,000 nodes each with a 1gig hard drive store a 100gig DB between them. This isn't realistic, though, because Cockroach might currently (as of 1.0.1) have some problems with 10,000 nodes communicating. Cockroach Labs just hasn't tested anything of that volume.
  • No special settings or config needed for that. Like I mentioned, everything is handled algorithmically.

Upvotes: 2

Related Questions