Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D85210487 for ; Wed, 12 Feb 2014 21:15:32 +0000 (UTC) Received: (qmail 88457 invoked by uid 500); 12 Feb 2014 21:15:28 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 88406 invoked by uid 500); 12 Feb 2014 21:15:28 -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 88398 invoked by uid 99); 12 Feb 2014 21:15:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Feb 2014 21:15:28 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ben@instaclustr.com designates 209.85.220.50 as permitted sender) Received: from [209.85.220.50] (HELO mail-pa0-f50.google.com) (209.85.220.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Feb 2014 21:15:22 +0000 Received: by mail-pa0-f50.google.com with SMTP id kp14so9759006pab.37 for ; Wed, 12 Feb 2014 13:15:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:message-id:mime-version :subject:date:references:to:in-reply-to; bh=8YNFE2m4br43XOOds9Y7OGNQeTb+qcQm5VNEWsRtcdg=; b=HKSLJz7me3/bIrrS/M41GtzL8OFPwmNyHG8e0fDFg/e0iH/KV0JO5JFpQR054w8/In he1UFA1DMQRwz5tuq5B7h8kDCEA5wEUVX/HNhN9S4cdoVY8TyWkDyIep1U5FU6mDM4Sy p14Nmbua9ngmBKyaMIlUMsV8D8V+jt/dRlGYIFMEtt7Hu8JhCJXqRWqCEFo4KckMlJcg g+FCNQzxMK80RQDBtWkr9K6YHPG6kfoIs/B0vn0waEzI5YAtn1ye8NRqLH8LXvubBAZF Ii/1ziqEDLbcspUSQSzfbGQ9pRxKbvu1T9Sdtv3r1UlY+CByPtcHgbq7Gk0nv1cmuvee ZaeA== X-Gm-Message-State: ALoCoQmwp8xp6MM0GES5fbjCuJZKycPExg5QkZresZsD+jILgUX/CKX3UGfYA6BEMpQ8sCattLLJ X-Received: by 10.66.155.102 with SMTP id vv6mr42000068pab.89.1392239700303; Wed, 12 Feb 2014 13:15:00 -0800 (PST) Received: from [192.168.1.5] ([139.218.174.10]) by mx.google.com with ESMTPSA id qh2sm169682339pab.13.2014.02.12.13.14.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 13:14:59 -0800 (PST) From: Ben Bromhead Content-Type: multipart/alternative; boundary="Apple-Mail=_DC216247-5CE2-4461-861D-9AE665131EB2" Message-Id: <90EDDC17-ABD2-4D2F-9D12-4EE553792C68@instaclustr.com> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: in AWS is it worth trying to talk to a server in the same zone as your client? Date: Thu, 13 Feb 2014 08:14:56 +1100 References: To: user@cassandra.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1508) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_DC216247-5CE2-4461-861D-9AE665131EB2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 0.01/G between zones irrespective of IP is correct. As for your original question, depending on the driver you are using you = could write a custom co-ordinator node selection policy. For example if you are using the Datastax driver you would extend = http://www.datastax.com/drivers/java/2.0/apidocs/com/datastax/driver/core/= policies/LoadBalancingPolicy.html =85 and set the distance based on which zone the node is in. An alternate method would be to define the zones as data centres and = then you could leverage existing DC aware policies (We've never tried = this though).=20 Ben Bromhead Instaclustr | www.instaclustr.com | @instaclustr | +61 415 936 359 On 13/02/2014, at 8:00 AM, Andrey Ilinykh wrote: > I think you are mistaken. It is true for the same zone. between zones = 0.01/G >=20 >=20 > On Wed, Feb 12, 2014 at 12:17 PM, Russell Bradberry = wrote: > Not when using private IP addresses. That pricing ONLY applies if you = are using the public interface or EIP/ENI. If you use the private IP = addresses there is no cost associated. >=20 >=20 >=20 > On February 12, 2014 at 3:13:58 PM, William Oberman = (oberman@civicscience.com) wrote: >=20 >> Same region, cross zone transfer is $0.01 / GB (see = http://aws.amazon.com/ec2/pricing/, Data Transfer section). >>=20 >>=20 >> On Wed, Feb 12, 2014 at 3:04 PM, Russell Bradberry = wrote: >> Cross zone data transfer does not cost any extra money.=20 >>=20 >> LOCAL_QUORUM =3D QUORUM if all 6 servers are located in the same = logical datacenter. =20 >>=20 >> Ensure your clients are connecting to either the local IP or the AWS = hostname that is a CNAME to the local ip from within AWS. If you = connect to the public IP you will get charged for outbound data = transfer. >>=20 >>=20 >>=20 >> On February 12, 2014 at 2:58:07 PM, Yogi Nerella = (ynerella999@gmail.com) wrote: >>=20 >>> Also, may be you need to check the read consistency to local_quorum, = otherwise the servers still try to read the data from all other data = centers. >>>=20 >>> I can understand the latency, but I cant understand how it would = save money? The amount of data transferred from the AWS server to the = client should be same no matter where the client is connected? >>> =20 >>>=20 >>>=20 >>> On Wed, Feb 12, 2014 at 10:33 AM, Andrey Ilinykh = wrote: >>> yes, sure. Taking data from the same zone will reduce latency and = save you some money. >>>=20 >>>=20 >>> On Wed, Feb 12, 2014 at 10:13 AM, Brian Tarbox = wrote: >>> We're running a C* cluster with 6 servers spread across the four = us-east1 zones. >>>=20 >>> We also spread our clients (hundreds of them) across the four zones. >>>=20 >>> Currently we give our clients a connection string listing all six = servers and let C* do its thing. >>>=20 >>> This is all working just fine...and we're paying a fair bit in AWS = transfer costs. There is a suspicion that this transfer cost is driven = by us passing data around between our C* servers and clients. >>>=20 >>> Would there be any value to trying to get a client to talk to one of = the C* servers in its own zone? >>>=20 >>> I understand (at least partially!) about coordinator nodes and = replication and know that no matter which server is the coordinator for = an operation replication may cause bits to get transferred to/from = servers in other zones. Having said that...is there a chance that = trying to encourage a client to initially contact a server in its own = zone would help? >>>=20 >>> Thank you, >>>=20 >>> Brian Tarbox >>>=20 >>>=20 >>>=20 >>=20 >>=20 >>=20 >>=20 >=20 --Apple-Mail=_DC216247-5CE2-4461-861D-9AE665131EB2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 http://www.datastax.com/drivers= /java/2.0/apidocs/com/datastax/driver/core/policies/LoadBalancingPolicy.ht= ml

=85 and set the distance based on which = zone the node is in.

An alternate method would = be to define the zones as data centres and then you could leverage = existing DC aware policies (We've never tried this = though). 


www.instaclustr.com | = @instaclustr | +61 = 415 936 359




On 13/02/2014, at 8:00 AM, Andrey Ilinykh <ailinykh@gmail.com> = wrote:

I think you are mistaken. It is true for = the same zone. between zones 0.01/G


On Wed, Feb 12, = 2014 at 12:17 PM, Russell Bradberry <rbradberry@gmail.com> wrote:
Not when using private IP addresses.  That pricing ONLY applies if you are using the public = interface or EIP/ENI.  If you use the private IP addresses there is = no cost associated.


<= /div>

On February 12, 2014 at 3:13:58 PM, = William Oberman (oberman@civicscience.com) wrote:

Same region, cross zone transfer is $0.01 / GB (see http://aws.amazon.com/ec2/pricing/, Data Transfer section).


On Wed, Feb 12, 2014 at 3:04 PM, Russell Bradberry <rbradberry@gmail.com> wrote:
Cross zone data transfer does not cost any extra money. 

LOCAL_QUORUM =3D QUORUM if all 6 servers are located in the same logical datacenter.  

Ensure your clients are connecting to either the local IP or the AWS hostname that is a CNAME to the local ip from within AWS.  If you connect to the public IP you will get charged for outbound data transfer.



On February 12, 2014 at 2:58:07 PM, Yogi Nerella (ynerella999@gmail.com) wrote:

Also, may be you need to check the read consistency to local_quorum, otherwise the servers still try to read the data from all other data centers.

I can understand the latency, but I cant understand how it would save money?   The amount of data transferred from the AWS server to the client should be same no matter where the client is connected?
   


On Wed, Feb 12, 2014 at 10:33 AM, Andrey Ilinykh <ailinykh@gmail.com> wrote:
yes, sure. Taking data from the same zone will reduce latency and save you some money.


On Wed, Feb 12, 2014 at 10:13 AM, Brian Tarbox <tarbox@cabotresearch.com> wrote:
We're running a C* cluster with 6 servers spread across the four us-east1 zones.

We also spread our clients (hundreds of them) across the four zones.

Currently we give our clients a connection string listing all six servers and let C* do its thing.

This is all working just fine...and we're paying a fair bit in AWS transfer costs.  There is a suspicion that this transfer cost is driven by us passing data around between our C* servers and clients.

Would there be any value to trying to get a client to talk to one of the C* servers in its own zone?

I understand (at least partially!) about coordinator nodes and replication and know that no matter which server is the coordinator for an operation replication may cause bits to get transferred to/from servers in other zones.  Having said that...is there a chance that trying to encourage a client to initially contact a server in its own zone would help?

Thank you,

Brian Tarbox









= --Apple-Mail=_DC216247-5CE2-4461-861D-9AE665131EB2--