incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avinash Lakshman <avinash.laksh...@gmail.com>
Subject Re: How reliable is cassandra?
Date Mon, 29 Mar 2010 19:02:31 GMT
We use ZK for some incrementing counters and this is method that does it
(this is wrapped in a Thrift call) :

 public long getNextSequenceId()
    {
      Stat stat = null;
      String path = "/<cluster name>/" +  "/SequenceId";
      try
      {
        stat = zk_.setData( path , new byte[0] , -1);
      }
      catch (InterruptedException ie)
      {
        // handle it.
      }
      catch (KeeperException ke)
      {
        // handle it.
      }
      return stat.getMzxid();
    }


Avinash




On Mon, Mar 29, 2010 at 11:40 AM, Eric Hauser <ewhauser@gmail.com> wrote:

> That's good to know.  I've often seen high latency between availability
> zones.
>
> BTW, does anyone from Digg patrol the list?  I'm really interested in some
> additional the implementation of atomic counters with ZooKeeper.
>
>
> On Mon, Mar 29, 2010 at 1:58 PM, Joe Stump <joe@joestump.net> wrote:
>
>>
>> On Mar 29, 2010, at 11:55 AM, Eric Hauser wrote:
>>
>> > Does the information is the below link about Cassandra and replication
>> over WAN have any merit or is it just FUD?
>>
>> I can attest Cassandra works fine over inter-DC connections. We have ~20
>> nodes spread across three Amazon "Availability Zones". I know Digg is doing
>> bi-coastal Cassandra as well without issues.
>>
>> Cassandra was specifically built to work well over WAN / intermittently
>> failing connections / setups.
>>
>> --Joe
>>
>>
>

Mime
View raw message