views:

654

answers:

1

I am learning about the Apache Cassandra database [sic].

Does anyone have any good/bad experiences with deploying Cassandra to less than dedicated hardware like the offerings of Linode or Slicehost?

I think Cassandra would be a great way to scale a web service easily to meet read/write/request load... just add another Linode running a Cassandra node to the existing cluster. Yes, this implies running the public web service and a Cassandra node on the same VPS (which many can take exception with).

Pros of Linode-like deployment for Cassandra:

  • Private VLAN; the Cassandra nodes could communicate privately
  • An API to provision a new Linode (and perhaps configure it with a "StackScript" that installs Cassandra and its dependencies, etc.)
  • The price is right

Cons:

  • Each host is a VPS and is not dedicated of course
  • The RAM/cost ratio is not that great once you decide you want 4GB RAM (cf. dedicated at say SoftLayer)
  • Only 1 disk where one would prefer 2 disks I suppose (1 for the commit log and another disk for the data files themselves). Probably moot since this is shared hardware anyway.

EDIT: found this which helps a bit: http://wiki.apache.org/cassandra/CassandraHardware

I see that 1GB is the minimum but is this a recommendation? Could I deploy with a Linode 720 for instance (say 500 MB usable to Cassandra)? See http://www.linode.com/

+3  A: 

How much ram you needs really depends on your workload: if you are write-mostly you can get away with less, otherwise you will want ram for the read cache.

You do get more ram for you money at my employer, rackspace cloud: http://www.rackspacecloud.com/cloud_hosting_products/servers/pricing. (our machines also have raided disks so people typically see better i/o performance vs EC2. Dunno about linode.)

Since with most VPSes you pay roughly 2x for the next-size instance, i.e., about the same as adding a second small instance, I would recommend going with fewer, larger instances than more, smaller ones, since in small numbers network overhead is not negligible.

I do know someone using Cassandra on 256MB VMs but you're definitely in the minority if you go that small.

jbellis
Thanks for the info. This is what I was hoping. My app is very write-heavy and most of the time, other users that care about oft-written data are going to be long-polling or equivalent and will be pushed the data. Thus, the number of reads will be minimal.If I go the quorum-writes route I suppose I should always provision an odd number of instances for my Cassandra cluster, yes?
z8000
quorum is a function of replication factor, not total node count. so your minimum number of nodes (=RF) will be odd but growing past that does not need to be.
jbellis
Oh, OK. An example. I could have 1000 nodes in my cluster, but a replication factor of 5. Quorum would be 5/2+1=3. Thus, as long as 3 nodes were contacted/written/etc successfully then all is considered successful?
z8000
That is correct.
jbellis