This guide walks Go developers through the OSI and TCP/IP layering models, explains key transport and application protocols such as TCP, UDP, HTTP/1.1, HTTP/2, HTTP/3, RPC, WebSocket, and TLS, and provides practical Go code snippets and deployment tips for building performant, secure, and real‑time services.
This article compares UDP and TCP by using vivid analogies, explaining UDP's connectionless, fast but unreliable nature and TCP's reliable, connection‑oriented handshake and termination processes, while highlighting their respective advantages, drawbacks, and typical real‑time application scenarios.
This article walks developers through the OSI model, explains TCP three‑way handshake and four‑way termination, compares TCP and UDP, discusses socket long connections, heartbeat mechanisms, custom application‑layer protocols, and implements a Node.js socket connection pool for high‑concurrency scenarios.
This article explains all TCP connection states, the three‑way handshake and four‑way termination, details half‑open and full‑open queues, shows how to monitor and troubleshoot listen and accept queue overflows, and lists key Linux kernel parameters for optimizing TCP performance.
This comprehensive guide walks readers through the fundamentals of computer networking, covering architecture models, TCP and UDP protocols, HTTP basics, socket programming, IP addressing, ICMP, Ping, and related concepts such as routers, cookies, and token authentication, all illustrated with clear diagrams.
This article explains the shortcomings of TCP and UDP for latency‑sensitive applications, introduces the KCP protocol as a reliable yet low‑latency UDP‑based solution, outlines its key features and operation, and provides practical code examples for integration.
The article examines why a TLS 1.3 upgrade still exhibited a two‑RTT handshake, traces the extra round‑trip to TCP’s Nagle algorithm, and shows how disabling it restores the expected one‑RTT performance while highlighting the interplay between TLS and lower‑layer protocols.
Understanding TCP’s three‑way handshake and four‑way termination reveals how reliable connections are established and gracefully closed, highlighting the protocol’s core mechanisms—sequence numbers, acknowledgments, flow control, and TIME‑WAIT—while also addressing performance considerations, optimization techniques, and the future impact of emerging protocols like QUIC.
This article explains the root causes of TCP sticky and half‑packet issues, designs a length‑field message protocol and a generic decoder, provides complete Java NIO code for a mini Netty framework, and discusses its startup process and current limitations.
This article explains the purpose of the /proc/sys/net/ipv4 and /proc/sys/net/core directories, lists essential TCP kernel parameters with their default and recommended values, shows how to view and modify them permanently using sysctl or echo, and provides commands for checking network interface statistics on a Linux system.
The article explains the TCP TIME_WAIT state, why it proliferates under high‑concurrency workloads, its impact on ports, memory and performance, and provides practical application‑level optimizations, cautious OS tuning, and monitoring techniques to mitigate the issue.
In the digital age, TCP's retransmission mechanisms ensure reliable data delivery by handling packet loss through timeout, fast retransmission, SACK, and D‑SACK, while adaptive RTO calculations and optimization strategies keep network performance stable across varied conditions.
This article explains Netty's internal mechanisms for buffering outbound data, flushing it to the network, handling inbound responses with NIO selectors, outlines the overall Netty workflow, and clarifies the roles of Backlog and KeepAlive parameters in TCP connections.
Understanding TCP's Selective Acknowledgment (SACK), Delayed ACK, and Round‑Trip Time (RTT) mechanisms is essential for performance and fault testing, as they improve retransmission efficiency, balance latency and bandwidth, and influence timeout calculations, enabling engineers to design precise test scenarios and optimize network reliability.
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.
This article explores the root causes of packet loss in TCP and UDP—including application bugs, kernel buffer limits, network congestion, protocol limitations, and handshake failures—and presents practical solutions such as code optimization, socket tuning, congestion‑control adjustments, and forward error correction techniques.
This article explains the core principles of TCP's retransmission mechanisms, outlines four common strategies, discusses how high retransmission rates indicate network or server issues, and provides practical methods for test engineers to diagnose, monitor, and optimize TCP reliability in performance testing scenarios.
This article explains the practical limits on how many TCP connections a Linux server or client can support, covering file‑descriptor parameters, memory consumption per socket, kernel tuning examples, and scaling calculations for large‑scale long‑connection services.
This article walks through real‑world high‑concurrency Linux network bottlenecks, explains critical kernel parameters, shows how to diagnose connection‑state issues, and provides step‑by‑step sysctl and script tweaks that dramatically reduce TIME_WAIT buildup, expand queue capacities, and double throughput for millions of simultaneous connections.
The article explains that the 65,535 limit refers only to available port numbers, while actual TCP concurrency on Linux depends on the 4‑tuple identification, memory, file‑descriptor limits, and port reuse, allowing servers to handle far more connections than the port count suggests.
This tutorial explains the basic concepts of TCP and UDP protocols, their differences, how network ports work, and demonstrates through examples whether TCP and UDP sockets can share the same port number.
This guide introduces GatewayWorker, a PHP‑based distributed TCP long-connection framework, explains its Gateway-Worker process model, and provides step-by-step Windows demo instructions for both TCP and WebSocket protocols, highlighting deployment, code changes, testing procedures, and suitable real-time communication scenarios.
This article breaks down the interview question "Can TCP and UDP use the same port?" by examining protocol-level port spaces, client‑side TCP and UDP port sharing rules, server‑side TCP reuse with SO_REUSEADDR, and UDP reuse with SO_REUSEPORT, complete with code examples and practical implications.
NodePass is an open‑source Go‑based network tunnel tool that lets developers and ops quickly create encrypted TCP/UDP bridges through firewalls and NAT, offering server/client modes, flexible encryption, zero‑config deployment, Docker images, and detailed logging for reliable remote access.
A detailed walkthrough of a friend's first‑round interview at Toutiao, covering self‑introduction, project deep‑dive, OS scheduling, TCP reliability, SQL join, and two linked‑list reversal implementations, with the exact questions and code shown.
This article uses vivid analogies to compare UDP’s fast, connection‑less, unordered packet delivery with TCP’s reliable, connection‑oriented handshake, flow control, and ordered transmission, outlining each protocol’s characteristics, advantages, drawbacks, and typical real‑time applications such as live streaming, gaming, and video calls.
This guide reviews common backend interview topics, explaining TCP TIME_WAIT behavior, multi‑port listening, full page load steps, Redis data types, Kafka consumer sizing and at‑most‑once semantics, the CAP theorem, Singleton usage, C++ std::map complexity, and an O(n) doubly‑linked list reversal algorithm.
The article explains the three key network performance metrics—latency, packet loss, and jitter—how they affect TCP behavior and application responsiveness, and offers practical insights on mitigating their impact in both long‑living and short‑lived connections.
This article explains the fundamentals of socket programming in Python, covering basic concepts such as IP addresses, ports, and protocols, and provides complete TCP and UDP server/client code examples along with common troubleshooting tips and advanced modules for building robust network applications.
This article provides a comprehensive English guide to the Transmission Control Protocol (TCP), covering its connection‑oriented design, reliability features, packet structure, three‑way handshake, data transfer process, flow and congestion control, four‑step termination, and example C++ socket code for establishing, sending, receiving, and closing TCP connections.
This comprehensive guide introduces computer networks, covering their definition, core hardware and software components, functional roles, classification, the OSI seven‑layer model, detailed TCP and UDP protocols, DNS operations, and the step‑by‑step process of a user accessing a website.
This article explains how TCP connection setup, slow‑start, delayed acknowledgments, the Nagle algorithm, TIME_WAIT and file‑descriptor limits affect HTTP performance, and shows how to tune Nginx and Linux keep‑alive settings to achieve faster, more reliable web traffic.
An AWS EC2 instance behind an Elastic Load Balancer became unresponsive due to repeated TCP out‑of‑memory errors, which were resolved by examining kernel messages, adjusting tcp_mem‑related kernel parameters, and rebooting the server after a long uptime.
This article walks through Ant Group's bonus structure, explains Java heap vs stack, String object creation, TCP packet issues, MySQL index types, B+‑tree advantages, database lock mechanisms, and shows how Zookeeper and Redis implement distributed coordination and locking, providing concrete code examples and best‑practice recommendations.
This article explains why TCP and UDP can use the same numeric port, how client and server processes manage port sharing, and the role of socket options like SO_REUSEADDR and SO_REUSEPORT in enabling high‑availability and load‑balanced networking.
This guide explains how to install iPerf on Linux, macOS, and Windows, shows basic server‑client usage, details advanced command‑line options, and provides practical examples for measuring TCP and UDP bandwidth performance.
This article contrasts the fast, connection‑less nature of UDP with the reliable, connection‑oriented TCP, outlines their key characteristics and handshake processes, and then introduces a comprehensive 570‑command Linux cheat‑sheet for administrators and developers.
This article explains the 11 TCP connection states, the three‑way handshake, the distinction between half‑open and full‑open queues, common backlog‑related problems, diagnostic commands, and key Linux kernel sysctl parameters for tuning TCP performance.
The article explains the TCP three‑way handshake, why the third ACK is essential, how servers react when it is missing, the role of timeout retransmission and RTO calculation, the impact of SYN‑Flood attacks, and how these concepts inspire backend design patterns.
This article provides an extensive overview of C++ network programming concepts frequently asked in interviews, covering sockets, TCP/UDP differences, I/O multiplexing models, handshake mechanisms, packet framing issues, concurrency strategies, code examples for servers and clients, and performance optimization techniques.
This article examines the causes and consequences of TCP half‑open and full‑connection queue saturation, explains how the Linux backlog mechanism works, and offers practical solutions for handling listen overloads, drawing on a range of technical references and real‑world troubleshooting experiences.
This article provides a comprehensive overview of the OSI model, explaining the purpose of each of its seven layers, their responsibilities, typical devices and protocols involved, and how data moves from the physical medium up to the application level.
This article explains the eleven TCP connection states, details the three‑way handshake and four‑way termination processes, compares half‑ and full‑connection queues, and provides Linux kernel parameters and commands for tuning server backlog and handling common TCP issues.
This guide explains the Linux kernel TCP parameters located under /proc/sys/net/ipv4/ and /proc/sys/net/core/, shows how to tune them with sysctl, and provides practical examples and recommended values for improving network performance and security.
This comprehensive guide walks through Go’s net package, detailing how Listener functions create servers, how Dial functions initiate client connections, the nuances of network and address formats, and the behavior of various Conn types such as TCPConn, UDPConn, IPConn, and RawConn, complete with code examples and best‑practice tips.
This article provides a comprehensive overview of Linux socket programming, covering socket definitions, classifications such as stream, datagram, and raw sockets, connection-oriented versus connectionless communication, IP/port/MAC addressing, byte order considerations, and practical C API examples for creating and using sockets.
This article debunks the common myth that a server can only handle 65,536 TCP connections by exploring the theoretical four‑tuple limits, practical constraints like file descriptors, port ranges, and memory/CPU usage, and explains how the true upper bound is far larger.
This article provides a comprehensive guide to TCP connection states, common Linux commands for monitoring them, detailed explanations of each state transition, three‑way handshake, four‑way termination, flag meanings, keep‑alive mechanisms, and practical sysctl tuning to troubleshoot network issues.
The article analyzes a mysterious production stall caused by a TCP communication bug where the D4 and D5 stages are merged, leading to a mis‑aligned length field that makes the server read an incorrect payload size, and presents two concrete fixes.
This article provides a comprehensive guide to TCP connection states, Linux commands for monitoring them, the three‑way handshake, four‑way termination, flag meanings, common pitfalls like SYN floods, and practical keep‑alive and sysctl tuning techniques for reliable network troubleshooting.
This article explains why ping and TCP may travel different network paths, covering router behavior, routing tables, OSPF, Dijkstra's algorithm, ECMP, five‑tuple hashing, packet reordering, and practical troubleshooting techniques such as traceroute and nc.
This article explains how to expose a lightweight, dependency‑free client API for a Rust‑based database by defining a simple TCP‑based JSON serialization protocol, detailing non‑functional and functional requirements, the Message and Command structures, and providing a concrete Ping command implementation in Rust.
This article explains how TCP, the reliable transport‑layer protocol, differs from HTTP, the application‑layer web protocol in terms of purpose, connection handling, and data formatting, helping readers understand why TCP underpins HTTP while each serves distinct roles on the Internet.
This article explains the purpose of TCP RST packets, how they appear during connection establishment, data transfer, firewall enforcement, and teardown, and provides practical techniques for distinguishing legitimate resets from spoofed or policy‑driven resets to improve network troubleshooting and security.
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.
A client sends 1 KB TCP packets every second with a 4 KB SO_SNDBUF while the server never calls recv(), yet the observed Send‑Q grows to 14 480 bytes, revealing how the Linux kernel doubles the buffer size, uses sk_wmem_queued, and expands write queues via GSO and memory scheduling.
The article details a mysterious production stall at 70% caused by a TCP packet length field misalignment when the configuration name is "rabbit‑TD", explains the step‑by‑step investigation using server logs and packet captures, identifies the root cause of the merged D4/D5 packets, and proposes two concrete fixes to correct the length handling.
This article explains TCP connection states, the three-way handshake and four-way termination processes, provides essential Linux commands for monitoring connections, and offers practical tips for diagnosing network issues, handling SYN floods, TIME_WAIT problems, and implementing keepalive mechanisms to maintain reliable communication.
A Linux client that sets SO_SNDBUF to 4096 bytes and sends 1 KB packets to a non‑receiving server sees the TCP Send‑Q grow to 14480 bytes, revealing how the kernel doubles the buffer size, uses sk_wmem_queued, and expands memory via GSO‑driven size goals.
This article explains what TCP RST packets are, why they appear during connection establishment, data transfer, and termination, and how to diagnose server‑side, client‑side, and firewall‑induced resets by examining sequence diagrams, common error conditions, and TTL differences.
The article explains why network protocols use layered design, details TCP's reliability and congestion‑control mechanisms, outlines HTTP status‑code categories, reviews MySQL lock scopes from global to row‑level, provides a C++ breadth‑first binary‑tree traversal example, and describes a three‑step weighing puzzle to find an odd ball.
This article explains how TCP ensures reliable data transfer through connection management, sequence and acknowledgment mechanisms, retransmission strategies, flow control, and congestion control, and includes C++ example code illustrating a simple client‑server file transfer implementation.
This article dissects the Linux kernel's TCP connection workflow, explaining how the three‑way handshake prevents stale SYN packets, and walks through the socket(), bind(), listen() and connect() system calls with detailed code analysis of the underlying kernel functions and data structures.
This article explains what TCP RST packets are, why they appear during connection establishment, data transfer, and termination, and how to analyze their causes—including server refusals, client errors, firewall policies, retransmission limits, idle timeouts, and bypass blocking—using sequence diagrams and practical diagnostics.
This article explains how TCP and UDP handle packet fragmentation, the differences between MSS and MTU, why data slicing is needed, how the Nagle algorithm works, the causes of sticky packet problems, and practical methods to avoid or resolve them in network programming.
This article explains what TCP sticky packets are, why they occur due to rapid sending, slow reading, or buffer limits, and presents practical solutions such as fixed‑length framing, delimiters, padding, and the Nagle algorithm to ensure reliable data parsing.
TCP RST packets, used to abruptly terminate or reject connections, appear at various stages—handshake, data transfer, and teardown—and can stem from server port closures, connection limits, malformed SYNs, firewall policies, timeouts, or middlebox interventions, with each scenario identifiable through detailed packet‑level analysis.
This guide explains how to implement a custom TCP protocol in PHP using Workerman for Unity3D multiplayer games, covering the sticky‑packet problem, protocol interface methods, two concrete protocol examples, and step‑by‑step testing of packet framing and splitting.
This tutorial series for newcomers explains TCP timeout retransmission, window management, and congestion control, combining theory with practical experiments using tcpdump, netstat, iptables, and Scapy, and demonstrates how Linux kernel parameters affect retransmission behavior and performance.
This article explains the Linux kernel limits that determine how many files and TCP connections a server can open, shows how to tune fs.file-max, soft/hard nofile, and fs.nr_open, estimates realistic connection counts based on memory, and provides practical configuration examples for large‑scale services.
This article explains the fundamental differences between UDP and TCP, details the TCP header fields, walks through the three‑way handshake and its necessity, describes the four‑way termination process, and illustrates the complete TCP state machine with diagrams and practical examples.
This guide explains how to prepare source and target servers, install iPerf, run it in server and client modes on Windows (or Linux), and use specific commands to measure TCP bandwidth, UDP jitter, packet loss, and network latency, including required firewall and security‑group settings.
This article explains why a TCP connection's Send‑Q can exceed the user‑set SO_SNDBUF value, detailing the kernel's double‑buffer trick, sk_wmem_queued accounting, tcp_sendmsg behavior, GSO influence, and possible ways to limit the buffer growth.
This article walks through a production‑level OceanBase connection‑timeout incident, detailing how to examine OBProxy logs, capture and analyze network packets with tcpdump and Wireshark, identify a blocked random port, and apply kernel‑parameter fixes to prevent the issue.
A Linux client sets SO_SNDBUF to 4096 bytes, sends 1 KB packets while the server never reads, yet the TCP Send‑Q grows to 14480 bytes because the kernel doubles the buffer size, adds overhead, and expands memory via GSO and sk_wmem scheduling.
This article compiles a series of technical interview questions and answers covering C++ and Go language differences, thread communication methods on Linux and Windows, stack versus heap memory, orphan processes, read‑write locks, Go goroutine concurrency, TCP three‑way handshake, and a sample SQL query for gender‑based grouping.
This article explains the complete journey of a web request—from IP addressing, DNS resolution, and CDN acceleration, through TCP stream handling and message framing, to CGI/FastCGI execution, server model choices, and the evolution of data-layer architectures for scalable applications.
The article walks through every stage of a web request—from IPv4 addressing, NAT, and DNS resolution through CDN proximity and TCP stream handling, to HTTP framing, CGI versus FastCGI processing, stateless versus stateful server models, and finally database scaling techniques such as sharding and Redis caching.
This guide walks you through preparing the environment, installing iPerf on Windows or Linux servers, running it in server and client modes, testing TCP and UDP performance, measuring latency with ping, and checking all available options to ensure reliable network bandwidth and latency measurements.
The article walks through a real‑world case where an app’s content fails to load due to MTU/MSS mismatches, explains how packet‑capture analysis reveals the problem, demonstrates ping‑based MTU testing, and shows how oversized API parameters triggered the failure.
This article explains how TCP connections are identified, the theoretical maximum numbers for client and server sides, and why real‑world limits are governed by system resources, port reuse, and server architecture rather than the 65,535 port ceiling.
This article walks through a real‑world case where an app’s content loading fails due to MTU/MSS mismatches, explains how packet captures reveal retransmissions and missing ACKs, demonstrates ping‑based MTU probing, and shows how oversized request parameters in a new version caused the issue.
This article compiles seven hands‑on Linux performance‑optimization practices, covering key factors such as CPU, memory, disk I/O, network, swap usage, and TCP tuning, and provides concrete commands and step‑by‑step troubleshooting methods for system administrators and DevOps engineers.
The intermittent timeout between cloud host A and game server B was traced to the server’s net.ipv4.tcp_tw_recycle setting, which dropped SYN packets with non‑monotonic timestamps after NAT translation, and disabling this kernel parameter restored normal connectivity.
This article explains the TCP packet fragmentation and aggregation problems, introduces Netty's various decoder mechanisms such as FixedLengthFrameDecoder, LineBasedFrameDecoder, DelimiterBasedFrameDecoder, LengthFieldPrepender, and LengthFieldBasedFrameDecoder, and provides detailed configuration examples and code snippets for implementing robust TCP protocols.
To handle high‑traffic web workloads, the default Linux kernel settings must be adjusted; this guide explains the key sysctl parameters—such as file‑max, tcp_tw_reuse, tcp_keepalive_time, and buffer sizes—and how to apply them for optimal Nginx concurrency.
This article explains how QUIC, a UDP‑based transport protocol developed by Google, overcomes TCP's limitations such as handshake latency and head‑of‑line blocking, offering lower latency, multiplexing, built‑in TLS 1.3 security, and why it powers the emerging HTTP/3 standard.
This article provides a comprehensive overview of the OSI model, detailing each of its seven layers—from the physical and data link layers up to the application layer—explaining their functions, protocols, and how they interact to enable network communication.
This comprehensive guide covers TCP fundamentals—including differences from UDP, the three‑way and four‑way handshakes, half‑open queues and SYN flood attacks, header fields, Fast Open, timestamps, RTO calculation, flow and congestion control, Nagle algorithm, delayed ACKs, and keep‑alive mechanisms—providing clear explanations and practical examples for engineers.
Linux system performance depends on CPU, memory, disk I/O, network, kernel parameters, and hardware, and troubleshooting requires comprehensive checks using tools like top, vmstat, iostat, netstat, perf, and sysctl, with step‑by‑step guidance for identifying bottlenecks, optimizing resources, and tuning TCP settings.
A Linux client sets SO_SNDBUF to 4096 bytes and sends 1 KB packets while the server never receives them, yet the TCP Send‑Q grows to 14480 bytes, prompting an in‑depth analysis of kernel buffer accounting, double‑sized send buffers, and tcp_sendmsg behavior.
This guide explains the key factors that affect Linux system performance, provides step‑by‑step troubleshooting methods for CPU, memory, disk I/O and network issues, shows how to identify top resource‑hungry processes, clarifies memory reporting differences, discusses swap usage scenarios, and offers concrete TCP tuning parameters for production environments.
This article explains TCP packet fragmentation and aggregation (sticky/unsticky packets), demonstrates the phenomena with examples, and provides detailed solutions using Netty's built‑in decoders such as FixedLengthFrameDecoder, LineBasedFrameDecoder, DelimiterBasedFrameDecoder, and LengthFieldBasedFrameDecoder, including code samples and configuration tips.
This article explains why the TCP Send‑Q can grow beyond the user‑set SO_SNDBUF value by examining the kernel’s double‑buffer accounting, sk_wmem_queued handling, and the interaction of tcp_sendmsg with GSO, supported by code excerpts and diagrams.
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.
This article explains the fundamentals of TCP, why raw TCP communication faces issues like message boundary ambiguity, how HTTP and RPC are built on TCP as application‑layer protocols, and compares their use cases, performance, and evolution to help developers choose the right protocol for their systems.
This article uses a playful story of a Linux process to explain the real limits on TCP connections, covering the configurable port range, file descriptor caps, thread model constraints, memory usage, and CPU saturation, and shows how to adjust these limits on a Linux server.
This article presents a complete Netty TCP client demo for an IoT project, explaining the project background, architecture, modules, business flow, and detailed Java code—including a local queue, thread pool, client initialization, handler logic, and test controllers—along with deployment notes and source links.
The article investigates why MySQL batch jobs experience aborted connections, tracing the issue to TCP buffer overflow on the client side, excessive ACK traffic, and the default net_write_timeout of 60 seconds, and proposes kernel tweaks and query optimizations to resolve the problem.