next up previous contents
Next: Final Choice of Algorithm Up: Algorithms Previous: Concurrent & Iterative Servers   Contents


UDP & TCP

On a TCP/IP network, both TCP and UDP protocols can be used, on top of IP, for client-server communication. TCP forms a reliable connection between client and server, over which data may be sent without concern that it may be lost or arrive out of sequence. UDP, on the other hand, provides no such connection, sending datagrams across the network with no guarantee of their arrival. Whilst the advantage of TCP is obvious, there can also be benefits to UDP. If only small amounts of data need to be sent in a connection, then the time spent establishing a TCP connection may hinder performance more than implementing a retransmission algorithm using UDP. Additionally, TCP based servers tend to use more system resources, which can easily start to run out under heavy load if clients crash leaving connections open.




2000-10-20