From user-return-10572-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Nov 17 03:17:33 2010 Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 19706 invoked from network); 17 Nov 2010 03:17:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Nov 2010 03:17:32 -0000 Received: (qmail 68725 invoked by uid 500); 17 Nov 2010 03:18:02 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 68638 invoked by uid 500); 17 Nov 2010 03:18:02 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 68630 invoked by uid 99); 17 Nov 2010 03:18:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Nov 2010 03:18:01 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a42.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Nov 2010 03:17:55 +0000 Received: from homiemail-a42.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a42.g.dreamhost.com (Postfix) with ESMTP id 864BD68C06B for ; Tue, 16 Nov 2010 19:17:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=to:from :subject:date:message-id:content-type:mime-version:in-reply-to; q=dns; s=thelastpickle.com; b=0y7c3As9Ha4lI0mYpwauTh9ZuIEALXuuY u4EZZ4xWnP9XbOg1UUjJIBFRg7WPsB3UvOi/3o6R3tzPZiCZLNFvqTrtxvozZnnn HejKE9jc2Dnt8h/Q/cLcDWVQV4uF9VmpHsMNbfCLKXuNWY8jatnVwRUMRjqbNDg7 HtlhhkqCOM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=to :from:subject:date:message-id:content-type:mime-version: in-reply-to; s=thelastpickle.com; bh=8MZJ14L6UydL7bhdV8uSEmleVmM =; b=Wm356ho3eH7ZT/F86MRDWwSmsz99JknEsmnL2u/rL20zIv3LHQ6zJgQswGX gEScphwPEJI2WP2MuTU5q20redYDzfh3JBOmaDZ6qPrafStW2rWqvwGcTN8lbmzm q7fXaUBM/NOVHQACGtTLu23a5wDPpEhNxdiopS14msfUTdxk= Received: from localhost (webms.mac.com [17.148.16.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a42.g.dreamhost.com (Postfix) with ESMTPSA id 68AA368C05F for ; Tue, 16 Nov 2010 19:17:29 -0800 (PST) To: user@cassandra.apache.org From: Aaron Morton Subject: Re: Smart Client Routing Date: Wed, 17 Nov 2010 03:17:28 GMT X-Mailer: MobileMe Mail (1C3207) Message-id: <847de2cf-924d-491e-fa0b-d63e01ba6c30@me.com> Content-Type: multipart/alternative; boundary=Apple-Webmail-42--6c0a9470-6bd9-ca28-e82a-c9ce23d0f40f MIME-Version: 1.0 In-Reply-To: <423288.88728.qm@web51107.mail.re2.yahoo.com> --Apple-Webmail-42--6c0a9470-6bd9-ca28-e82a-c9ce23d0f40f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; format=flowed No need to worry.=A0=0A=0AI run REST requests through Varnish box > nginx = / Tornaod / Python box > Cassandra cluster and can get requests in and out= of the stack in a couple of milliseconds. Using some old workstation HW a= nd not paying much attention to tuning.=A0=0A=0ABuild it like a normal sys= tem and separate out the parts, if / when you have problems then you can l= ook at tuning the cassandra cluster or other parts of the stack. There are= normally a number of other issues to deal with before network IO.=0A=0AHo= pe that helps.=A0=0AAaron=0A=0A=0AOn 17 Nov, 2010,at 03:31 PM, E S wrote:=0A=0AI am considering building a system as follows:=0A= =0A1. Data stored in Cassandra=0A2. Webservice cluster (stateless) will pu= ll data from cassandra and do business =0Aoperations plus security enforce= ment=0A3. Clients will hit the webservice cluster=0A=0AI'm trying to maint= ain a low read latency and am worried about the number of =0Ahops. Client = will hit the webservice. The webservice will hit a random node in =0Athe c= assandra cluster. The cassandra cluster will then route the the =0Aappropr= iate node and the data will flow all the way back.=0A=0AHow many of these = hops can I remove? I would bundle the cassandra and =0Awebservice processe= s onto each box. If I route the webservice to always go to =0Athe local no= de, I'll remove one hop. Is it possible to optimize this further so =0Atha= t the client can use the cassandra routing logic to go to the webservice t= hat =0Aalso houses a cassandra node that contains the data? In this case, = there would =0Aonly be one hop, and if the data is used frequently, I it w= ill likely reside in =0Amemory without requiring a separate caching layer.= This is an internal =0Awebservice, so I would be ok with a library on the= client side to help with the =0Arouting.=0A=0AIs any of this possible? I = was looking at the cassandra apis and couldn't =0Afigure out a way.=0A=0AT= hanks for any help!=0A=0A=0A=0A=0A --Apple-Webmail-42--6c0a9470-6bd9-ca28-e82a-c9ce23d0f40f Content-Type: multipart/related; type="text/html"; boundary=Apple-Webmail-86--6c0a9470-6bd9-ca28-e82a-c9ce23d0f40f --Apple-Webmail-86--6c0a9470-6bd9-ca28-e82a-c9ce23d0f40f Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1;
No need to worry. 

I run REST requests = through Varnish box > nginx / Tornaod / Python box > Cassandra clust= er and can get requests in and out of the stack in a couple of millisecond= s. Using some old workstation HW and not paying much attention to tuning.&= nbsp;

Build it like a normal system and separate = out the parts, if / when you have problems then you can look at tuning the= cassandra cluster or other parts of the stack. There are normally a numbe= r of other issues to deal with before network IO.

Hope that helps. 
Aaron


On 17 Nov, 2010,= at 03:31 PM, E S <tr1sklion@yahoo.com> wrote:

I am considering buildi= ng a system as follows:
=0A
=0A1. Data stored in Cassandra
=0A2.= Webservice cluster (stateless) will pull data from cassandra and do busi= ness
=0Aoperations plus security enforcement
=0A3. Clients will hi= t the webservice cluster
=0A
=0AI'm trying to maintain a low read la= tency and am worried about the number of
=0Ahops. Client will hit the= webservice. The webservice will hit a random node in
=0Athe cassandr= a cluster. The cassandra cluster will then route the the
=0Aappropria= te node and the data will flow all the way back.
=0A
=0AHow many of = these hops can I remove? I would bundle the cassandra and
=0Awebservi= ce processes onto each box. If I route the webservice to always go to =0Athe local node, I'll remove one hop. Is it possible to optimize this = further so
=0Athat the client can use the cassandra routing logic to g= o to the webservice that
=0Aalso houses a cassandra node that contains= the data? In this case, there would
=0Aonly be one hop, and if the d= ata is used frequently, I it will likely reside in
=0Amemory without r= equiring a separate caching layer. This is an internal
=0Awebservice,= so I would be ok with a library on the client side to help with the
=0A= routing.
=0A
=0AIs any of this possible? I was looking at the cassa= ndra apis and couldn't
=0Afigure out a way.
=0A
=0AThanks for an= y help!
=0A
=0A
=0A
=0A
=0A
<= /div> --Apple-Webmail-86--6c0a9470-6bd9-ca28-e82a-c9ce23d0f40f-- --Apple-Webmail-42--6c0a9470-6bd9-ca28-e82a-c9ce23d0f40f--