You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Donna Li <do...@utstar.com> on 2011/06/23 03:34:42 UTC

ntp adjust to zookeeper

All:

        Could zookeeper cluster servers work normal after ntp adjust?

 

 

Best Regards

Donna li


Re: ntp adjust to zookeeper

Posted by Ted Dunning <te...@gmail.com>.
You can't know that the connection loss really means that client1 has
crashed or if that just represents a temporary network problem.  With the
timeout, client1 has 2 seconds (or preferably longer) to reconnect.

This is particularly important when you are doing maintenance on the ZK
cluster because you may need to restart each server in the ZK cluster which
obviously will cause a connection loss when the server the client is
connected to is restarted.

2011/6/23 Donna Li <do...@utstar.com>

>
> Hi, ted:
>        Thanks ted!
>        As you said the timeout, I have another question about it. Zookeeper
> has the watch mechanism to notify event. For example, Client1 create an
> ephemera node /zookeeper/node1, client2 set watch to the node
> /zookeeper/node1. As the client1 quit abnormally(means quit without tcp
> close), client2 can not receive the watch event immediately, until the
> timeout happens, so I set the timeout to 2s . I wonder why client2 can not
> receive event immediately, because server can get the event immediately when
> client1's tcp connection broke. Why the feature can not be realized? Always
> applications quit ungracefully.
>
> -----邮件原件-----
> 发件人: Ted Dunning [mailto:ted.dunning@gmail.com]
> 发送时间: 2011年6月24日 0:29
> 收件人: user@zookeeper.apache.org
> 主题: Re: ntp adjust to zookeeper
>
> That is a really fast timeout.  It can be kind of tricky to actually meet
> that requirement on the client side and even if NTP doesn't jump by that
> much, if the client is missing for a big chunk of that time at the same
> time
> a much smaller NTP jump happens, you could be in for trouble.
>
> From the documentation:
>
>
>   -
>
>   settimeofday(2) to step (set) the time. This method is used if the time
>   if off by more than 128ms.
>
> This looks like you could easily see steps > 2s
>
> 2011/6/22 Donna Li <do...@utstar.com>
>
> >
> > my server configuration is as following:
> > tickTime=1000
> > initLimit=5
> > syncLimit=2
> >
> > client api:
> > zookeeper_init(,,recv_timeout=2000,)
> >
> > So client will session expire by 2s if server can not receive the
> > heartbeat. Does the ntp max jump time = 2s?
> >
> >
> > -----邮件原件-----
> > 发件人: Ted Dunning [mailto:ted.dunning@gmail.com]
> > 发送时间: 2011年6月23日 10:12
> > 收件人: user@zookeeper.apache.org
> > 主题: Re: ntp adjust to zookeeper
> >
> > Large time jumps can cause problems because your sessions may expire
> > surprisingly.
> >
> > It is best to keep your servers within a tight tolerance.  Time jumps may
> > occur more seriously if you are using an over-subscribed VM (think small
> > EC2
> > instances).  That can seriously confuse NTP and cause real problems.
> >
> > On Wed, Jun 22, 2011 at 6:34 PM, Donna Li <do...@utstar.com> wrote:
> >
> > > All:
> > >
> > >        Could zookeeper cluster servers work normal after ntp adjust?
> > >
> > >
> > >
> > >
> > >
> > > Best Regards
> > >
> > > Donna li
> > >
> > >
> >
>

ntp adjust to zookeeper

Posted by Donna Li <do...@utstar.com>.
Hi, ted:
	Thanks ted!
	As you said the timeout, I have another question about it. Zookeeper has the watch mechanism to notify event. For example, Client1 create an ephemera node /zookeeper/node1, client2 set watch to the node /zookeeper/node1. As the client1 quit abnormally(means quit without tcp close), client2 can not receive the watch event immediately, until the timeout happens, so I set the timeout to 2s . I wonder why client2 can not receive event immediately, because server can get the event immediately when client1's tcp connection broke. Why the feature can not be realized? Always applications quit ungracefully.

-----邮件原件-----
发件人: Ted Dunning [mailto:ted.dunning@gmail.com] 
发送时间: 2011年6月24日 0:29
收件人: user@zookeeper.apache.org
主题: Re: ntp adjust to zookeeper

That is a really fast timeout.  It can be kind of tricky to actually meet
that requirement on the client side and even if NTP doesn't jump by that
much, if the client is missing for a big chunk of that time at the same time
a much smaller NTP jump happens, you could be in for trouble.

>From the documentation:


   -

   settimeofday(2) to step (set) the time. This method is used if the time
   if off by more than 128ms.

This looks like you could easily see steps > 2s

