Return-Path: X-Original-To: apmail-cassandra-client-dev-archive@minotaur.apache.org Delivered-To: apmail-cassandra-client-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D79AD10270 for ; Sun, 8 Sep 2013 11:03:40 +0000 (UTC) Received: (qmail 39054 invoked by uid 500); 8 Sep 2013 11:03:40 -0000 Delivered-To: apmail-cassandra-client-dev-archive@cassandra.apache.org Received: (qmail 38867 invoked by uid 500); 8 Sep 2013 11:03:39 -0000 Mailing-List: contact client-dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: client-dev@cassandra.apache.org Delivered-To: mailing list client-dev@cassandra.apache.org Received: (qmail 38859 invoked by uid 99); 8 Sep 2013 11:03:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Sep 2013 11:03:37 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [81.187.167.226] (HELO cel.leonerd.org.uk) (81.187.167.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Sep 2013 11:03:31 +0000 Received: from shy.leonerd.org.uk (8.9.7.8.3.c.e.f.f.f.2.8.9.a.e.8.3.4.0.0.7.f.3.0.0.b.8.0.1.0.0.2.ip6.arpa [IPv6:2001:8b0:3f7:43:8ea9:82ff:fec3:8798]) by cel.leonerd.org.uk (Postfix) with ESMTPSA id 6ED3233B24 for ; Sun, 8 Sep 2013 12:03:10 +0100 (BST) Date: Sun, 8 Sep 2013 12:03:09 +0100 From: Paul "LeoNerd" Evans To: client-dev@cassandra.apache.org Subject: Re: Initialising / maintaining a list of nodes in the cluster Message-ID: <20130908120309.43e48458@shy.leonerd.org.uk> In-Reply-To: <20130906232951.67845808@shy.leonerd.org.uk> References: <20130906232951.67845808@shy.leonerd.org.uk> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.20; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/UyRPuOVvKUr_NpM.2GNJJ0S"; protocol="application/pgp-signature" X-Virus-Checked: Checked by ClamAV on apache.org --Sig_/UyRPuOVvKUr_NpM.2GNJJ0S Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable So I have now found some answers to some of these, but one question still remains: On Fri, 6 Sep 2013 23:29:51 +0100 Paul "LeoNerd" Evans wrote: > * The "system.peers" table identifies peers only by their IP address, > not including the port number, whereas TOPOLOGY and STATUS_CHANGE > messages include a port. >=20 > What happens if there is more than one copy of a node using the > same IP address? This can't happen, as the IP address alone is used by Gossip to identify the nodes. > How do I know which TCP port I can use to > communicate CQL with a given peer? It's highly discouraged to use heterogeneous TCP ports for CQL, so in practice they'll all be the same. > * The "system.peers" table doesn't contain any information giving the > current availability status of the nodes, so I don't know if they > are initially up or down. >=20 > I can just presume all the known nodes are up until I try > connecting to them - in any case, it could be that Cassandra knows > of the existence of nodes that for some reason my client can't > connect to, so I'd have to handle this case anyway. But it feels > like that hint should be there somewhere. This question still outstanding. > * The "system.peers" table doesn't include the actual node I am > querying it on. >=20 > Most of the missing information does appear in the "system.local" > table, but not the address. The client does know /an/ address it > has connected to that node using, but how can I be sure that this > address is the one that will appear in the "peers" list on other > nodes? It's quite common for a server to have multiple addresses, > so it may be that I've connected to some address different to that > which the other nodes know it by. Turns out it will only accept connections on the IP address it's using for its peers anyway, so this should be fine. --=20 Paul "LeoNerd" Evans leonerd@leonerd.org.uk ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/ --Sig_/UyRPuOVvKUr_NpM.2GNJJ0S Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iF4EAREIAAYFAlIsWW0ACgkQ4y9efBOfZ0hAEQEAruNOTW4EKzb5/dHpHFh7dTpO 7hvObNHvhdBqqoCyjQ0A/0hFNaalPppxMFtNqZa2zQQXM8g+KDU66NiMYWj1y9RS =QV2l -----END PGP SIGNATURE----- --Sig_/UyRPuOVvKUr_NpM.2GNJJ0S--