nvartolomei
nvartolomei

Reputation: 1505

Unique monotonically increasing ids using Cassandra

I have some kind of time series events that I want to store in a Cassandra database.

The question is: it is possible to assign each entry a unique monotonically increasing id? Does timeuuid and now() guarantee that inside a partition?

I want always to get data back exactly in the same order it was inserted, and wondering if I can achieve that without using a separate distributed service for generating ids.

Upvotes: 0

Views: 524

Answers (1)

xmas79
xmas79

Reputation: 5180

Cassandra's timeuuid type have low enough probability for such tasks. I suggest to have a look at this recent answer along with the Cassandra wiki page.

Upvotes: 1

Related Questions