From user-return-8672-apmail-zookeeper-user-archive=zookeeper.apache.org@zookeeper.apache.org Tue Mar 24 17:39:34 2015 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 50D9A17265 for ; Tue, 24 Mar 2015 17:39:34 +0000 (UTC) Received: (qmail 61192 invoked by uid 500); 24 Mar 2015 17:39:33 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 61144 invoked by uid 500); 24 Mar 2015 17:39:33 -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 61133 invoked by uid 99); 24 Mar 2015 17:39:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2015 17:39:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [209.85.212.170] (HELO mail-wi0-f170.google.com) (209.85.212.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2015 17:39:28 +0000 Received: by wibgn9 with SMTP id gn9so4264837wib.1 for ; Tue, 24 Mar 2015 10:38:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=KZJaKE5JZho/pwYS4JYW4RikBU5c3lYh/0rZYkGwfqo=; b=WVy7z4jZWCxucdTmjNfCdI4PtitLogpoVyqDE932hLhfNFNLWBYS8Qv4zzFO/XS4pC /JZptY7MOb/+cxZ05y8sSjKw9d84FoiHQrph2LW4005Z26k3Cbi8IotqhuDiCuKDGAuc eq/Aa76Y3I1dDFbjKyYwg7QryyyKJ/DqnRmhFLbQhwUxURi72mZ8+Xg8eCo+oyu0m3Kb AxiIJGP2Fx4FO1mrpvg3g4Y7EfE+ePQnv7i9yCTtQ6RTwgwL4SQPtPYvf3hBol0T37oT GIRE/49rJwtCClt4EETvG7IcS7HzulFJkcm4oCvqbJeLtrce/ihzIuwySMWeEmSYd9Yt HZ/A== X-Gm-Message-State: ALoCoQkNVQ+f5RiVaLBtiGonOqTieSommni0HigCJ7NcymVCAp+YKE5ypOp9qOQQn9mYNO0mwkjz MIME-Version: 1.0 X-Received: by 10.194.19.166 with SMTP id g6mr10205686wje.150.1427218726501; Tue, 24 Mar 2015 10:38:46 -0700 (PDT) Received: by 10.180.71.102 with HTTP; Tue, 24 Mar 2015 10:38:46 -0700 (PDT) Date: Tue, 24 Mar 2015 13:38:46 -0400 Message-ID: Subject: Leader Election with multiple elections? From: Ben Hsu To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=047d7b3a8b3435d85d05120c4144 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3a8b3435d85d05120c4144 Content-Type: text/plain; charset=UTF-8 Hello I have a question about leader election. My application has a number of roles (think of them as the same worker, with slightly different configurations) I would like my program to do this: - upon startup, assume the leadership for EITHER role1, or role2, or role3 - if all those leadership roles are taken, become a stand by for any of those roles if their leaders die. This looks like a variation on zookeeper leadership election, except the program is trying to get elected in multiple elections at the same time. Has anyone tried this? We are using Kazoo, the Python client, and would appreciate any sample code using that. --047d7b3a8b3435d85d05120c4144--