Tagged articles
33 articles
Page 1 of 1
IT Services Circle
IT Services Circle
May 8, 2026 · Fundamentals

Understanding TCP: Three-Way Handshake, Four-Way Teardown, TIME‑WAIT, and HTTP/2

This article explains the OSI seven‑layer model, TCP header fields, the three‑way handshake and four‑way termination processes, TIME‑WAIT timing, connection capacity calculations, packet fragmentation and reassembly, flow control, HTTP version differences, HTTPS security flow, and common analysis tools like Wireshark.

Four-way terminationHTTP/2OSI model
0 likes · 15 min read
Understanding TCP: Three-Way Handshake, Four-Way Teardown, TIME‑WAIT, and HTTP/2
Linux Tech Enthusiast
Linux Tech Enthusiast
Feb 24, 2026 · Fundamentals

Understanding the TCP Communication Protocol: Features, Handshakes, and Optimizations

This article explains TCP as a connection‑oriented, reliable byte‑stream transport protocol, detailing its header fields, state machine, three‑way handshake, four‑way termination, TIME_WAIT handling, Linux inspection commands, optimization techniques, and a comparison with UDP, all illustrated with concrete examples and diagrams.

LinuxSocketTCP
0 likes · 27 min read
Understanding the TCP Communication Protocol: Features, Handshakes, and Optimizations
Xiao Liu Lab
Xiao Liu Lab
Nov 12, 2025 · Operations

Why TIME_WAIT Isn't a Problem and How to Optimize It

TIME_WAIT is a normal TCP state designed to prevent stray packets, but high volumes can indicate inefficient connection handling; this guide explains its mechanics, common causes, monitoring commands, and practical kernel and application-level tuning strategies to reduce TIME_WAIT buildup in high‑traffic services.

Connection PoolLinuxTCP
0 likes · 12 min read
Why TIME_WAIT Isn't a Problem and How to Optimize It
Efficient Ops
Efficient Ops
Jun 30, 2025 · Operations

Why TIME_WAIT Connections Exhaust Your Server and How to Fix Them

TIME_WAIT is a TCP state that appears on the side actively closing a connection; when many sockets linger in this state, ports are exhausted, causing connection failures, and the article explains typical scenarios, underlying causes, kernel limits, and practical client‑ and server‑side solutions.

Connection ManagementKernel ParametersLinux
0 likes · 5 min read
Why TIME_WAIT Connections Exhaust Your Server and How to Fix Them
Open Source Linux
Open Source Linux
Oct 29, 2024 · Fundamentals

Why Does TCP Keep Connections in TIME_WAIT? Uncover the Hidden Risks

This article explains the TCP state machine, details the four-way handshake, analyzes why the TIME_WAIT state lasts for two MSL intervals, and illustrates two critical problems caused by delayed packets and missing ACKs, providing examples and code snippets for deeper understanding.

Connection ManagementFour-way HandshakeMSL
0 likes · 11 min read
Why Does TCP Keep Connections in TIME_WAIT? Uncover the Hidden Risks
Java Tech Enthusiast
Java Tech Enthusiast
May 4, 2024 · Fundamentals

Understanding HTTP and TCP: From URL to Browser Rendering

The article walks through every step from typing a URL to final page rendering, detailing URL parsing, DNS lookup, TCP three‑way handshake and termination, HTTP request/response structure, congestion and flow control mechanisms, and the browser’s DOM, CSS, layout and painting processes.

BrowserDNSFour-way Handshake
0 likes · 13 min read
Understanding HTTP and TCP: From URL to Browser Rendering
Cognitive Technology Team
Cognitive Technology Team
Feb 17, 2024 · Fundamentals

Understanding TCP Connection Termination: Four-Way Handshake, Half‑Close, Shutdown, and TIME_WAIT

This article explains how TCP connections are gracefully closed using the four‑way handshake, describes half‑close and half‑open states, compares the close and shutdown system calls, details the TIME_WAIT state and its impact, and offers practical techniques to reduce or avoid TIME_WAIT accumulation.

Connection terminationShutdownTCP
0 likes · 12 min read
Understanding TCP Connection Termination: Four-Way Handshake, Half‑Close, Shutdown, and TIME_WAIT
Liangxu Linux
Liangxu Linux
Aug 31, 2022 · Operations

Why TIME_WAIT Connections Accumulate and How to Fix Them

