Apoorv
Apoorv

Reputation: 2735

Using cassandra in single node, should I still worry about choosing a "good" partition key?

We are using cassandra on a single node. I understand that in a cluster, a smart partition key would allow data to be distributed across cluster and will avoid all the keys getting stored on the same host. However in our case, theres just one host and I can use a constant (dummy) partition key but wanted to check if would miss out on something if I do that. For example, cassandra has a limit of having at most 2 billion cells per partition. Does cassandra honor that limit for a single host too? Can I have a table with more than 2 billion cells on a single node cassandra?

Upvotes: 0

Views: 114

Answers (1)

MD Ruhul Amin
MD Ruhul Amin

Reputation: 4502

Can I have a table with more than 2 billion cells on a single node cassandra?

Ans: Yes.

Instead of using a constant(dummy) partition key, I would recommend to choose a good partition key. By doing this you remain open for expansion such as in future you may want to use Cassandra in cluster mode. It doesn't matter if you are using Cassandra in single or cluster mode as rows limited to partition keys not entire node. So a single node can have more than 2 billion rows.

Upvotes: 1

Related Questions