Re: Using Cassandra for session tokens

2014-12-02 Thread Jason Wee
Hi Phil, just my 2 cents, just watch out for these issues like counter type (replicate on write), compaction (when node load goes huge) and cassandra instance gc. This issues exists in 1.x perhaps it has been resolved in 2.x. hth jason On Mon, Dec 1, 2014 at 10:44 PM, Matt Brown wrote: > This

Re: Using Cassandra for session tokens

2014-12-01 Thread Laing, Michael
Sharding lets you use the row cache effectively in 2.1. But like everything, one should test :) On Mon, Dec 1, 2014 at 1:56 PM, Jonathan Haddad wrote: > I don't know what the advantage would be of using this sharding system. I > would recommend just going with a simple k->v table as the OP sug

Re: Using Cassandra for session tokens

2014-12-01 Thread Jonathan Haddad
I don't know what the advantage would be of using this sharding system. I would recommend just going with a simple k->v table as the OP suggested. On Mon Dec 01 2014 at 7:18:51 AM Laing, Michael wrote: > Since the session tokens are random, perhaps computing a shard from each > one and using it

Re: Using Cassandra for session tokens

2014-12-01 Thread Laing, Michael
Since the session tokens are random, perhaps computing a shard from each one and using it as the partition key would be a good idea. I would also use uuid v1 to get ordering. With such a small amount of data, only a few shards would be needed. On Mon, Dec 1, 2014 at 10:08 AM, Phil Wise wrote:

Re: Using Cassandra for session tokens

2014-12-01 Thread Phil Wise
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The session will be written once at create time, and never modified after that. Will that affect things? Thank you - -Phil On 01.12.2014 15:58, Jonathan Haddad wrote: > I don't think DateTiered will help here, since there's no > clustering key defin

Re: Using Cassandra for session tokens

2014-12-01 Thread Jonathan Haddad
I don't think DateTiered will help here, since there's no clustering key defined. This is a pretty straightforward workload, I've done something similar. Are you overwriting the session on every request? Or just writing it once? On Mon Dec 01 2014 at 6:45:14 AM Matt Brown wrote: > This sounds l

Re: Using Cassandra for session tokens

2014-12-01 Thread Matt Brown
This sounds like a good use case for http://www.datastax.com/dev/blog/datetieredcompactionstrategy > On Dec 1, 2014, at 3:07 AM, Phil Wise wrote: > > We're considering switching from using Redis to Cassandra to store > short live

Using Cassandra for session tokens

2014-12-01 Thread Phil Wise
We're considering switching from using Redis to Cassandra to store short lived (~1 hour) session tokens, in order to reduce the number of data storage engines we have to manage. Can anyone foresee any problems with the following approach: 1) Use the TTL functionality in Cassandra to remove old to