[JDEV] Keep-Alives
Matthias Wimmer
m at tthias.net
Fri Jul 5 03:16:49 CDT 2002
Hi David!
David Waite wrote:
> There is no standard way of manipulating keepalives. There is no
> standard set of system calls to configure keepalives. Keepalives may
> not be configurable per socket (they might be a machine-wide
> configurable, affecting all other services running on that machine) or
> configurable at all.
That's right, I can't configure the intervals per socket ... but I can
turn them on and off per socket. It's also right that there is no
standard way to manipulate keep-alives, but this hasn't been done by the
server. The server just enables keep-alives on the sockets and the
server administrator configures the intervals by the way it is thought
to be done on his machine, e.g. with a call to sysctl or by manipulating
the files in the proc filesystem.
But what is with OOB, the other proposed way to detect broken
connections: It is by far more OS dependand how to implement it (e.g. on
Unix you have to write signal handlers) and it has some sort of time out
too (the depends on how often we have to send the OOB packets). The
difference is not the length of the time out we have to detect the
broken connection, the difference is: how hard is it to implement it?
how compatible is it? and do we have to change the client too?
And yes, we're affacting other services too: But only the services that
use keep-alives too. And we can configure them at the shortest interval
of all the minimum intervals that are required by the services.
> Also, keep in mind that the worst case timeout due to a keepalive is
> going to be around ten minutes, even if the keepalive interval is
> reduced down to one minute. This means someone who unplugs their modem
> may still take 10 minutes to timeout, and that any messages sent to
> them during this period will still be lost.
This can be configured: E.g. with an inactivity timer of 60 seconds, a
keep-alive interval of 10 seconds and 4 probes it would be detected
after two minutes.
As Dave wrote: This isn't a solution for guaranteed delivery (we can use
something based on JEP-0022-<delivered/>-events for that). This is just
a way to detect broken connections, at present if a TCP/IP link is not
closed properly (e.g. just cut the network connection) the server can't
detect this and the user can have an available presence for hours. Also
it fixes problems with NAT routers.
Tot kijk
Matthias
--
Fon: +49-700 77007770 http://matthias-wimmer.de/
Fax: +49-89 312 88654 jabber://mawis@charente.de
More information about the JDev
mailing list