Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 17202200BE3 for ; Thu, 22 Dec 2016 11:59:42 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 15C5F160B26; Thu, 22 Dec 2016 10:59:42 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5F96E160B1F for ; Thu, 22 Dec 2016 11:59:41 +0100 (CET) Received: (qmail 52608 invoked by uid 500); 22 Dec 2016 10:59:40 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 52592 invoked by uid 99); 22 Dec 2016 10:59:40 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Dec 2016 10:59:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D7B9F18BB7F for ; Thu, 22 Dec 2016 10:59:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Nal5Jf1OqHcI for ; Thu, 22 Dec 2016 10:59:38 +0000 (UTC) Received: from mail-qt0-f177.google.com (mail-qt0-f177.google.com [209.85.216.177]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D1CE35F36B for ; Thu, 22 Dec 2016 10:59:37 +0000 (UTC) Received: by mail-qt0-f177.google.com with SMTP id w33so231087836qtc.3 for ; Thu, 22 Dec 2016 02:59:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=md2bPa9S6bYGI5NsXWeWW1SmfkCfvTUq3qhbcNT+1Ok=; b=jekqeCLhRJtqGJfiCBzUodl7fRbRf7BX14mGxjSNUn/cBjbyN5j6dcXUGpOxngxjsp knMbcISVGDwuMWpSmar7XkGupxqHxcszMV9x9Rip8TBW4ffPpcrrfCKefyfV36wCsqTj 1lkC5KG8vSzeRnkTHY/g5RcidvnpldXGsK053ZtIj6B+dc3kxjxHYzeMSSd2QWyE99rf y6F86ZAZRcRodk9c0XZyxQM6A1tOmQbuCIdVG3tWEf0p9NNAPLE5h/WprSxKS2V/gzNt 4OfqI5+6S/Xk/J3So6dsZngwPeGiPyrRuWmYKMu7Gk8hg5EratIn2Sg9gVwdvK05orMg tPWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=md2bPa9S6bYGI5NsXWeWW1SmfkCfvTUq3qhbcNT+1Ok=; b=suoHRoyAIZYgJ+0HH0qkduJDs0vDICYjmP5jVn2NBwaEYMDuix3qpkTsCdKVlj4+L5 LwvTNDYL64SYqralxipw61IOMs/ZFgJzHSoqlf4eOak+ghUdywpFQW7QUKxxOZ5ypt/D BG2SzPSkdA5qkISHmL1zFL0n584WMkMqdEEJb18CtTyRohS1u148p9cicjzpR4LRfWNf Kmm4kUkJ1laUK2xKIy4wIxKGvISLsg3dEf6QFY+q4YW6NI1rBdLFGw3ll56MNNNDcjvI 5TH6xRqByI4xmJTmFWuJ6TZd0XjEnEMvJNG9d3ibwIZxriRjjDrQCE78mcF7XHSI6rHM 5W9w== X-Gm-Message-State: AIkVDXJlWOyBKhDQoo7BwqARqT0qd6vqpZ7ZP8tQnlexdXef+zOE6hJmOmqOHxto0S5+eYFKyJXZJe4pSQg4SQ== X-Received: by 10.237.42.46 with SMTP id c43mr8916732qtd.174.1482404370411; Thu, 22 Dec 2016 02:59:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.129.214 with HTTP; Thu, 22 Dec 2016 02:59:29 -0800 (PST) From: =?UTF-8?B?0JDQu9C10LrRgdCw0L3QtNGAINCc0LXQvdGM0YjQuNC60L7Qsg==?= Date: Thu, 22 Dec 2016 13:59:29 +0300 Message-ID: Subject: Sort nodes in the ring in order to minimize the number of reconnections To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=001a1142ae92e975aa05443d2994 archived-at: Thu, 22 Dec 2016 10:59:42 -0000 --001a1142ae92e975aa05443d2994 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello everyone, As far as I know nodes are connected in a ring. For example if i have 6 nodes, with names A, B, C, D, E, and F they can connect in ring any possible way: A-B-C-D-E-F-A, or A-F-B-E-C-D-A, etc. And if some node falls out of topology neighboring nodes must reconnect. If nodes A,B and C located in the same physical location, and D, E and F in another, and in some time one physical location is not available in another, we can get different number of reconnections. Best case scenario if we have ring like A-B-CxD-E-FxA ('x' mean disconnect) -- then we get only one reconnect (C reconnect to A or F reconnect to D -- depending on what part of the cluster we leave alive). But now possible that case AxFxBxExCxDxA -- then we get a lot of reconnections (A to B, B to C, C to A -- in general n/2 reconnections, where n -- number of nodes). And i think to add something to ensure that we always have good sorting of nodes connections (A-B-C-...-Z-A). Of course in real world we can have multiple levels of physical closeness. In my opinion enough to add one parameter of 'int' to configuration (with name like 'ExtraNodeOrder') and to change the method of comparison nodes so that it first compared the 'ExtraNodeOrder', and then according to the old criterion (as far as I know Ignite use topology version). So if some users have multiple levels of physical closeness, he can use different bits. For example use 16 high bits for DC number, and low 16 bits for racks. Alternatively, we can add array of =E2=80=98int=E2=80=99 to configuration a= nd compare nodes in sequence from the zero element to the last. --001a1142ae92e975aa05443d2994--