Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

networks
protocols

What is TCP?

Educative Answers Team

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Transmission Control Protocol (TCP) is a transport layer protocol used to create a connection between applications so that they can exchange data over a communication network.

Key features

  • TCP provides a process for communication. Port numbers are appended in the header of the packet to enable this.

  • A three-way handshaking process takes place to open a connection in TCP; hence, it is called a connection-oriented protocol.

  • A packet (called a segment in case of TCP) contains a checksum field used for error control.

  • TCP prevents the sender from sending in more data than the receiver can handle with the window size provided by the receiver.

  • It guarantees the reliable delivery of segments. Incase of segment loss or corruption, segments are re-transmitted.

  • It reassembles the packets in the correct order at the receiver side.

  • It uses a congestion avoidance algorithm to avoid the network from being congested.

TCP segment

The TCP segment consists of a header and data. The following illustration goes over its structure:

svg viewer
A TCP segment

Applications that use TCP

TCP is used where reliable in-order delivery of packets is needed. Such applications include:

  • Web surfing

  • Sending and receiving emails

RELATED TAGS

networks
protocols
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring