public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] Adding a pong message
@ 2012-03-13 18:06 Mike Hearn
  2012-03-13 18:45 ` Luke-Jr
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Hearn @ 2012-03-13 18:06 UTC (permalink / raw)
  To: Bitcoin Dev

https://github.com/bitcoin/bitcoin/pull/932 adds a "pong" message that
echoes back a 64 bit nonce contained in the ping, if the protocol
version is new enough.

The goal of this is to make it easier for clients, especially mobile
clients, to quickly check if a connection is stale, and also to see if
a remote node is overloaded so we can avoid talking to it. A common
case where this happens is if the remote node is itself downloading
the block chain or doing something equally intensive.

Any objections?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] Adding a pong message
  2012-03-13 18:06 [Bitcoin-development] Adding a pong message Mike Hearn
@ 2012-03-13 18:45 ` Luke-Jr
  2012-03-13 19:48   ` Matt Corallo
  2012-03-13 22:29   ` Mike Hearn
  0 siblings, 2 replies; 4+ messages in thread
From: Luke-Jr @ 2012-03-13 18:45 UTC (permalink / raw)
  To: bitcoin-development

On Tuesday, March 13, 2012 2:06:38 PM Mike Hearn wrote:
> https://github.com/bitcoin/bitcoin/pull/932 adds a "pong" message that
> echoes back a 64 bit nonce contained in the ping, if the protocol
> version is new enough.
> 
> The goal of this is to make it easier for clients, especially mobile
> clients, to quickly check if a connection is stale, and also to see if
> a remote node is overloaded so we can avoid talking to it. A common
> case where this happens is if the remote node is itself downloading
> the block chain or doing something equally intensive.
> 
> Any objections?

Not really an objection per se, but what's wrong with TCP keepalives?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] Adding a pong message
  2012-03-13 18:45 ` Luke-Jr
@ 2012-03-13 19:48   ` Matt Corallo
  2012-03-13 22:29   ` Mike Hearn
  1 sibling, 0 replies; 4+ messages in thread
From: Matt Corallo @ 2012-03-13 19:48 UTC (permalink / raw)
  To: bitcoin-development

On Tue, 2012-03-13 at 14:45 -0400, Luke-Jr wrote:
> On Tuesday, March 13, 2012 2:06:38 PM Mike Hearn wrote:
> > https://github.com/bitcoin/bitcoin/pull/932 adds a "pong" message that
> > echoes back a 64 bit nonce contained in the ping, if the protocol
> > version is new enough.
> > 
> > The goal of this is to make it easier for clients, especially mobile
> > clients, to quickly check if a connection is stale, and also to see if
> > a remote node is overloaded so we can avoid talking to it. A common
> > case where this happens is if the remote node is itself downloading
> > the block chain or doing something equally intensive.
> > 
> > Any objections?
> 
> Not really an objection per se, but what's wrong with TCP keepalives?
> 
It wont tell you if the node itself is overloaded (not just the OS'
network stack).

Looks good to me.

Matt




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] Adding a pong message
  2012-03-13 18:45 ` Luke-Jr
  2012-03-13 19:48   ` Matt Corallo
@ 2012-03-13 22:29   ` Mike Hearn
  1 sibling, 0 replies; 4+ messages in thread
From: Mike Hearn @ 2012-03-13 22:29 UTC (permalink / raw)
  To: Luke-Jr; +Cc: bitcoin-development

TCP keep-alives aren't reliably implemented.

I've got reports that sometimes we struggle to keep connection to the
network on mobile, eg, because we roam into an area with poor
connectivity but not poor enough for the network stack to drop access
entirely. Being able to quickly check if the connection is really
there with some kind of bounded, app layer deadline is probably useful
and besides, it's cheap.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-13 22:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-13 18:06 [Bitcoin-development] Adding a pong message Mike Hearn
2012-03-13 18:45 ` Luke-Jr
2012-03-13 19:48   ` Matt Corallo
2012-03-13 22:29   ` Mike Hearn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox