You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Vishal K <vi...@gmail.com> on 2010/07/17 03:28:38 UTC
cleanup ZK takes 40-60 seconds
Hi,
We have embedded ZK server in our application. We start a thread in our
application and call QuorumPeerMain.InitializeArgs().
When cleaning-up ZK we call QuorumPeerMain.shutdown() and wait for the
thread that is calling InitializeArgs() to finish. These two steps are
taking around 60 seconds. I could probably not wait for InitializeArgs() to
finish and that might speed up things.
However, I am not sure why the cleanup should take such a long time. Can
anyone comment on this?
Thanks.
-Vishal
Re: cleanup ZK takes 40-60 seconds
Posted by Ted Dunning <te...@gmail.com>.
I can't comment on the cleanup time, but I can suggest that it is normally
not a very good idea to embed Zookeeper in your application. If your
application really is distributed, then having ZK survive the demise of any
particular instance is a really nice thing. If ZK goes away with your
application then you lose a lot of the power of having a reliable and
independent coordination service.
I have, as they say, been there and done that. It was not a happy
experience.
You know what you are doing much more than I possibly could, so embedding ZK
might actually make sense. I really don't think so, though.
On Fri, Jul 16, 2010 at 6:28 PM, Vishal K <vi...@gmail.com> wrote:
> However, I am not sure why the cleanup should take such a long time. Can
> anyone comment on this?
>