In high‑concurrency scenarios, massive TIME_WAIT TCP connections can exhaust local ports, causing new connections to fail, but by understanding the TCP four‑handshake, adjusting socket reuse settings, and using keep‑alive, you can mitigate the issue.

LinuxNetworkingOperations
0 likes · 8 min read
Why TIME_WAIT Connections Accumulate and How to Fix Them
Efficient Ops
Efficient Ops
Aug 15, 2022 · Fundamentals

Why Does TIME_WAIT Accumulate in High‑Concurrency Scenarios and How to Fix It?

Under high‑concurrency loads, massive TIME_WAIT TCP connections can exhaust local ports, causing “address already in use” errors; this article explains the root causes, impact on services, and practical mitigation strategies such as keep‑alive headers, socket reuse, and reducing the TIME_WAIT timeout.

TCPTIME-WAIThigh concurrency
0 likes · 7 min read
Why Does TIME_WAIT Accumulate in High‑Concurrency Scenarios and How to Fix It?
MaGe Linux Operations
MaGe Linux Operations
Sep 28, 2021 · Operations

Why Do TIME_WAIT Connections Accumulate and How to Fix Them?

The article explains why massive TIME_WAIT TCP connections appear during high‑concurrency scenarios, their impact on server ports and new connections, and provides practical analysis and solutions such as keep‑alive headers, socket reuse, and reducing the TIME_WAIT duration.

TCPTIME-WAITnetwork
0 likes · 9 min read
Why Do TIME_WAIT Connections Accumulate and How to Fix Them?
Efficient Ops
Efficient Ops
Jul 6, 2021 · Operations

Mastering TCP TIME-WAIT: When to Optimize and How

This article explains the purpose of the TCP TIME-WAIT state, the scenarios it protects against, common misconceptions, and practical Linux kernel tweaks—such as fast recycle, socket reuse, and tw_buckets settings—to manage TIME-WAIT efficiently on high‑concurrency servers.

LinuxTCPTIME-WAIT
0 likes · 8 min read
Mastering TCP TIME-WAIT: When to Optimize and How
Programmer DD
Programmer DD
May 26, 2021 · Fundamentals

Why Does TCP Keep Connections in TIME_WAIT? Uncovering the Hidden Bottleneck

This article explains the purpose of the TCP TIME_WAIT state, how it prevents packet loss and connection errors, examines its duration based on the Maximum Segment Lifetime, and analyzes why high‑QPS load testing tools like ab may appear to bypass TIME_WAIT, revealing the impact on server resources.

LinuxPerformance TestingSocket
0 likes · 8 min read
Why Does TCP Keep Connections in TIME_WAIT? Uncovering the Hidden Bottleneck
ITPUB
ITPUB
Nov 23, 2020 · Fundamentals

Master TCP Handshake & Teardown: Linux TIME_WAIT Tuning Explained

This article explains the TCP three‑way handshake and four‑way termination processes, clarifies the TIME_WAIT state, shows how to inspect socket states with netstat, and provides practical Linux sysctl settings to reduce excessive TIME_WAIT sockets and improve network performance.

HandshakeLinuxNetworking
0 likes · 7 min read
Master TCP Handshake & Teardown: Linux TIME_WAIT Tuning Explained
Open Source Linux
Open Source Linux
Jul 15, 2020 · Fundamentals

Why Do TIME_WAIT Connections Accumulate and How to Fix Them?

This article explains why massive TIME_WAIT TCP connections appear under high concurrency, the impact on services, and practical methods—such as adjusting socket reuse and reducing TIME_WAIT duration—to prevent new connection failures.

LinuxNGINXNetworking
0 likes · 9 min read
Why Do TIME_WAIT Connections Accumulate and How to Fix Them?
Efficient Ops
Efficient Ops
Jul 14, 2020 · Operations

Why Enabling tcp_tw_recycle Can Crash Your Web Service and How to Fix It

This article explains how an unstable response time caused by misconfigured public load balancers and the kernel parameters net.ipv4.tcp_tw_recycle and net.ipv4.tcp_tw_reuse led to frequent monitoring alerts, details the diagnostic steps taken, and provides concrete remediation recommendations.

Kernel TuningLoad BalancerTIME-WAIT
0 likes · 19 min read
Why Enabling tcp_tw_recycle Can Crash Your Web Service and How to Fix It
Aikesheng Open Source Community
Aikesheng Open Source Community
Feb 18, 2020 · Information Security

How Securing MySQL with TCP Wrappers Can Cause an Outage

This article examines a MySQL outage triggered by TCP wrappers, detailing how high thread counts, DNS latency, TIME_WAIT socket exhaustion, and frequent reads of /etc/hosts.allow and /etc/hosts.deny can block connections, and provides troubleshooting steps and mitigation recommendations.

DNSTCP wrappersTIME-WAIT
0 likes · 11 min read
How Securing MySQL with TCP Wrappers Can Cause an Outage
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
Nov 14, 2019 · Fundamentals

How to Replace TCP FIN with RST Using SO_LINGER in Go

This article explains why TIME_WAIT occurs, its resource impact, and demonstrates two optimization strategies—accelerating TIME_WAIT reclamation and using the SO_LINGER option to send an RST packet instead of the normal FIN handshake, with complete Go client and server examples and packet‑capture analysis.

RSTSO_LINGERTCP
0 likes · 8 min read
How to Replace TCP FIN with RST Using SO_LINGER in Go
Qunar Tech Salon
Qunar Tech Salon
Nov 6, 2018 · Operations

Analyzing TCP Connection States and Resolving TIME_WAIT, CLOSE_WAIT, and SYN_RECV Issues in a Java/Tomcat/HBase System

This article walks through a real‑world incident where sudden traffic drops were traced to abnormal TCP states—TIME_WAIT, CLOSE_WAIT, and SYN_RECV—by examining monitoring data, explaining the TCP handshake, reviewing relevant kernel parameters, and debugging Java/ZooKeeper/HBase code to identify and fix the root cause.

HBaseSYN_RECVTCP
0 likes · 20 min read
Analyzing TCP Connection States and Resolving TIME_WAIT, CLOSE_WAIT, and SYN_RECV Issues in a Java/Tomcat/HBase System
360 Tech Engineering
360 Tech Engineering
May 24, 2018 · Operations

Common Short‑Connection Errors [99] and [110] in Linux: Causes, Code Analysis, and Optimizations

This article examines why frequent short‑lived TCP connections on Linux trigger the [99] could not assign requested address and [110] connection timeout errors, explains the underlying TIME‑WAIT port exhaustion and listen‑queue overflow mechanisms, and offers verification experiments and practical mitigation strategies.

LinuxNetwork TuningTCP
0 likes · 8 min read
Common Short‑Connection Errors [99] and [110] in Linux: Causes, Code Analysis, and Optimizations
360 Quality & Efficiency
360 Quality & Efficiency
Feb 8, 2018 · Fundamentals

Understanding TCP TIME_WAIT State and Optimization Techniques

This article explains the TCP TIME_WAIT state, its role in connection termination, the performance impact of large numbers of TIME_WAIT sockets, and practical optimization methods such as using keep‑alive and tuning Linux kernel parameters to mitigate the issue.

LinuxNetwork TuningPerformance Testing
0 likes · 8 min read
Understanding TCP TIME_WAIT State and Optimization Techniques
ITPUB
ITPUB
Sep 13, 2016 · Fundamentals

Why Does TCP TIME_WAIT Exist and How to Manage It in High‑Concurrency Servers

The article explains why TCP’s TIME_WAIT state is essential for reliable data delivery, describes how excessive TIME_WAIT sockets can exhaust port resources in high‑concurrency short‑connection servers, and offers principled and practical mitigation techniques such as kernel sysctl tweaks and careful use of SO_LINGER.

LinuxNetworkingSocket
0 likes · 9 min read
Why Does TCP TIME_WAIT Exist and How to Manage It in High‑Concurrency Servers
Tencent Music Tech Team
Tencent Music Tech Team
May 20, 2016 · Fundamentals

In‑Depth Analysis of TCP Connection Timeout, TIME_WAIT, Nagle Algorithm and Kernel Parameters

This article examines three common TCP issues—missing client‑side socket timeouts leading to monitor‑killed processes, excessive TIME_WAIT sockets after service failures and their kernel tunables, and 40 ms keep‑alive latency caused by Nagle and delayed ACK—explaining kernel behavior and offering practical configuration fixes.

Linux kernelNagle algorithmTCP
0 likes · 19 min read
In‑Depth Analysis of TCP Connection Timeout, TIME_WAIT, Nagle Algorithm and Kernel Parameters