[ejabberd] s2s and c2s ping/keep-alive and "proper" shutdown

Sergei Golovan sgolovan at nes.ru
Tue Oct 10 08:17:31 MSD 2006

On 10/10/06, Bruce Fitzsimons <Bruce at fitzsimons.org> wrote:
> Peoples,

> I see that some servers sent empty (1 whitespace) packets to force tcp
> connections to either stay open (ack) or die (no ack after re-xmits).
> Also helpful for keeping firewalls alive I guess, but the client can
> manage that. I think I'd do that for any connection that hadn't had
> traffic in <config> seconds.

Sending whitespaces doesn't help much to keep tracking over the TCP
connection. You still rely on TCP timeouts which are quite long
(though not 2 hours as with default keep-alive mechanism).

The only (AFAIK) way to ensure that connection is alive is to send
some packet for which client issue a reply. XMPP doesn't define this
acknowledgment protocol, but it would be much better from the
reliability point of view if all packets were acknowledged in some

Sergei Golovan

More information about the ejabberd mailing list