RE: RE: Storing user activity logs

2021-07-20 Thread MyWorld
eries of data. > > Sean Durity – Staff Systems Engineer, Cassandra > > From: manish khandelwal > Sent: Monday, July 19, 2021 11:58 PM > To: user@cassandra.apache.org > Subject: [EXTERNAL] Re: Storing user activity logs > > I concur with Eliot view. Only way you can reduce part

RE: Storing user activity logs

2021-07-20 Thread Durity, Sean R
11:58 PM To: user@cassandra.apache.org Subject: [EXTERNAL] Re: Storing user activity logs I concur with Eliot view. Only way you can reduce partition size is by tweaking your partition key. Here with user_id as partition key, partition size depends on the activity of the user. For a superactive

Re: Storing user activity logs

2021-07-19 Thread manish khandelwal
I concur with Eliot view. Only way you can reduce partition size is by tweaking your partition key. Here with user_id as partition key, partition size depends on the activity of the user. For a superactive user it can become large in no time. After changing the key migration of old data to the

RE: Re: Storing user activity logs

2021-07-19 Thread MyWorld
Hi Elliott, We thought of adding month and mapping key to partition key to make it bimonthly. So our new partition key would be userid + date (mm) + mapping key (01 for date 01-15 and 02 for date 16-30). However, there could be a user who has done only 10 activities in past 6 months. So I need

Re: Storing user activity logs

2021-07-19 Thread Elliott Sims
Your partition key determines your partition size. Reducing retention sounds like it would help some in your case, but really you'd have to split it up somehow. If it fits your query pattern, you could potentially have a compound key of userid+datetime, or some other time-based split. You could

Storing user activity logs

2021-07-19 Thread MyWorld
Hi all, We are currently storing our user activity log in Cassandra with below architecture. Create table user_act_log( Userid bigint, Datetime bigint, Sno UUID, some more columns) With partition key - userid Clustering key - datetime, sno And TTL of 6 months With time our table data have