Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Glen Turner <glen.turner@itd.adelaide.edu.au>
Subject: Re: keep-alive on tcp/ip-socket connections
Date: 1996/10/22	[thread overview]
Message-ID: <326C1187.446B@itd.adelaide.edu.au> (raw)
In-Reply-To: 54g21p$fum@rit.cs.rit.edu


David P Cutter wrote:
> 
> In article <54fqd5$m4e@news.uni-c.dk>, Ole Joergensen <oj@dk-online.dk> wrote:
> >Does anybody know how to control sending of 'keep-alives' on
> >tcp-connections
> >(OSF/1 - alpha platforms) ?
> >...
> >The question is then: How does one change this? How can you make the
> >probing start as soon
> >as the connection is established?
> >
> Yes!  I've been complaining about this one for a while.  We have to solve
> the same type of problems as described above.
> 
> Most TCP/IP vendors do not allow a programmer to specify a timer value
> for keep-alives.  And on top of that, there is no way to specify a
> different timer per/socket - it's global value based per net interface.
> For that reason most vendors implement these values in the kernel.  On
> Solaris we can use the ndd utility to change these values, on DUnix
> edit /sys/conf/<SYSNODE> and add/change the tcp_keepidle, tcp_keepintvl
> values [...opps, I never did try this on DUnix...].  If the kernel
> config doesn't work, you may have to "adb" the kernel and change the
> values by hand (yuk).

This is because most network programmers, me included, see
keep-alives as something to be discouraged in a global internet.
(Try asking this question in comp.protocols.tcpip and you'll see
what I mean.)

If the user is using the application, there will be traffic enough
to see if the link goes down.  If the user isn't using the application,
than what does it matter if the link goes down and is restored
before the next packet?

At the program level, network problems can't be predicted, so network
programs need to be robust enough to cope with errors at any I/O.
So there is no difference to the programmer if a network error
is delivered instantaneously, or when convenient.  A classic
mistake of C programmers is to write:
   (void)fclose(output_file);
as if no error could occur on closing a file, whereas that is
where most I/O errors are reported, as it forces an end-to-end
write of buffers.

From what I have seen in the past, TCP keep-alives are usually
a substitute for a lack of design for robustness.  This can
be best seen in the SQL stacks of database manufacturers, where
they maintain large amounts of inappropiate state information
on the servers.

Some applications, escpecially authentication protocols, need
keep-alives to log out users of rebooted machines.  However,
this is a matter for the protocol, not for TCP, as these keep-alives
need to be authenticated to prevent session capture.

-- 
glen.turner@itd.adelaide.edu.au     Network Support Specialist
Tel: (08) 8303 3936            Information Technology Division
Fax: (08) 8303 4400             University of Adelaide SA 5005
--
There are two major products that came out of Berkeley:
LSD and UNIX.  This is no coincidence.



  reply	other threads:[~1996-10-22  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-21  4:00 keep-alive on tcp/ip-socket connections Ole Joergensen
1996-10-21  4:00 ` David P Cutter
1996-10-22  4:00   ` Glen Turner [this message]
1996-10-23  4:00   ` Jeffrey Mogul
read-only archive

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