2011/6/22 Donna Li <do...@utstar.com>

>
> my server configuration is as following:
> tickTime=1000
> initLimit=5
> syncLimit=2
>
> client api:
> zookeeper_init(,,recv_timeout=2000,)
>
> So client will session expire by 2s if server can not receive the
> heartbeat. Does the ntp max jump time = 2s?
>
>
> -----邮件原件-----
> 发件人: Ted Dunning [mailto:ted.dunning@gmail.com]
> 发送时间: 2011年6月23日 10:12
> 收件人: user@zookeeper.apache.org
> 主题: Re: ntp adjust to zookeeper
>
> Large time jumps can cause problems because your sessions may expire
> surprisingly.
>
> It is best to keep your servers within a tight tolerance.  Time jumps may
> occur more seriously if you are using an over-subscribed VM (think small
> EC2
> instances).  That can seriously confuse NTP and cause real problems.
>
> On Wed, Jun 22, 2011 at 6:34 PM, Donna Li <do...@utstar.com> wrote:
>
> > All:
> >
> >        Could zookeeper cluster servers work normal after ntp adjust?
> >
> >
> >
> >
> >
> > Best Regards
> >
> > Donna li
> >
> >
>

Re: ntp adjust to zookeeper

Posted by Ted Dunning <te...@gmail.com>.
That is a really fast timeout.  It can be kind of tricky to actually meet
that requirement on the client side and even if NTP doesn't jump by that
much, if the client is missing for a big chunk of that time at the same time
a much smaller NTP jump happens, you could be in for trouble.

>From the documentation:


   -

   settimeofday(2) to step (set) the time. This method is used if the time
   if off by more than 128ms.

This looks like you could easily see steps > 2s

2011/6/22 Donna Li <do...@utstar.com>

>
> my server configuration is as following:
> tickTime=1000
> initLimit=5
> syncLimit=2
>
> client api:
> zookeeper_init(,,recv_timeout=2000,)
>
> So client will session expire by 2s if server can not receive the
> heartbeat. Does the ntp max jump time = 2s?
>
>
> -----邮件原件-----
> 发件人: Ted Dunning [mailto:ted.dunning@gmail.com]
> 发送时间: 2011年6月23日 10:12
> 收件人: user@zookeeper.apache.org
> 主题: Re: ntp adjust to zookeeper
>
> Large time jumps can cause problems because your sessions may expire
> surprisingly.
>
> It is best to keep your servers within a tight tolerance.  Time jumps may
> occur more seriously if you are using an over-subscribed VM (think small
> EC2
> instances).  That can seriously confuse NTP and cause real problems.
>
> On Wed, Jun 22, 2011 at 6:34 PM, Donna Li <do...@utstar.com> wrote:
>
> > All:
> >
> >        Could zookeeper cluster servers work normal after ntp adjust?
> >
> >
> >
> >
> >
> > Best Regards
> >
> > Donna li
> >
> >
>

ntp adjust to zookeeper

Posted by Donna Li <do...@utstar.com>.
my server configuration is as following:
tickTime=1000
initLimit=5
syncLimit=2

client api:
zookeeper_init(,,recv_timeout=2000,)

So client will session expire by 2s if server can not receive the heartbeat. Does the ntp max jump time = 2s?


-----邮件原件-----
发件人: Ted Dunning [mailto:ted.dunning@gmail.com] 
发送时间: 2011年6月23日 10:12
收件人: user@zookeeper.apache.org
主题: Re: ntp adjust to zookeeper

Large time jumps can cause problems because your sessions may expire
surprisingly.

It is best to keep your servers within a tight tolerance.  Time jumps may
occur more seriously if you are using an over-subscribed VM (think small EC2
instances).  That can seriously confuse NTP and cause real problems.

On Wed, Jun 22, 2011 at 6:34 PM, Donna Li <do...@utstar.com> wrote:

> All:
>
>        Could zookeeper cluster servers work normal after ntp adjust?
>
>
>
>
>
> Best Regards
>
> Donna li
>
>

Re: ntp adjust to zookeeper

Posted by Ted Dunning <te...@gmail.com>.
Large time jumps can cause problems because your sessions may expire
surprisingly.

It is best to keep your servers within a tight tolerance.  Time jumps may
occur more seriously if you are using an over-subscribed VM (think small EC2
instances).  That can seriously confuse NTP and cause real problems.

On Wed, Jun 22, 2011 at 6:34 PM, Donna Li <do...@utstar.com> wrote:

> All:
>
>        Could zookeeper cluster servers work normal after ntp adjust?
>
>
>
>
>
> Best Regards
>
> Donna li
>
>