Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-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 CC2CF109CB for ; Thu, 2 May 2013 01:22:52 +0000 (UTC) Received: (qmail 58515 invoked by uid 500); 2 May 2013 01:22:52 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 58453 invoked by uid 500); 2 May 2013 01:22:52 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 58443 invoked by uid 99); 2 May 2013 01:22:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 May 2013 01:22:52 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [209.85.192.181] (HELO mail-pd0-f181.google.com) (209.85.192.181) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 May 2013 01:22:45 +0000 Received: by mail-pd0-f181.google.com with SMTP id p11so56079pdj.12 for ; Wed, 01 May 2013 18:22:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=Ps13+tLuyW1az/U7/iz1KTmTdcuScfezXylMw6XZsFo=; b=oxRF7IbQEa3qgY7L4ob07HL0HS2osN1MOiL2kxijBI/+xH4x1ai903RRZIAxSOabDV vq04x33WgPoDQqWtkzbV9o00eo1/JD+VMRET8yu/a36FupZXd2/ka5qAlNfYLXyhNX5m XLWqw7UMcVg9h+fFL2kSH6NHMTe/roiO7cUQjFbm9GwMSXUNZo4QThdNCmtjudWUvpEL YvGqf7lWCm3GpJPOesr8/u6uaqg1gjc7Hx9/faVkURlalzZFGgtFkf7bEB6UzNl4ilBu JoQEYu6JC5WtuE8oMIHR7F49GvmCg5PaniLbx9wb9y/560ZQpGjM2kwF7q8kyuazIo/I ES2w== X-Received: by 10.66.251.202 with SMTP id zm10mr3131381pac.53.1367457724154; Wed, 01 May 2013 18:22:04 -0700 (PDT) Received: from [192.168.0.192] (c-76-103-249-200.hsd1.ca.comcast.net. [76.103.249.200]) by mx.google.com with ESMTPSA id cq1sm5028023pbc.13.2013.05.01.18.22.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 May 2013 18:22:03 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: Client host selection? From: Jordan Zimmerman In-Reply-To: Date: Wed, 1 May 2013 18:22:02 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <2FE8EC46-383C-44BB-A5D9-54F2282FC06B@jordanzimmerman.com> References: To: user@zookeeper.apache.org X-Mailer: Apple Mail (2.1503) X-Gm-Message-State: ALoCoQmpZjdL2hEN9dEZ/FRNrdb5NzS4MCmVNs2RcWzP2U/30uwBU78RbQ+EWNVTKeSp6kwtITyr X-Virus-Checked: Checked by ClamAV on apache.org If you can determine local clients, just limit your connection string to = those local clients. Of course, this limits failover to local servers, = but would be a decent workaround until there's better support in ZK. -JZ On May 1, 2013, at 6:05 PM, Owen Kim wrote: > Thanks for the info. >=20 > That feature would be useful. I can determine local nodes myself and = feed > them into the client. > https://issues.apache.org/jira/browse/ZOOKEEPER-1698 >=20 >=20 > On Wed, May 1, 2013 at 5:48 PM, Michi Mutsuzaki = wrote: >=20 >> C client has zoo_deterministic_conn_order() to make the connection >> order deterministic. We can add a similar feature to Java client. >> Owen, do you want to open a JIRA for this? >>=20 >> --Michi >>=20 >> On Wed, May 1, 2013 at 5:40 PM, Benjamin Reed = wrote: >>> no it will connect randomly. we don't really have a way to specify >>> preference or weight. it would be a nice feature to add though. >>>=20 >>> ben >>>=20 >>>=20 >>> On Wed, May 1, 2013 at 5:26 PM, Owen Kim wrote: >>>=20 >>>> Is the client configurable on which host it tries to connect to = when I >> give >>>> it the host list? Will it perhaps try deterministically in order? >>>> Specifically, I'd like it to favor ZK hosts in the same DC. >>>>=20 >>=20