Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!abvax!icd.ab.com!ejp From: ejp@icd.ab.com (Ed Prochak) Newsgroups: comp.protocols.tcp-ip Subject: Re: Beginner's info TCP & UDP Message-ID: <1533@abvax.UUCP> Date: 19 Jul 90 18:59:22 GMT References: <81247@srcsip.UUCP> <64291@sgi.sgi.com> Sender: news@abvax.UUCP Reply-To: ejp@icd.ab.com (Ed Prochak) Organization: Allen-Bradley Company, Industrial Computer Division Lines: 49 In article <64291@sgi.sgi.com>, rpw3@rigden.wpd.sgi.com (Rob Warnock) writes: > In answering a beginner's question, hedrick@athos.rutgers.edu > (Charles Hedrick) writes: > +--------------- > | People tend to use UDP where (1) they plan to be making isolated > | queries, such that the overhead packets used to set up and close a > | connection would form most of the traffic (2) they need more > | performance than they think they can get from TCP.... > +--------------- > > I would add: > ...(3) there are a very large number of clients accessing a single > server, such that the cost of holding a connection open for each > active client would be excessive. [The definition of "excessive" > is system- and application-dependent.] > > In some sense this is the same as Hedrick's #1, except that #1 refers > to conserving dynamic network bandwidth, and #3 to conserving quasi- > static server system resources "wired-down" by connections (sockets, > open-file slots, processes, etc.). I think Rob's condition is important in some cases. (at least that and the following was the justification I used for an application using UDP). In addition: ...(4) preservation of record boundaries. TCP provides the data to the reciever as it is available. This means messages may be fragmented and it is up to the application to parse out record boundaries. There are some applications that prefer to receive messages intact, making UDP the protocol of choice, in this case. As usual, the case is one of no single right answer. It all depends on the situation. (I hope someone summaries this thread.) ed Edward J. Prochak Voice: work-(216)646-4663 home-(216)349-1821 Email: {cwjcc,pyramid,decvax,uunet}!ejp@icd.ab.com USmail: Allen-Bradley, 747 Alpha Drive, Highland Heights,OH 44143 As defined by a civil engineer named Wellington, ENGINEERING is "the ability to do for one dollar, what any damn fool can do for two."