From user-return-11751-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Wed Oct 24 16:41:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 47D8D180638 for ; Wed, 24 Oct 2018 16:41:05 +0200 (CEST) Received: (qmail 85536 invoked by uid 500); 24 Oct 2018 14:41:04 -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 85525 invoked by uid 99); 24 Oct 2018 14:41:03 -0000 Received: from mail-relay.apache.org (HELO mailrelay2-lw-us.apache.org) (207.244.88.137) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2018 14:41:03 +0000 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mailrelay2-lw-us.apache.org (ASF Mail Server at mailrelay2-lw-us.apache.org) with ESMTPSA id F20F5A75 for ; Wed, 24 Oct 2018 14:41:02 +0000 (UTC) Received: by mail-wm1-f52.google.com with SMTP id f8-v6so3289718wmc.3 for ; Wed, 24 Oct 2018 07:41:02 -0700 (PDT) X-Gm-Message-State: AGRZ1gIxInr/vOnSD0xPKoHOMrUMg1PoB/FKYW/1SZuYDkfkDfm5QIqM Ape/wGUr4pWBj3+erj308Yxrd1MTHpRNltaHc2c= X-Google-Smtp-Source: AJdET5fBfHDF6xNTJP+tMGsr7FIeBkN/CSRXekP+52mZJLV7+M7l03ijprFFsbZ57TZ6LZEAkXFjKgwPLx784SvGrIU= X-Received: by 2002:a1c:1fcd:: with SMTP id f196-v6mr3001091wmf.19.1540392061867; Wed, 24 Oct 2018 07:41:01 -0700 (PDT) MIME-Version: 1.0 References: <37A079CC-64C1-4746-88D1-10EF30A13266@apache.org> In-Reply-To: From: Patrick Hunt Date: Wed, 24 Oct 2018 07:40:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Help Wanted] Will zookeeper merge change events? To: UserZooKeeper Content-Type: multipart/alternative; boundary="000000000000a9a5670578fa797c" --000000000000a9a5670578fa797c Content-Type: text/plain; charset="UTF-8" Nothing says that you have to handle client side notifications one-by-one, blocking the ZK client notification thread. You can do the aggregation yourself if you like, and this can be done very quickly. You can have separate threads to process the results (separate from the ZK client notification thread). That aspect of the architecture is up to you. This is some time back, but at the time I was processing 50 thousand watches in a similar situation - trigger/herd. https://wiki.apache.org/hadoop/ZooKeeper/ServiceLatencyOverview Regards, Patrick On Tue, Oct 23, 2018 at 3:25 PM Michael Han wrote: > Hi Jun, > > >> will it only notify the client of the 100th event or all events from 2 - > 100 will be notified? > > All events will be notified. Each watched event will be materialized as a > server side response and on client side, each watched event will be > processed individually. > > Depend on how your set watches and the scale of watch (e.g. a single client > watch a million znode, or a million clients watch a single znode, or a mix > of both), there could be thundering herd effects if multiple watches are > triggered. > > > On Tue, Oct 23, 2018 at 4:40 AM Jun Liu wrote: > > > Hi, > > > > Our project, Dubbo[1], an RPC framework, has using Zookeeper as the > > service discovery and config centre for a long time. Recently, we > received > > performance reports from users when a batch of service instances restart > at > > the same time. One thing I can figure out is that the change of one > > instance status will trigger one change event to the Registry Centre - > > Zookeeper, so, 100 instances will trigger 100 change events at the same > > time. > > > > AFAIK, Zookeeper client uses a single thread to handle all these events > > one by one, if that is the case, will zookeeper merge the following > events > > and only notify once? For example, if the Zookeeper client is handling > the > > 1st event, the rest 2-100 events are created, when the 1st event is > > finished, will it only notify the client of the 100th event or all events > > from 2 - 100 will be notified? > > > > 1. https://github.com/apache/incubator-dubbo > > > > Best regards, > > Jun from Apache Dubbo (Incubating) > > > > > --000000000000a9a5670578fa797c--