Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!mit-eddie!rutgers!aramis.rutgers.edu!athos.rutgers.edu!hedrick From: hedrick@athos.rutgers.edu (Charles Hedrick) Newsgroups: comp.protocols.tcp-ip Subject: Re: Beginner's info TCP & UDP Message-ID: Date: 17 Jul 90 01:14:17 GMT References: <81247@srcsip.UUCP> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 13 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. The domain system is an example of the first category. You send a one-packet query and get back a one-packet response. If you don't get a response, just try again. NFS is an example of the second category. The folks at Sun apparently believed that they couldn't get good enough performance out of TCP to use it for swapping. In most cases I recommend using TCP. If you use UDP, you end up having to build retransmission algorithms into your application. In most cases you'll get better performance by using TCP, whose algorithms have been well tuned (at least if you are using a recent Berkeley TCP), rather than rolling your own.