UDP and TCP

UDP( User Datagram protocol ) – Connection-less protocol (No-handshake)

  • Transport layer protocol used with IP (Internet Protocol) Network layer protocol. It is based on RFC 768
  • Used for low-latency and loss-tolerating connection between applications on the internet.
  • It sends short packets of data called data-grams.
  • Provides Port Numbers to distinguish between various user requests
  • Checksum to check if the data arrived is intact
  • Lower bandwidth overhead and latency as it send only small data packets.
  • No guarantee that message/packets sent will reach the destination intact.
  • Faster as there is no error check for packets.
  • Header size is 8 bytes
  • Lightweight – No ordering of messages, no tracking connections.
  • Supported Protocols – DNS, DHCP,SNMP,VOIP,RIP,TFTP
  • No order – as each packets are individual. Ordering of packets to be implemented at application layer.

Used In

  • Network applications where latency is critical such as gaming , voice and video communication.  Loosing data would not affect much.

TCP ( Transmission Control Protocol)  – Connection oriented

  • Rearranges data packets in specified order
  • Supported Protocol – HTTP, HTTPS, FTP, SMTP, Telnets
  • Slower than UDP
  • Header size – 20 bytes
  • Heavy weight – requires 3 packets to setup socket connection
  • Does error checking
  • Supports hand-shake

Used In

  • Applications that require high reliability and transmission time is less critical

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Cheat Sheet To JAVA Latest Technology

%d bloggers like this: