You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Dop Sun <su...@dopsun.com> on 2010/04/10 06:17:33 UTC

How many KeySpace will you use in a single application?

Hi, a question troubles me now: how many KeySpaces one application is better
to use?

 

The question is coming out since 0.6, Cassandra introduced a new API named
as "login", which is done against a specific keySpace. Thanks to the
org.apache.cassandra.auth.AllowAllAuthenticator, the old version clients can
still work without authentication.

 

Actually, while I'm working with the previous version, I just take the
KeySpace as another level of the whole structure, KeySpace - ColumnFamily -
Super Column (optional) - Column - Value.  And consider the whole Cassandra
cluster as the root of all these, and one application controls everything
under this cluster.

 

Now, looks like I need to re-think this and put the KeySpace as a kind of
root. It may be better to make one application only takes one KeySpace (a
silly question? Since all old time, one application usually uses only one
database, but forgive me, I may abuses the flexibility of Cassandra.)? Is
there any pros or cons to user multiple key spaces vs. single key spaces,
other than the authentication requirements?

 

Can anyone give me some suggestions on this?

 

Dop


Re: How many KeySpace will you use in a single application?

Posted by Lucifer Dignified <vi...@gmail.com>.
Dop

You can help us all by sharing your experiences here, so that new users dont
face the same problem :
A group to bring all HA force together (help the effort)

http://www.facebook.com/groups/edit.php?edit_members&gid=116428271708033#!/group.php?gid=116428271708033


On Sat, Apr 10, 2010 at 8:19 PM, Dop Sun <su...@dopsun.com> wrote:

> So, if my understanding is correct, in this case, the small replication
> factor key space is a online back system, or BCP environment. :)
>
> Very good one. Actually, one of the things which make me a little bit
> uncomfortable is BCP: once something goes wrong, how to take it back? In the
> traditional RDBS world, there are lot of documented practices and procedures
> to follow to make it happen. As a relative new and improving technology,
> these stuff is very limited. (even google cannot help at the moment. :-))
>
> Regards,
> Dop
>
> -----Original Message-----
> From: Benoit Perroud [mailto:benoit@noisette.ch]
> Sent: Saturday, April 10, 2010 5:48 PM
> To: user@cassandra.apache.org
> Subject: Re: How many KeySpace will you use in a single application?
>
> One point in using several keyspaces is that replication factor is per
> keyspace.
>
> If you have a part of your application which generate a lot of data
> whoss can be lost (some non critical logs?), then a dedicated keyspace
> with a smaller replication factor can be a good thing.
>
> Kind regards,
>
> Benoit.
>
> 2010/4/10 Dop Sun <su...@dopsun.com>:
> > Hi, a question troubles me now: how many KeySpaces one application is
> better
> > to use?
> >
> >
> >
> > The question is coming out since 0.6, Cassandra introduced a new API
> named
> > as “login”, which is done against a specific keySpace. Thanks to the
> > org.apache.cassandra.auth.AllowAllAuthenticator, the old version clients
> can
> > still work without authentication.
> >
> >
> >
> > Actually, while I’m working with the previous version, I just take the
> > KeySpace as another level of the whole structure, KeySpace – ColumnFamily
> –
> > Super Column (optional) – Column – Value.  And consider the whole
> Cassandra
> > cluster as the root of all these, and one application controls everything
> > under this cluster.
> >
> >
> >
> > Now, looks like I need to re-think this and put the KeySpace as a kind of
> > root. It may be better to make one application only takes one KeySpace (a
> > silly question? Since all old time, one application usually uses only one
> > database, but forgive me, I may abuses the flexibility of Cassandra.)? Is
> > there any pros or cons to user multiple key spaces vs. single key spaces,
> > other than the authentication requirements?
> >
> >
> >
> > Can anyone give me some suggestions on this?
> >
> >
> >
> > Dop
>
>
>

RE: How many KeySpace will you use in a single application?

Posted by Dop Sun <su...@dopsun.com>.
So, if my understanding is correct, in this case, the small replication factor key space is a online back system, or BCP environment. :)

Very good one. Actually, one of the things which make me a little bit uncomfortable is BCP: once something goes wrong, how to take it back? In the traditional RDBS world, there are lot of documented practices and procedures to follow to make it happen. As a relative new and improving technology, these stuff is very limited. (even google cannot help at the moment. :-))

Regards,
Dop

-----Original Message-----
From: Benoit Perroud [mailto:benoit@noisette.ch] 
Sent: Saturday, April 10, 2010 5:48 PM
To: user@cassandra.apache.org
Subject: Re: How many KeySpace will you use in a single application?

One point in using several keyspaces is that replication factor is per keyspace.

If you have a part of your application which generate a lot of data
whoss can be lost (some non critical logs?), then a dedicated keyspace
with a smaller replication factor can be a good thing.

Kind regards,

Benoit.

2010/4/10 Dop Sun <su...@dopsun.com>:
> Hi, a question troubles me now: how many KeySpaces one application is better
> to use?
>
>
>
> The question is coming out since 0.6, Cassandra introduced a new API named
> as “login”, which is done against a specific keySpace. Thanks to the
> org.apache.cassandra.auth.AllowAllAuthenticator, the old version clients can
> still work without authentication.
>
>
>
> Actually, while I’m working with the previous version, I just take the
> KeySpace as another level of the whole structure, KeySpace – ColumnFamily –
> Super Column (optional) – Column – Value.  And consider the whole Cassandra
> cluster as the root of all these, and one application controls everything
> under this cluster.
>
>
>
> Now, looks like I need to re-think this and put the KeySpace as a kind of
> root. It may be better to make one application only takes one KeySpace (a
> silly question? Since all old time, one application usually uses only one
> database, but forgive me, I may abuses the flexibility of Cassandra.)? Is
> there any pros or cons to user multiple key spaces vs. single key spaces,
> other than the authentication requirements?
>
>
>
> Can anyone give me some suggestions on this?
>
>
>
> Dop



Re: How many KeySpace will you use in a single application?

Posted by Benoit Perroud <be...@noisette.ch>.
One point in using several keyspaces is that replication factor is per keyspace.

If you have a part of your application which generate a lot of data
whoss can be lost (some non critical logs?), then a dedicated keyspace
with a smaller replication factor can be a good thing.

Kind regards,

Benoit.

2010/4/10 Dop Sun <su...@dopsun.com>:
> Hi, a question troubles me now: how many KeySpaces one application is better
> to use?
>
>
>
> The question is coming out since 0.6, Cassandra introduced a new API named
> as “login”, which is done against a specific keySpace. Thanks to the
> org.apache.cassandra.auth.AllowAllAuthenticator, the old version clients can
> still work without authentication.
>
>
>
> Actually, while I’m working with the previous version, I just take the
> KeySpace as another level of the whole structure, KeySpace – ColumnFamily –
> Super Column (optional) – Column – Value.  And consider the whole Cassandra
> cluster as the root of all these, and one application controls everything
> under this cluster.
>
>
>
> Now, looks like I need to re-think this and put the KeySpace as a kind of
> root. It may be better to make one application only takes one KeySpace (a
> silly question? Since all old time, one application usually uses only one
> database, but forgive me, I may abuses the flexibility of Cassandra.)? Is
> there any pros or cons to user multiple key spaces vs. single key spaces,
> other than the authentication requirements?
>
>
>
> Can anyone give me some suggestions on this?
>
>
>
> Dop

RE: How many KeySpace will you use in a single application?

Posted by Dop Sun <su...@dopsun.com>.
Thanks, I note it down.

-----Original Message-----
From: Jonathan Ellis [mailto:jbellis@gmail.com] 
Sent: Saturday, April 10, 2010 9:10 PM
To: user@cassandra.apache.org
Subject: Re: How many KeySpace will you use in a single application?

Yes, one keyspace per app is the normal way to design things.

On Fri, Apr 9, 2010 at 11:17 PM, Dop Sun <su...@dopsun.com> wrote:
> Hi, a question troubles me now: how many KeySpaces one application is
better
> to use?
>
>
>
> The question is coming out since 0.6, Cassandra introduced a new API named
> as “login”, which is done against a specific keySpace. Thanks to the
> org.apache.cassandra.auth.AllowAllAuthenticator, the old version clients
can
> still work without authentication.
>
>
>
> Actually, while I’m working with the previous version, I just take the
> KeySpace as another level of the whole structure, KeySpace – ColumnFamily
–
> Super Column (optional) – Column – Value.  And consider the whole
Cassandra
> cluster as the root of all these, and one application controls everything
> under this cluster.
>
>
>
> Now, looks like I need to re-think this and put the KeySpace as a kind of
> root. It may be better to make one application only takes one KeySpace (a
> silly question? Since all old time, one application usually uses only one
> database, but forgive me, I may abuses the flexibility of Cassandra.)? Is
> there any pros or cons to user multiple key spaces vs. single key spaces,
> other than the authentication requirements?
>
>
>
> Can anyone give me some suggestions on this?
>
>
>
> Dop



Re: How many KeySpace will you use in a single application?

Posted by Jonathan Ellis <jb...@gmail.com>.
Yes, one keyspace per app is the normal way to design things.

On Fri, Apr 9, 2010 at 11:17 PM, Dop Sun <su...@dopsun.com> wrote:
> Hi, a question troubles me now: how many KeySpaces one application is better
> to use?
>
>
>
> The question is coming out since 0.6, Cassandra introduced a new API named
> as “login”, which is done against a specific keySpace. Thanks to the
> org.apache.cassandra.auth.AllowAllAuthenticator, the old version clients can
> still work without authentication.
>
>
>
> Actually, while I’m working with the previous version, I just take the
> KeySpace as another level of the whole structure, KeySpace – ColumnFamily –
> Super Column (optional) – Column – Value.  And consider the whole Cassandra
> cluster as the root of all these, and one application controls everything
> under this cluster.
>
>
>
> Now, looks like I need to re-think this and put the KeySpace as a kind of
> root. It may be better to make one application only takes one KeySpace (a
> silly question? Since all old time, one application usually uses only one
> database, but forgive me, I may abuses the flexibility of Cassandra.)? Is
> there any pros or cons to user multiple key spaces vs. single key spaces,
> other than the authentication requirements?
>
>
>
> Can anyone give me some suggestions on this?
>
>
>
> Dop