We help IT Professionals succeed at work.

Why was UDP chosen over TCP?

We have seen that SNMP uses UDP as its transport protocol.  Why was UDP chosen over TCP?
Comment
Watch Question

ITSysTechSenior Systems Administrator
Commented:
This should answer your question. I also found it very interesting.

"UDP is actually expected to work better than TCP in lossy networks (or congested networks). TCP is far better at transferring large quantities of data, but when the network fails it's more likely that UDP will get through. (in fact, I recently did a study testing this and it found that SNMP over UDP succeeded far better than SNMP over TCP in lossy networks when the UDP timeout was set properly). Generally, TCP starts behaving poorly at about 5% packet loss and becomes completely useless at 33% (ish) and UDP will still succeed (eventually)."

Reference
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
That is  not the (main) reason for choosing UDP here. TCP requires a confirmation, while UDP can work without. Most SNMP messages don't require a 100% reliable transmission.
Also, the overhead for small packets is much less with UDP than with TCP.
Dr. KlahnPrincipal Software Engineer
Commented:
I second Qlemo on this issue.  SNMP is not mandatory for network functioning.

Additionally, SNMP rarely goes outside of a LAN.  LAN stability can be expected (at some level) for any type of packets and UDP is then to be preferred over TCP due to the lower overhead.
nader alkahtaniInformation security consultant
Commented:
UDP is not HEAVY on CPU, but  TCP is
Dr. KlahnPrincipal Software Engineer

Commented:
No further response from questioner.  Points assigned to responders by perceived relative magnitude of contribution.