cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Turner <>
Subject Re: 1000's of column families
Date Thu, 27 Sep 2012 18:50:50 GMT
On Thu, Sep 27, 2012 at 7:35 PM, Marcelo Elias Del Valle
<> wrote:
> 2012/9/27 Aaron Turner <>
>> How strict are your security requirements?  If it wasn't for that,
>> you'd be much better off storing data on a per-statistic basis then
>> per-device.  Hell, you could store everything in a single CF by using
>> a composite row key:
>> <devicename>|<stat type>|<instance>
>> But yeah, there isn't a hard limit for the number of CF's, but there
>> is overhead associated with each one and so I wouldn't consider your
>> design as scalable.  Generally speaking, hundreds are ok, but
>> thousands is pushing it.
> Aaron,
>     Imagine that instead of using a composite key in this case, you use a
> simple row key "instance_uuid". Then, to index data by devicename |
> start_type|instance you use another CF with this composite key or several
> CFs to index it.
>     Do you see any drawbacks in terms of performance?

Really that depends on the client side I think.  Ideally, you'd like
to have the client be able to be able to directly access the row by
name without looking it up in some index.  Basically if you have to
lookup up the instance_uuid that's another call to some datastore
which takes more time then generating the row key via it's composites.
 At least that's my opinion...

Of course there are times where using an instance_uuid makes a lot of
sense... like if you rename a device and want all your stats to move
to the new name.  Much easier to just update the mapping record then
reading & rewriting all your rows for that device.

In my project, we use a device_uuid (just a primary key stored in an
Oracle DB... long story!), but everything else is by name in our
composite row keys.

Aaron Turner         Twitter: @synfinatic - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
    -- Benjamin Franklin
"carpe diem quam minimum credula postero"

View raw message