Saturday, February 9, 2008

Comparison with UDP

The main differences between TCP and UDP (User Datagram Protocol), the other main protocol of transport of the suite of Internet protocols, are:

* UDP does not offer no guarantee of the arrival the datagrammi neither on their order of arrival, in the contrary the TCP through the mechanisms of acknowledgement and rebroadcast on timeout succeeds to guarantee the delivery of the data, even if to the greater cost of overhead (a raffrontabile one visually confronting the dimension of the headings of the two protocols);
* TCP is a protocol oriented to the logon, therefore in order to establish and to pull down (and in sure cases to maintain) the logons, must send to ulterior segments of service, increasing ulteriorly the overhead of communication. To the contrary, UDP sendes only datagrammi the demands from the applicativo level;
* the object of the TCP communication is the flow of byte while that one of UDP and the single one datagramma.

I use of protocol TCP regarding UDP is, in a generalized manner, preferred when it is necessary to have guarantees on the delivery of the data or the order of arrival of several the segments (as as an example in the case of transfers of rows). To the contrary UDP it comes mainly used when the interaction between the two hosts is idempotente or in the case strong ties are had on the speed and the economy of resources of the net.

No comments: