All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Sage Weil <sage@newdream.net>
Cc: hail-devel@vger.kernel.org, Pete Zaitcev <zaitcev@redhat.com>
Subject: CLD ping/response algorithm
Date: Fri, 31 Jul 2009 17:55:20 -0400	[thread overview]
Message-ID: <4A736848.20201@garzik.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0907311359230.14759@cobra.newdream.net>

Sage Weil wrote:
> One question about the choice of UDP.  I'm not sure how closely you're 
> following the chubby design.. but if it's a similar liveness/notification 
> model, the server is delaying keepalive rpc responses and piggybacking 
> notification of updates.  If the replies are lossy, are you just planning 
> on a conservative client timeout/retry, and keeping the normal keepalive 
> round trip a healthy factor shorter than the client lease length?  
> Shorter timeouts mean higher server load (more frequent keepalives)... and 
> longer timeouts mean frequent stalls on writes when doing the cache 
> invalidation if there is any packet loss on the network...

In general, I'm not trying to closely follow the Chubby paper.

I was mainly inspired by it's general design -- that of a filesystem.

But several implementation choices described by Google make a lot of 
technical sense for CLD, so you see a lot of commonality.


At present, the algorithm is as follows:

	* for all client events, send immediately
	* if we haven't heard from the client in LEASE TIME / 2,
	  ping them

However, once we have sent _any_ packet to the client, be it a response, 
asynchronous event or ping, we wait for a client acknowledgement.

If we do not receive an ack after CLD_RETRY_START (2) seconds, we
	- resend packet
	- set next-retry timer *= 2

So, retry #2 from server->client comes 4 seconds after retry #1.
Retry #3 comes 8 seconds after retry #2.

And so on, until the client lease expires.

That is definitely different from Chubby.

Is it wise?  Unknown.  This was a design chosen for simplicity, and may 
need to be revisited once caching (and strict cache coherence) is 
implemented in the client and server.

Comments and criticism (and patches!) welcome.  The CLD network protocol 
is not yet "solid" in my opinion.  Ignoring the lack of caching, master 
fail-over, large messages and sequence ids also need additional attention.

	Jeff




  reply	other threads:[~2009-07-31 21:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31 10:40 [PATCH v1] CLD replication (WIP) Jeff Garzik
2009-07-31 18:14 ` Sage Weil
2009-07-31 18:38   ` Jeff Garzik
2009-07-31 18:52     ` Jeff Garzik
2009-07-31 19:44     ` Sage Weil
2009-07-31 20:41       ` CLD future plans (was Re: [PATCH v1] CLD replication (WIP)) Jeff Garzik
2009-07-31 21:26         ` Sage Weil
2009-07-31 21:55           ` Jeff Garzik [this message]
2009-08-10 18:24 ` [PATCH v3] CLD replication (WIP) Jeff Garzik
2009-08-11 23:56   ` Pete Zaitcev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A736848.20201@garzik.org \
    --to=jeff@garzik.org \
    --cc=hail-devel@vger.kernel.org \
    --cc=sage@newdream.net \
    --cc=zaitcev@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.