As in previous blog we have define and explain about what is TCP and UDP and from now we are moving ahead with Advantages, Disadvantages and Difference of TCP and UDP but for this you have to know about TCP and UDP hence to understand it go for a What is TCP and UDP.
Advantage of TCP
Here, are pros/benefits of TCP:
- It helps you to establish/set up a connection between different types of computers.
- It operates independently of the operating system.
- It supports many routing-protocols.
- It enables the internetworking between the organizations.
- TCP/IP model has a highly scalable client-server architecture.
- It can be operated independently.
- Supports several routing protocols.
- It can be used to establish a connection between two computers.
Disadvantages of TCP
Here, are disadvantage of using TCP:
- TCP never conclude a transmission without all data in motion being explicitly asked.
- You can't use for broadcast or multicast transmission.
- TCP has no block boundaries, so you need to create your own.
- TCP offers many features that you don't want. It may waste bandwidth, time, or effort.
- In this, model the transport layer does not guarantee delivery of packets.
- Replacing protocol in TCP/IP is not easy.
- It doesn't offer clear separation from its services, interfaces, and protocols.
Advantage of UDP
Here are the pros/benefits of UDP:
- It never restricts you to a connection-based communication model; that's why startup latency in distributed applications is low.
- The recipient of UDP packets gets them unmanaged, which also includes block boundaries.
- Broadcast and multicast transmission are also available with UDP
- Data loss can be made
- Small transaction ( DNS lookup)
- Bandwidth intensive app which endures packet loss
Disadvantages of UDP
Here, are important cons/drawback of UDP:
- In UDP protocol, a packet may not be delivered or delivered twice. It may be delivered out of order, so you get no indication.
- Routers are quite careless with UDP, so they never retransmit it if it collides.
- UDP has no Congestion Control, and flow control, so implementation is the job of a user application.
- UDP mostly like to suffer from worse packet loss
Difference between TCP and UDP
TCP:
- TCP is a connection-oriented protocol.
- TCP reads data as streams of bytes, and the message is transmitted to segment boundaries.
- TCP messages make their way across the internet from one computer to another.
- TCP rearranges data packets in the specific order.
- The speed for TCP is slower.
- TCP Header size is 20 bytes
- TCP is heavy-weight.
- TCP does error checking and also makes error recovery.
- Acknowledgment segments are there in TCP
- Using handshake protocol like SYN, SYN-ACK, ACK in TCP
- TCP is reliable as it guarantees delivery of data to the destination router.
- TCP offers extensive error checking mechanisms because it provides flow control and acknowledgment of data.
UDP:
- UDP is a connectionless protocol.
- UDP messages contain packets that were sent one by one. It also checks for integrity at the arrival time.
- UDP is not connection-based, so one program can send lots of packets to another.
- UDP protocol has no fixed order because all packets are independent of each other.
- UDP is faster as error recovery is not attempted.
- UDP Header size is 8 bytes.
- UDP is lightweight. There are no tracking connections, ordering of messages, etc.
- UDP performs error checking, but it discards erroneous packets.
- UDP has No Acknowledgment segments
- UDP have No handshake (so connectionless protocol)
- The delivery of data to the destination can't be guaranteed in UDP.
- UDP has just a single error checking mechanism which is used for checksums.
Comments
Post a Comment