Skip to content

Commit

Permalink
doc: added tags to TCP performance blog
Browse files Browse the repository at this point in the history
  • Loading branch information
Jitesh117 committed Jul 30, 2024
1 parent 41bd4ff commit b0b7d02
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions content/blog/tcp-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ date = 2024-07-12T18:44:34+05:30
draft = false
showToc = true
cover.image = '/images/tcp.jpeg'
tags = ["Web"]
+++

HTTP is the language of the internet. And it is layered directly on top of TCP, so the performance of HTTP calls depends directly on the performance of the underlying TCP.
HTTP is the language of the internet. And it is layered directly on top of TCP, so the performance of HTTP calls depends directly on the performance of the underlying TCP.

This article highlights some significant performance considerations of TCP connections. You'll better appreciate HTTP's connection optimization features after understanding these basic performance characteristics of TCP.

Expand All @@ -27,12 +28,13 @@ In this secion we'll go through the most common TCP related delays.

### 1. TCP Connection Handshake Delays

When you set up a new TCP connection, even before you send any data, the TCP software exchanges a series of IP packages to negotiate the terms of the connection.
When you set up a new TCP connection, even before you send any data, the TCP software exchanges a series of IP packages to negotiate the terms of the connection.

These are the steps in the TCP connection handshake:

![TCP connection handshake](/images/tcp_handshake.png)
> *Figure 1. TCP Connection handshake*
![TCP connection handshake](/images/tcp_handshake.png)

> _Figure 1. TCP Connection handshake_
1. To request a new TCP connection, the client sends a small TCP packet (40–60 bytes) with a “SYN” flag to the server (see Figure 1a).
2. If the server accepts, it sends back a TCP packet with “SYN” and “ACK” flags, indicating the connection is accepted (see Figure 1b).
Expand All @@ -48,7 +50,6 @@ The Internet doesn't guarantee reliable packet delivery, so **TCP uses its own a

**HTTP Limitation**: HTTP's request-reply nature reduces piggybacking opportunities, potentially causing delays. **Adjusting TCP Settings**: Modifying TCP parameters should be done cautiously. **TCP algorithms protect the Internet from poorly designed applications**. Ensure changes won't create problems.


### 3. TCP Slow Start

**TCP performance** depends on the age of the TCP connection. **TCP connections "tune" themselves** over time, initially limiting the speed and increasing it as data is transmitted successfully. This tuning, called **TCP slow start**, prevents sudden overloading and congestion.
Expand Down

0 comments on commit b0b7d02

Please sign in to comment.