This comprehensive guide explains the TCP/IP model’s four layers, key protocols such as IP, ARP, ICMP, DNS, and the differences between TCP and UDP, and details connection setup, termination, flow and congestion control mechanisms like slow start, fast retransmit, and fast recovery.
This article explains how browsers handle TCP connections and SSL sessions when loading pages with many images, covering connection persistence, request multiplexing, HTTP pipelining limitations, per‑host connection limits, and the advantages of HTTP/2 multiplexing for efficient resource fetching.
BBRv2 improves upon the original BBR algorithm by more accurately measuring delivery rate, constraining inflight data with loss and ECN signals, and introducing a dynamic state machine that enhances fairness and coexistence with Reno/CUBIC, addressing the multi‑flow fairness and queueing issues that plagued BBRv1.
This article explains how an improperly configured MTU in a VPN environment caused MySQL SHOW DATABASES commands to hang, details the troubleshooting steps taken, and presents three practical solutions to resolve the MTU‑related packet loss.
This article provides a comprehensive, step‑by‑step explanation of TCP and related transport‑layer concepts, covering the OSI model, physical to application layers, socket and port mechanics, TCP header fields, reliable transmission techniques, flow and congestion control, connection setup/teardown, and a brief comparison with UDP.
This article explains how MySQL stores NULL values and clarifies the distinct mechanisms of HTTP Keep‑Alive (application‑level long connections) versus TCP Keepalive (kernel‑level health checks), detailing their implementations, usage, and practical considerations.
This comprehensive guide covers computer network fundamentals, including OSI and TCP/IP models, protocol layers, DNS resolution, HTTP/HTTPS details, TCP three‑way handshake and four‑way teardown, congestion control, security threats like XSS and CSRF, and practical mitigation techniques, providing a solid foundation for networking interviews and real‑world applications.
This article explains how to visualize and dissect TCP/IP packet structures using Wireshark, walks through each OSI/TCP‑IP layer, and details the fields of the TCP header such as ports, sequence numbers, flags, and checksum, providing a practical understanding of network protocol fundamentals.
This article explains how TCP and UDP operate at the transport layer, compares their reliability and speed, details the TCP three‑way handshake and four‑way termination processes, and outlines how each protocol handles data segmentation, ordering, and loss.
While UDP is often assumed to be faster than TCP, this article explains socket basics, the reliability mechanisms of TCP, scenarios where UDP can be slower, and how application-layer solutions like KCP or QUIC add reliability, helping readers understand when each protocol truly excels.
This article provides a comprehensive overview of TCP, UDP, and HTTP protocols, explaining their definitions, layered roles, connection establishment and termination processes, segment structures, and key differences in reliability and performance for network communication.
This article explains TCP's retransmission mechanisms—including timeout retransmission, fast retransmit, SACK and D‑SACK—along with sliding window operation, window sizing, and congestion control algorithms such as slow start, congestion avoidance, and fast recovery, providing a comprehensive network fundamentals guide.
This article explains the fundamentals of HTTP, how browsers build and send requests, the structure of request and response messages, and the performance improvements introduced by HTTP 2.0 and the QUIC protocol built on UDP.
This comprehensive guide explains the TCP/IP protocol suite, detailing each of its four layers, key protocols such as IP, TCP, UDP, ICMP, ARP, and DNS, and illustrates essential mechanisms like encapsulation, three‑way handshake, flow control, congestion control, and tools like ping and traceroute.
This article provides a comprehensive overview of TCP and UDP, explaining their roles in the transport layer, key differences, the three‑way handshake and four‑way termination processes, data transmission mechanisms, and typical use‑case scenarios for each protocol.
This article explains the TCP slow‑start algorithm, how its initial 10‑packet window translates to a practical 14 KB rule for web pages, and why keeping the first‑byte payload under this size dramatically reduces latency across various network conditions.
This article summarizes a series of technical Q&A from an OSChina event covering Linux networking fundamentals such as port limits, network namespaces, TCP connection handling, C10K problem, packet loss troubleshooting, TCP memory usage, high CPU causes, useful monitoring tools, kernel parameters, and practical socket examples.
This article explains how to identify the root causes of increased network latency on Linux servers, covering tools such as ping, traceroute, hping3, and wrk, demonstrating packet analysis with tcpdump and Wireshark, and showing how TCP delayed ACK and socket options affect response times.
This article explains the TCP keepalive mechanism, its purpose, default parameters, how to configure and verify it on Linux, its drawbacks, and the distinction between TCP keepalive and HTTP Keep-Alive, providing practical code examples and network analysis steps.
The article investigates frequent HttpClient connection‑pool exhaustion caused by excessive CLOSE_WAIT sockets in a high‑traffic Java service, explains the underlying TCP and HttpClient mechanisms, presents diagnostic commands and code snippets, and offers concrete configuration and architectural recommendations to prevent similar issues.
The article explains how TCP connections are identified by a four‑tuple, why the theoretical maximum of 65,535 client ports does not cap server concurrency, and how real‑world limits are governed by memory, file‑descriptor counts, and port reuse techniques.
This article explains how TCP connections behave when any of the three-way handshake or four-way termination packets are lost, detailing the kernel‑controlled retransmission mechanisms, timeout intervals, relevant sysctl parameters, and the exact sequence of events for each loss scenario.
This article explains the OSI seven‑layer model and the simplified four‑layer TCP/IP model, describes how data is encapsulated with headers at each layer, compares TCP and UDP characteristics, and details the TCP three‑way handshake, four‑way termination, and related security considerations.
This guide explains how to identify and troubleshoot TCP throughput limitations by examining sender, receiver, and network bottlenecks, understanding rwnd and cwnd values, using Linux tools like ss and Wireshark, and interpreting packet traces to pinpoint congestion or loss.
Although ping and TCP both rely on IP, they can follow different network routes due to routing protocols, equal‑cost multi‑path (ECMP) decisions, and five‑tuple hashing, which explains why a host may be reachable by ping but occasionally fail to establish a TCP connection.
This guide explains why TCP throughput may fall short of network capacity, covering sender, receiver, and network bottlenecks, how to read receiver window (rwnd) and congestion window (cwnd) values on Linux, and how to interpret Wireshark graphs to pinpoint the root cause.
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.
This article explains why network throughput may fall short of the link capacity, describes the three typical bottlenecks (sender, receiver, and intermediate network), and provides practical methods to examine TCP window sizes, congestion control variables, and Wireshark visualizations for pinpointing the root cause.
This article explains the fundamentals of TCP, why raw TCP lacks message boundaries, how HTTP and RPC are built on top of TCP, and the practical reasons why both protocols coexist in modern software architectures.
This article provides a concise overview of TCP and UDP, explaining their roles in the transport layer, key differences such as connection orientation and reliability, the three‑way handshake and four‑way termination processes of TCP, and the characteristics and use cases of UDP.
This article provides a comprehensive overview of TCP and UDP, explaining their roles in the transport layer, key differences in reliability and speed, the three‑way handshake and four‑way termination processes of TCP, and how data transmission is handled by both protocols.
This guide explains TCP connection states, essential Linux commands, three‑way handshake, four‑way termination, simultaneous open/close, flag meanings, common error codes, and keep‑alive techniques to help you troubleshoot and secure network services effectively.
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.
This article explains the fundamental differences between TCP and UDP, covering their purposes, reliability, speed, handshake mechanisms, data transmission processes, and termination procedures, and includes visual diagrams to illustrate each concept in.
This article provides a concise overview of TCP and UDP protocols, explaining their purposes, core differences, the TCP three‑way handshake and four‑way termination processes, data transmission mechanisms, and typical use‑case scenarios for each protocol.
This article explains the fundamentals of TCP sockets, why raw TCP lacks message boundaries, how custom protocols add headers to solve the sticky‑packet problem, and compares HTTP and RPC as application‑layer protocols, highlighting their histories, use‑cases, and performance trade‑offs.
This article explains the end‑to‑end journey of a data packet in a TCP‑based chat application, identifies multiple points where packet loss can occur—from connection handshake to NIC queues—and offers practical Linux commands for diagnosing and mitigating these losses.
This article explains the evolution from raw TCP sockets to HTTP and RPC, highlighting why RPC remains useful despite HTTP's prevalence, covering TCP basics, message framing, service discovery, connection handling, serialization, and performance considerations.
This article explains how TCP packets travel from user space to the destination, highlights typical points where packet loss can occur—including connection establishment, flow‑control queues, NIC buffers, and end‑to‑end network hops—and shows how to diagnose and mitigate these issues using Linux tools.
This article explains why TCP and UDP can share the same port number, how multiple TCP processes handle binding, client port reuse, TIME_WAIT implications, and practical solutions like SO_REUSEADDR and tcp_tw_reuse to avoid address‑in‑use errors.
The article explains how TCP connections are identified by a four‑tuple, why the 65535 port limit does not directly cap concurrent connections, the theoretical maximum connections for client and server roles, and how real‑world limits are governed by memory, file descriptors, and port reuse on Linux systems.
This article provides a comprehensive overview of TCP and UDP, explaining their roles in the transport layer, key differences, the three‑way handshake, data transmission mechanisms, four‑way termination, and the characteristics of UDP, illustrated with diagrams for clarity.
This article explains how QUIC implements reliable transmission on top of UDP by using monotonic packet numbers, stream IDs and offsets, independent flow‑control windows, and integrated TLS, thereby eliminating TCP’s retransmission ambiguity, head‑of‑line blocking, and improving congestion control and connection migration.
This article provides a comprehensive overview of TCP and UDP, explaining their roles in the transport layer, key differences such as connection orientation and reliability, the three‑way handshake and four‑way termination processes of TCP, and the typical use cases and limitations of each protocol.
The article explains how the Linux kernel implements the TCP three‑way handshake, detailing server listen queue allocation, client connect port selection and SYN transmission, SYN‑ACK processing, state transitions, request‑socket management, full‑connection queue handling, and the final accept call, plus tuning tips.
This article explains TCP connection states, common Linux network commands, the three‑way handshake, four‑way termination, simultaneous open/close, flag meanings, and practical troubleshooting techniques such as keep‑alive and error handling, providing a comprehensive guide for network engineers.
This article explains the evolution from HTTP/1.1 to HTTP/3, highlights the limitations of HTTP/2 such as head‑of‑line blocking and TCP‑based latency, and shows how QUIC’s UDP‑based design, 0‑RTT handshakes, connection migration, and advanced congestion‑control mechanisms overcome those challenges to deliver faster, more reliable web traffic.
The article explains how TCP, the long‑standing transport for HTTP/1.x and HTTP/2, suffers from head‑of‑line blocking and handshake latency, why protocol ossification hinders upgrades, and how HTTP/3’s QUIC built on UDP overcomes these issues while introducing its own deployment challenges.
This article explains how TCP connections are identified by a four‑tuple, why the 65535 port limit only applies to client‑side connections, the theoretical 2⁴⁸ limit for servers, and how actual concurrency is constrained by memory, file descriptors and port reuse.
This article explains that the 65535 TCP port limit does not directly cap concurrent connections, detailing how TCP connections are identified by a four‑tuple, the theoretical maximums for client and server sides, and why actual limits depend on memory, file descriptors, and port reuse.
This article examines how a MySQL connection is created from a Java web application, breaking down the TCP handshake, authentication, and variable‑setting steps with Wireshark captures, measuring latency, and demonstrating why connection pooling is essential to avoid hundreds of milliseconds of overhead per request.
This guide walks through Wireshark's powerful features for filtering packets by IP, protocol, and port, adjusting time display formats, viewing and modifying TCP sequence numbers, saving filtered captures, performing packet statistics, decoding logs, tracing TCP streams, and identifying device manufacturers via MAC addresses.
This article explains the essential concepts of TCP and UDP, covering the OSI layers, physical and data‑link networking, IP addressing, transport‑layer mechanisms such as sliding windows, congestion control, reliable transmission, connection establishment and termination, and compares the strengths and weaknesses of TCP versus UDP.
This article explains the fundamentals of HTTP and HTTPS, covering request and response structures, common methods, differences between GET and POST, response codes, the complete request flow, and how HTTPS adds SSL/TLS encryption for secure communication.
This article dives deep into Netty's handling of TCP connection termination, explaining normal and abnormal closures, the half‑close mechanism, the impact of the SO_LINGER option, a discovered bug that blocks half‑close reads, and the step‑by‑step fix submitted and merged into Netty.
This comprehensive guide walks through the fundamentals of computer networking, detailing the OSI layers, the inner workings of TCP and UDP, reliable transmission techniques such as stop‑and‑wait, sliding windows, congestion control, connection setup and teardown, as well as security concerns, performance trade‑offs, and practical use‑case scenarios.
This article explains how TCP ensures reliable connections through the three-way handshake process—including SYN, SYN‑ACK, and ACK exchanges—and describes the four-step termination sequence with FIN and ACK flags, while also clarifying why three handshakes are necessary instead of two.
This article explains how to identify the causes of increased network latency on Linux servers using tools such as ping, traceroute, hping3, wrk, tcpdump and Wireshark, demonstrates a practical case with two Nginx containers, analyzes TCP delayed ACK behavior, and provides actionable steps to measure, trace, and mitigate latency.
Although TCP provides reliable transmission, its guarantees have limits—such as incomplete CRC checks, process crashes before data reaches the transport layer, possible ISP tampering, and kernel‑level ACKs that don’t ensure user‑space receipt—so large downloads must still be validated for full integrity.
The article investigates how loss of TCP SYN, SYN‑ACK, or ACK packets during the three‑way handshake affects MySQL client‑server connections, demonstrating retransmission behavior, kernel parameter tuning, and keep‑alive mechanisms through controlled iptables and tcpdump experiments.
This tutorial explains proxy fundamentals, compares forward and reverse proxies, details HTTP and HTTPS proxy header differences, and provides a complete, runnable Go implementation that listens on port 8080 and transparently forwards client requests to target servers.
This article examines the inherent shortcomings of the TCP protocol, including the difficulty of upgrading the stack, the latency introduced by its three‑way handshake and TLS, head‑of‑line blocking caused by packet loss, and the high cost of connection migration when network conditions change.
This article explains the design and operation of TCP BBR (Bottleneck Bandwidth and Round‑trip propagation time), its relationship to bufferbloat, the shortcomings of loss‑based congestion algorithms, and details the BBR phases, gain cycle, source code, advantages, disadvantages, and practical considerations for network engineers.
This article uses a conversational story to explain what it means to listen on a network port, covering TCP vs UDP, binding to specific IPs, reuse‑port options, IPv4 and IPv6 differences, and demonstrates the concepts with multiple Python socket code snippets.
When you type a URL and press Enter, the browser performs a series of steps—including URL parsing, DNS resolution across multiple caches, TCP three‑way handshake, HTTP request construction, server processing, and response handling—each involving specific protocols and layers that together deliver the requested web page.
This article explains how to identify the root causes of increased network latency on Linux servers—covering basic concepts of RTT and application latency, using tools such as ping, traceroute, hping3, wrk, tcpdump, and Wireshark, and demonstrates a practical case with Nginx containers to analyze and mitigate delays.
This article walks developers through the fundamentals of the OSI model, TCP three‑way handshake and UDP characteristics, explains socket concepts, demonstrates Node.js server and client implementations with heartbeats and custom protocols, and details how to build and use a socket connection pool with the generic‑pool library.
This article explains the OSI seven‑layer model, the differences between TCP and UDP, the mechanics of TCP three‑way handshake and four‑step termination, how sockets work in Node.js, and how to implement custom protocols and a socket connection pool for high‑concurrency applications.
This article analyzes the full lifecycle of a MySQL connection from Java code to TCP handshake using Wireshark, measures each step’s latency, calculates the total cost per request, and demonstrates why connection pooling is essential for high‑traffic web applications.
This article explains the complete lifecycle of socket communication—from creation within the TCP/IP stack, through connection establishment, data transmission with TCP and UDP, to graceful termination—detailing control information, packet sizing, ACK mechanisms, sliding windows, and practical inspection using netstat.
This article explains how TCP guarantees reliable transmission through a three‑way handshake for connection establishment and a four‑step termination process, detailing each packet’s flags, sequence numbers, and the reasons why these multi‑step procedures are essential for robust network communication.
This article demystifies the common confusion about a server’s maximum concurrent TCP connections, explaining the theoretical limits of the TCP four‑tuple, Linux file‑descriptor restrictions, kernel buffer settings, and demonstrates achieving one million active connections through careful configuration and tuning.
This article presents a complete tutorial on building a TCP‑based instant‑messaging system using Netty for the server, SpringBoot for the web admin console, JavaFX for the desktop client, Shiro for authentication, and MySQL for user data, covering architecture, protocol design, and full source code examples.
This article explains the WebSocket protocol, its full‑duplex persistent connection, key features, why it outperforms HTTP for real‑time scenarios, and provides detailed handshake examples for both client and server implementations.
This article provides an in‑depth tutorial on TCP, covering its header structure, three‑way handshake, reasons for three handshakes, four‑way termination, TIME_WAIT, SYN attacks, Linux kernel parameters, and practical socket programming examples, all illustrated with diagrams and code snippets.
This article compiles a variety of online visualization tools—including algorithm and data‑structure animators, a MESI cache‑coherency simulator, and interactive TCP sliding‑window and flow‑control demos—to help learners intuitively understand core computer‑science concepts through animated models and hands‑on experimentation.
The article investigates why a MySQL server shows a large number of TCP connections in TIME_WAIT state, examines OS and MySQL logs, tests sysctl adjustments, captures network packets to reveal short‑lived client connections, and concludes that using persistent connections can eliminate the issue.
Learn how to install the tcpping utility on various Linux distributions, understand its TCP half‑open connection technique for measuring RTT, and master its command‑line options for probing network latency, even when ICMP ping is blocked by firewalls.
The article examines the limitations of TCP and HTTP/2, explains how Google's UDP‑based QUIC protocol addresses issues such as head‑of‑line blocking, connection migration, and RTT estimation, and compares performance in both good and poor network conditions, highlighting its multiplexing, flow‑control, and security advantages.
This article explains the purpose, output format, and frequently used options of the cross‑platform netstat command, illustrating how to list active TCP/UDP connections, UNIX domain sockets, and various statistics, and notes modern replacements such as ss and ip.
This article explains a technique for writing long‑TCP connection business code on mobile devices that is as efficient and concise as short‑link code, using request_id mapping, protobuf messages, and a lightweight SendCore layer with timeout handling.
This article demonstrates how to create a basic FTP‑like file transfer application in C using Windows Winsock, covering both server and client implementations, handling file size negotiation, data transmission loops, and compilation steps, with complete source code examples.
Unplugging a network cable does not immediately terminate a TCP connection; the kernel’s socket state remains ESTABLISHED, and the connection’s fate depends on data transmission, retransmission limits, TCP keepalive settings, and whether either side detects a failure.
This article continues the previous discussion on TCP handshakes and termination, then thoroughly explains nine essential TCP mechanisms—including sliding window, flow control, congestion control, delayed and piggyback ACKs, sticky packet handling, and keep‑alive—illustrated with diagrams and practical examples.
This article explains TCP's core mechanisms—including acknowledgment (ACK), timeout retransmission, the three‑way handshake for establishing connections, and the four‑way handshake for graceful termination—while illustrating each concept with diagrams and addressing common interview questions.
This article introduces Python's socket module, explains core concepts such as IP, ports, and protocols, demonstrates essential socket functions, and provides complete client‑server code for a simple full‑duplex TCP chat application, enabling readers to quickly start network programming in Python.
This article explains Redis's high‑performance RESP protocol, its simple design principles, how commands are serialized over TCP, and demonstrates Java examples for both a mock server and client, while detailing the various response types defined by the protocol.
The article details Vivo’s push notification platform, describing its evolution from cloud‑based beginnings to a self‑built, three‑region architecture that supports over 1 million concurrent connections, billions of daily messages, and incorporates optimizations such as adaptive heartbeats, advanced load‑balancing, distributed caching, multi‑layer rate limiting, circuit‑breaker mechanisms, and comprehensive content security.
This article explores TCP’s connection termination process, detailing the classic four‑way handshake, scenarios that reduce it to three or two handshakes, the concept of self‑connections, simultaneous opens, and practical implications for developers, including code examples and troubleshooting tips.
This article explains the purpose of the TCP RST flag, how the kernel and application layers detect it, the various scenarios that trigger RST, why an RST may not terminate a connection, and the security implications of RST attacks.
This tutorial explains why Netty is preferred over raw NIO, introduces its core components and architecture, and walks through a complete Java example of a simple Netty chat server, including handling of connections, message broadcasting, pipeline configuration, and TCP sticky‑packet issues.
This article explains how TCP establishes reliable connections with a three‑way handshake, why three steps are necessary, and how it gracefully closes connections using a four‑way termination, detailing each packet flag and state transition.
The article argues that both hands‑on practice and deep understanding of network implementations are essential for computer‑science students and engineers, illustrating the gap with theory‑only learning, presenting the pyramid learning model, recommending Linux tools, coding exercises, and detailed studies of TCP, epoll, and I/O performance.
This article traces the evolution of HTTP from its early TCP‑based origins through HTTP/1.0, 1.1, SPDY, HTTP/2, and finally to HTTP/3, explaining how QUIC over UDP addresses latency, head‑of‑line blocking, and security challenges of previous versions.
This article explains how TCP establishes reliable connections using a three‑way handshake, why two‑way handshakes are insufficient, and details the four‑step termination process, including the purpose of the TIME‑WAIT state in TCP/IP networks.
This article details a step‑by‑step performance optimization of a Python backend service, covering requirement analysis, architecture redesign with caching and Redis queues, load‑testing results, TCP TIME_WAIT issues, and kernel parameter tweaks that ultimately raised throughput to 50,000 QPS with zero errors.
This article explains TCP fundamentals, covering its role in the OSI model, header structure, three‑way handshake, four‑way termination, typical connection problems, and how various TCP states transition, providing a solid foundation for both client and server developers.
This article traces the evolution of HTTP from its earliest version through HTTP/2, explains the limitations of each iteration, and demonstrates how QUIC's UDP‑based design, 0‑RTT connections, connection migration, and flexible congestion control overcome those issues to become the next‑generation web transport protocol.