You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by Mohammad arshad <mo...@huawei.com> on 2016/10/03 09:11:35 UTC

ZooKeeper ping requests Unnecessarily go though request processor chain

Hi All
ZooKeeper clients send ping request(heartbeat) to ZooKeeper server to keep its session alive. These ping requests do nothing but touch its session on the server.

If client is connected to a follower then the ping request is processed in sequence of ServerCnxn --> ZooKeeperServer --> FollowerRequestProcessor --> CommitProcessor --> FinalRequestProcessor. The ping request will wait in CommitProcessor for previous request completion. This wait for ping request is unnecessary. I think it offers no benefit.

is ping request doing more than touching its session? I think it is only touching its session, not doing anything else.
If this is the case we should process the ping request differently from the other requests. It should be  treated as system request and should be processed with higher priority. May be we can process in the sequence of ServerCnxn --> ZooKeeperServer --> PingRequestProcessor

Any thought?

Thanks
-Arshad


RE: ZooKeeper ping requests Unnecessarily go though request processor chain

Posted by Mohammad arshad <mo...@huawei.com>.
Thanks Vitalii, Benjamin Reed for the response
Makes sense to me. Got it, ping request is used not only for keeping the session alive but also for testing the request processing flow. Therefore the current processing flow for the ping is required.

Just for Information:
>> I am not sure why do you want to skip testing part of the flow? Does it incur high load?
In a performance test, I observed that when ZooKeeper servers are under high load, clients throw ConnectionLossException. Client log indicates that ping request is not processed in 2/3 of the session time out and causing the client time out. For detail please refer ZOOKEEPER-2570

Thanks
-Arshad
-----Original Message-----
From: Benjamin Reed [mailto:breed@apache.org] 
Sent: 04 October 2016 10:23
To: DevZooKeeper
Subject: Re: ZooKeeper ping requests Unnecessarily go though request processor chain

yes, vitalii is correct. the ping is a mutual test of health, so we want it to go through the full pipeline.

On Mon, Oct 3, 2016 at 5:26 AM, Vitalii Tymchyshyn <vi...@tym.im> wrote:

> Hi.
>
> I think this would break ordering guarantie, would not it?
> Also ping is supposed to test health and I am not sure why do you want 
> to skip testing part of the flow? Does it incur high load?
> What would happen if disk would stall for a minute?
>
> Best regards, Vitalii Tymchyshyn
>
> Пн, 3 жовт. 2016 05:11 користувач Mohammad arshad < 
> mohammad.arshad@huawei.com> пише:
>
> > Hi All
> > ZooKeeper clients send ping request(heartbeat) to ZooKeeper server 
> > to
> keep
> > its session alive. These ping requests do nothing but touch its 
> > session
> on
> > the server.
> >
> > If client is connected to a follower then the ping request is 
> > processed
> in
> > sequence of ServerCnxn --> ZooKeeperServer --> 
> > FollowerRequestProcessor
> -->
> > CommitProcessor --> FinalRequestProcessor. The ping request will 
> > wait in CommitProcessor for previous request completion. This wait 
> > for ping
> request
> > is unnecessary. I think it offers no benefit.
> >
> > is ping request doing more than touching its session? I think it is 
> > only touching its session, not doing anything else.
> > If this is the case we should process the ping request differently 
> > from the other requests. It should be  treated as system request and 
> > should be processed with higher priority. May be we can process in 
> > the sequence of ServerCnxn --> ZooKeeperServer --> 
> > PingRequestProcessor
> >
> > Any thought?
> >
> > Thanks
> > -Arshad
> >
> >
>

Re: ZooKeeper ping requests Unnecessarily go though request processor chain

Posted by Benjamin Reed <br...@apache.org>.
yes, vitalii is correct. the ping is a mutual test of health, so we want it
to go through the full pipeline.

On Mon, Oct 3, 2016 at 5:26 AM, Vitalii Tymchyshyn <vi...@tym.im> wrote:

