Return-Path: X-Original-To: apmail-kafka-users-archive@www.apache.org Delivered-To: apmail-kafka-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DEFEDCCE6 for ; Sat, 29 Jun 2013 17:47:43 +0000 (UTC) Received: (qmail 97366 invoked by uid 500); 29 Jun 2013 17:47:43 -0000 Delivered-To: apmail-kafka-users-archive@kafka.apache.org Received: (qmail 97089 invoked by uid 500); 29 Jun 2013 17:47:43 -0000 Mailing-List: contact users-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@kafka.apache.org Delivered-To: mailing list users@kafka.apache.org Received: (qmail 97074 invoked by uid 99); 29 Jun 2013 17:47:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Jun 2013 17:47:41 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of libo.yu@citi.com designates 67.231.145.106 as permitted sender) Received: from [67.231.145.106] (HELO mx0a-00123c01.pphosted.com) (67.231.145.106) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Jun 2013 17:47:34 +0000 Received: from pps.filterd (m0008097 [127.0.0.1]) by mx0a-00123c02.pphosted.com (8.14.5/8.14.5) with SMTP id r5THiYQr029707 for ; Sat, 29 Jun 2013 17:47:13 GMT Received: from mail.citigroup.com ([192.193.158.17]) by mx0a-00123c02.pphosted.com with ESMTP id 1d0kwb4pma-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Sat, 29 Jun 2013 17:47:13 +0000 Received: from imbhub-mw01.nam.nsroot.net (namdlpdimpsw07.nam.nsroot.net [153.40.172.113]) by smtpinbound.citigroup.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r5THkis7022175 for ; Sat, 29 Jun 2013 17:47:12 GMT Received: from exlnjiht02.lac.nsroot.net (EXLNJIHT02.lac.nsroot.net [150.110.183.30]) by imbhub-mw01.nam.nsroot.net (Switch-3.4.1/Switch-3.4.1) with ESMTP id r5THlA56002098 for ; Sat, 29 Jun 2013 17:47:10 GMT Received: from EXNJIHT05.nam.nsroot.net (150.110.191.40) by exlnjiht02.lac.nsroot.net (150.110.183.30) with Microsoft SMTP Server (TLS) id 8.3.264.0; Sat, 29 Jun 2013 13:47:10 -0400 Received: from EXTXHT05.nam.nsroot.net (169.177.87.17) by EXNJIHT05.nam.nsroot.net (150.110.191.40) with Microsoft SMTP Server (TLS) id 14.2.328.9; Sat, 29 Jun 2013 13:47:09 -0400 Received: from EXTXMB19.nam.nsroot.net ([169.254.4.51]) by EXTXHT05.nam.nsroot.net ([169.177.87.17]) with mapi id 14.02.0328.009; Sat, 29 Jun 2013 12:47:08 -0500 From: "Yu, Libo " To: "'users@kafka.apache.org'" Subject: RE: how brokers sync with each other Thread-Topic: how brokers sync with each other Thread-Index: AQHOdGSG2gjoQKK/SPaPxe0B2iiC9plM96Yw Date: Sat, 29 Jun 2013 17:47:08 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [169.177.87.240] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-WiganSS: 01000000010018EXNJIHT05.nam.nsroot.net ID0042 X-CFilter-Loop: Reflected X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794,1.0.431,0.0.0000 definitions=2013-06-29_04:2013-06-28,2013-06-29,1970-01-01 signatures=0 X-Virus-Checked: Checked by ClamAV on apache.org Thanks for your answer, Joel. What parameters can I tune in this case to in= crease the lag? By default, under what kind of scenario will a replica it fall out of the "= in-sync-replica" Set? Regards, Libo -----Original Message----- From: Joel Koshy [mailto:jjkoshy.w@gmail.com]=20 Sent: Friday, June 28, 2013 9:04 PM To: users@kafka.apache.org Subject: Re: how brokers sync with each other I'm assuming this is somewhat related to your previous question on cross-DC= replication. This is not an ideal set up as mentioned there. If the replica lags then it will fall out of the "in-sync-replica" set. You could tune parameters that effectively allow a high (but bounded o= ver time) lag between the replica and the leader. There is no buffer per se= - the replicas just keep fetching from the leader (which would have append= ed the messages to its log). If your producer has acks set to -1 (which means wait until all replicas in= ISR have received the message) it would slow down your producer considerab= ly. (You could use acks =3D 1 in that case though but with weaker guarantee= s - i.e., your message could be lost in failure scenarios). Joel On Fri, Jun 28, 2013 at 5:41 PM, Yu, Libo wrote: > Hi, > > Assume A and B are two brokers in a kafka server. And there is long=20 > network Latency between A and B. For a partition with two=20 > replications, one replication Is assigned to A and the other is=20 > assigned to B. Number of acknowledge is set to one. Assume the partition = is handled by broker A. > > After a message is accepted and saved by A, ack will be sent and the=20 > message will be sent to broker B at the same time. But due to long=20 > network latency between A and B, it is possible that B lags behind A.=20 > In this case, is there a buffer on broker A that holds all messages to=20 > be written to B? Is there any limit on the lag between A and B? > > Compare with the case when there is no network latency between A and=20 > B, any difference in publishing speed? > > Thanks > > Libo >