[Standards-JIG] Re: Council decision on "Stanza Acking" proposal

Stephen Marquard scm at marquard.net
Sat Mar 26 17:33:11 UTC 2005

Ralph Meijer wrote:
> On Sat, Mar 26, 2005 at 02:19:50PM +1100, Trejkaz wrote:
>>On Sat, 26 Mar 2005 09:14, Tijl Houtbeckers wrote:
>>>Another "trick" is sending those ping "whitespaces". This is of course not
>>>official protocol either and it has it's own set of problems (eg. how do
>>>you know wether a space is a "ping" or a "pong"?). 
>>In a way it's worse than that.  If a client receives a space, it is under no 
>>obligation whatsoever to reply to it.  The parser is in fact supposed to 
>>ignore it.  So all spaces are pings. :-)
> If I understood correctly, sending spaces is to 'wake up' the TCP connection.
> If the connection went down without you knowing, if you try to send space
> (which then fails) will let the application know that the TCP connection
> has indeed died. If you don't send these spaces every now and then, the
> connection just appears to be up until the usual TCP timeout, which can
> be minutes.

It's a bit worse than "minutes".

If TCP keepalives are not enabled, then the connection can stay open 
indefinitely as long as no data is sent across it.

If TCP keepalives are enabled, then it could take up to 2 hours for the 
connection to timeout.

If application (currently whitespace in jabber) keepalives are enabled 
(say every minute), then the connection will timeout after the standard 
TCP timeout window, about 5 minutes by default.

Sure, it's possible to adjust the TCP defaults, but there are probably 
many other reasons not to change the defaults on servers not dedicated 
to jabber.

You can lose a lot of messages in 5 minutes until the server decides 
you're no longer around and starts queueing them offline.


More information about the Standards mailing list