> Hi.
>
> I think this would break ordering guarantie, would not it?
> Also ping is supposed to test health and I am not sure why do you want to
> skip testing part of the flow? Does it incur high load?
> What would happen if disk would stall for a minute?
>
> Best regards, Vitalii Tymchyshyn
>
> Пн, 3 жовт. 2016 05:11 користувач Mohammad arshad <
> mohammad.arshad@huawei.com> пише:
>
> > Hi All
> > ZooKeeper clients send ping request(heartbeat) to ZooKeeper server to
> keep
> > its session alive. These ping requests do nothing but touch its session
> on
> > the server.
> >
> > If client is connected to a follower then the ping request is processed
> in
> > sequence of ServerCnxn --> ZooKeeperServer --> FollowerRequestProcessor
> -->
> > CommitProcessor --> FinalRequestProcessor. The ping request will wait in
> > CommitProcessor for previous request completion. This wait for ping
> request
> > is unnecessary. I think it offers no benefit.
> >
> > is ping request doing more than touching its session? I think it is only
> > touching its session, not doing anything else.
> > If this is the case we should process the ping request differently from
> > the other requests. It should be  treated as system request and should be
> > processed with higher priority. May be we can process in the sequence of
> > ServerCnxn --> ZooKeeperServer --> PingRequestProcessor
> >
> > Any thought?
> >
> > Thanks
> > -Arshad
> >
> >
>

Re: ZooKeeper ping requests Unnecessarily go though request processor chain

Posted by Vitalii Tymchyshyn <vi...@tym.im>.
Hi.

I think this would break ordering guarantie, would not it?
Also ping is supposed to test health and I am not sure why do you want to
skip testing part of the flow? Does it incur high load?
What would happen if disk would stall for a minute?

Best regards, Vitalii Tymchyshyn

Пн, 3 жовт. 2016 05:11 користувач Mohammad arshad <
mohammad.arshad@huawei.com> пише:

> Hi All
> ZooKeeper clients send ping request(heartbeat) to ZooKeeper server to keep
> its session alive. These ping requests do nothing but touch its session on
> the server.
>
> If client is connected to a follower then the ping request is processed in
> sequence of ServerCnxn --> ZooKeeperServer --> FollowerRequestProcessor -->
> CommitProcessor --> FinalRequestProcessor. The ping request will wait in
> CommitProcessor for previous request completion. This wait for ping request
> is unnecessary. I think it offers no benefit.
>
> is ping request doing more than touching its session? I think it is only
> touching its session, not doing anything else.
> If this is the case we should process the ping request differently from
> the other requests. It should be  treated as system request and should be
> processed with higher priority. May be we can process in the sequence of
> ServerCnxn --> ZooKeeperServer --> PingRequestProcessor
>
> Any thought?
>
> Thanks
> -Arshad
>
>

Re: ZooKeeper ping requests Unnecessarily go though request processor chain

Posted by Vitalii Tymchyshyn <vi...@tym.im>.
Hi.

I think this would break ordering guarantie, would not it?
Also ping is supposed to test health and I am not sure why do you want to
skip testing part of the flow? Does it incur high load?
What would happen if disk would stall for a minute?

Best regards, Vitalii Tymchyshyn

Пн, 3 жовт. 2016 05:11 користувач Mohammad arshad <
mohammad.arshad@huawei.com> пише:

> Hi All
> ZooKeeper clients send ping request(heartbeat) to ZooKeeper server to keep
> its session alive. These ping requests do nothing but touch its session on
> the server.
>
> If client is connected to a follower then the ping request is processed in
> sequence of ServerCnxn --> ZooKeeperServer --> FollowerRequestProcessor -->
> CommitProcessor --> FinalRequestProcessor. The ping request will wait in
> CommitProcessor for previous request completion. This wait for ping request
> is unnecessary. I think it offers no benefit.
>
> is ping request doing more than touching its session? I think it is only
> touching its session, not doing anything else.
> If this is the case we should process the ping request differently from
> the other requests. It should be  treated as system request and should be
> processed with higher priority. May be we can process in the sequence of
> ServerCnxn --> ZooKeeperServer --> PingRequestProcessor
>
> Any thought?
>
> Thanks
> -Arshad
>
>