Return-Path: X-Original-To: apmail-incubator-kafka-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-kafka-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7BBF29FFD for ; Mon, 17 Oct 2011 16:21:31 +0000 (UTC) Received: (qmail 43772 invoked by uid 500); 17 Oct 2011 16:21:31 -0000 Delivered-To: apmail-incubator-kafka-users-archive@incubator.apache.org Received: (qmail 43754 invoked by uid 500); 17 Oct 2011 16:21:31 -0000 Mailing-List: contact kafka-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: kafka-users@incubator.apache.org Delivered-To: mailing list kafka-users@incubator.apache.org Received: (qmail 43745 invoked by uid 99); 17 Oct 2011 16:21:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 16:21:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of neha.narkhede@gmail.com designates 209.85.220.175 as permitted sender) Received: from [209.85.220.175] (HELO mail-vx0-f175.google.com) (209.85.220.175) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 16:21:24 +0000 Received: by vcbf1 with SMTP id f1so2832659vcb.6 for ; Mon, 17 Oct 2011 09:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=Wi+BUc71mXhge55kuKaJW78rcLSzEw0spl5dfRe/vCs=; b=UyeFKyZMr8hu0a/NtpjgQdxE/+vs+BH/XJEbCzmZesVrjeXeGEB+TB5XEJO4prAS5X H+YhnV3oIvCpY+ummXoU57W7YUazqEnuEZnKWBYv/8Zv+EY7AFs6yWIvl5e2uehaew84 5Kjr1KCVcfT8DiTTsXh4dxzQKse35UwS2Oow4= MIME-Version: 1.0 Received: by 10.52.77.69 with SMTP id q5mr21631178vdw.11.1318868463827; Mon, 17 Oct 2011 09:21:03 -0700 (PDT) Received: by 10.220.156.11 with HTTP; Mon, 17 Oct 2011 09:21:03 -0700 (PDT) In-Reply-To: References: Date: Mon, 17 Oct 2011 09:21:03 -0700 Message-ID: Subject: Re: Adding a new broker behavior From: Neha Narkhede To: kafka-users@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Inder, >From the producer side,VIP and the ZK Producer are mutually exclusive optio= ns. You use either one or the other. > 1. When a new broker comes in in the cluster, it would register in broker > registry but won't be subscribed to any topics. If you are using a VIP, then it will route some of the new requests to the = new broker automatically. If you are using the ZK Producer, it will get notified once the new broker registers itself in ZK, and it will start routing new requests to the broker according to the partitioner you use (Default is random partitioning, which is similar to VIP behavior) > 3. If we are using a VIP to front brokers, how do they get all the > information from ZK about what topics/partitions should go to which broke= r > for appropriate routing. As I said, if you are using VIP, then brokers are not "discovered" through ZK watchers. The VIP should have a TCP healthcheck on the Kafka port, and all brokers that have Kafka running on that port, will be involved in receiving Kafka data. The VIP randomly distributes produce requests amongst the live brokers. Thanks, Neha On Mon, Oct 17, 2011 at 9:01 AM, Inder Pall wrote: > Jun, > > appreciate your prompt response. > > need some more inputs in understanding this better. > Is the following understanding appropriate. > > 1. When a new broker comes in in the cluster, it would register in broker > registry but won't be subscribed to any topics. > 2. re-balance triggered by consumers will get some partitions of existing > topics to this broker. > 3. If we are using a VIP to front brokers, how do they get all the > information from ZK about what topics/partitions should go to which broke= r > for appropriate routing. > > Thanks, > - Inder > Yahoo India R&D. > > On Mon, Oct 17, 2011 at 8:21 PM, Jun Rao wrote: > >> Inder, >> >> 1. Existing data doesn't get moved to the new broker. Some of the new da= ta >> will get routed to the new broker once the producer recognizes the new >> broker (either through ZK-based producer or vip). >> >> 2. Yes. Once the new broker gets data for a new topic, consumers will be >> notified and start rebalance. >> >> Thanks, >> >> Jun >> >> On Sun, Oct 16, 2011 at 10:29 PM, Inder Pall wrot= e: >> >> > Hi, >> > >> > I am trying to understand kafka by going through documents/wiki's for >> > usage. >> > Please pardon if the dev mailing list isn't appropriate to be in the T= O >> > =A0for >> > this query. >> > >> > Couple of queries. >> > >> > 1. If you =A0add new broker boxes, how will existing topics and their >> > partitions be redistributed on the new broker. >> > 2. Does [1] trigger a re-balance process via watchers in which case if >> you >> > wanna redistribute only certain event types on the new broker, can it = be >> > achieved dynamically. >> > >> > >> > -- Inder >> > >> > > > > -- > -- Inder >