This article explains TCP basics, why raw TCP communication has boundary issues, how custom protocols like HTTP and RPC are built on TCP, and compares their purposes, performance, and usage scenarios in modern software architecture.
This article explains what ports are, why they are essential for web and other services, how default ports work, the role of ports in inter‑process communication, and how they relate to concepts like naming services and inversion of control.
This comprehensive guide reviews essential network and operating system concepts for technical interviews, covering TCP three‑way handshake, four‑way termination, OSI/TCP‑IP models, common protocols, socket communication, process vs thread, IPC mechanisms, memory management, page‑replacement algorithms, and HTTP/HTTPS differences.
This article explains step‑by‑step what occurs when a user types a URL and presses Enter, covering URL parsing, DNS resolution, TCP three‑way handshake and four‑way termination, HTTP request/response formation, and the browser’s rendering process, providing interview‑ready insights into web networking fundamentals.
This article explains the core characteristics of TCP and UDP, compares their reliability and connection models, clarifies the concept and range of port numbers, and demonstrates that both protocols can share the same port without conflict, illustrated with real‑world examples such as DNS.
This article explores the fundamentals of TCP communication, explains why raw TCP lacks message boundaries, and compares HTTP and RPC protocols—covering their histories, use cases, service discovery, connection handling, serialization, and performance trade‑offs—to answer why both coexist in modern software architectures.
This article consolidates community‑sourced Linux performance optimization practices, covering key factors that affect system speed, rapid troubleshooting steps for CPU, memory, disk and network issues, load‑analysis methods, top‑resource identification commands, memory‑stat nuances, swap usage scenarios, and detailed TCP tuning recommendations.
This article provides a comprehensive overview of the Transmission Control Protocol (TCP), covering its connection‑oriented design, reliability mechanisms, three‑way handshake, four‑step termination, packet structure, flow and congestion control, and practical C++ socket examples for establishing, sending, receiving, and closing connections.
Ports act as an essential indirection layer that maps network requests to specific processes, enabling protocols like HTTP and HTTPS to function, while default ports simplify user interaction; this article explains common ports, default values, the role of IPC, naming services, and how ports embody inversion of control principles.
This article explains the fundamentals of TCP RST packets, distinguishes active and passive resets, outlines common kernel scenarios that generate them, and provides practical debugging methods using tcpdump, bpftrace, and source‑code analysis to resolve real‑world network incidents.
This article explains what ports are, why default ports like 80 and 443 exist, how ports enable inter‑process communication, act as a naming service and an indirection layer, and why they are essential for both web and non‑web services.
This article explains the role of protocol numbers in IP headers, introduces common network protocols such as ICMP, TCP, UDP, GRE, and VRRP with their assigned numbers and typical use cases, and shows how to locate the official list via IANA for troubleshooting and configuration.
This article explains the TCP socket programming interface, detailing server and client API functions, their purposes, the three‑way handshake, state transitions, data transmission, segmentation, sticky‑packet issues, and the four‑way termination process, providing code examples and diagrams for clear understanding.
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.
TCP (Transmission Control Protocol) is a connection-oriented, reliable, byte-stream transport layer protocol that ensures ordered, error-free data delivery through mechanisms such as three-way handshake, four-way termination, flow control, and congestion control, making it essential for web browsing, email, and online gaming.
The article analyzes how TCP's three‑way handshake, slow‑start, and initial congestion window can introduce extra round‑trip times, causing service latency to far exceed network RTT, and shows practical packet captures, Linux defaults, and mitigation techniques.
This guide explains why SSH connections may close due to TCP timeouts, describes the relevant kernel parameters, and provides step‑by‑step client and server configuration instructions for Linux and Windows to keep SSH sessions active without interruption.
TCP (Transmission Control Protocol) is a core Internet protocol that ensures reliable data transmission through mechanisms such as three‑way handshake, flow and congestion control, segmentation and reassembly, and error detection, while also facing challenges like latency, packet loss, and emerging real‑time application demands.
A single server‑side process can theoretically handle up to 2^48 (≈2.8×10^14) TCP connections, but Linux file‑descriptor limits and memory consumption (about 3.44 KB per connection) restrict real‑world capacity to a few million connections per 8 GB machine, while a whole server’s total is bounded by the same resource constraints despite the much larger theoretical maximum.
The article analyzes how TCP's congestion control and slow‑start mechanisms introduce extra round‑trip times, causing service latency to far exceed network RTT, and explains how TCP connection setup, cwnd limits, and long‑lived connections affect overall response times.
This article provides a comprehensive overview of core network protocol structures—including TCP, UDP, IPv4/IPv6, IPSec, Ethernet, 802.1Q, 802.11, SSL, RTP, and OpenFlow—detailing their header fields, functions, and security mechanisms to help readers grasp essential networking concepts.
This article walks through implementing a Redis pipeline client in Go, explaining how to reuse a single TCP socket for multiple requests, preserve send‑receive order, and handle sending, receiving, heartbeats, and reconnection with a concise 200‑line codebase.
This article presents a complete Netty TCP client demo that uses a local BlockingQueue to simulate a message broker, applies Redis distributed locks to prevent duplicate connections, integrates Spring Boot 2.2.0, and provides detailed code, workflow, and testing instructions for developers.
This article compiles common technical interview questions for bank software positions, covering Java fundamentals, MySQL storage engines and indexes, thread‑pool parameters, HTTP GET/POST differences, TCP vs UDP characteristics, session and cookie handling, Redis data types, and C++ memory management, providing concise explanations and examples for each topic.
This article walks through implementing the Redis Serialization Protocol (RESP) in Go as part of the EasyRedis project, detailing the protocol format, parsing logic, connection handling, and a demo showing how standard redis-cli commands are encoded and processed.
This article walks through creating a lightweight Redis clone named EasyRedis in Go, covering a producer‑consumer logger, .conf file parsing with reflection, a TCP server with graceful shutdown, and demonstrates the running service via telnet, with all source code available on GitHub.
This article compiles essential backend interview questions and answers covering MySQL storage engines and indexes, Redis persistence modes, Java collection frameworks and HashMap internals, thread‑safe ConcurrentHashMap implementations, as well as HTTP message structure and TCP reliability mechanisms, providing a thorough review for candidates preparing for backend positions.
The article examines the scalability limitations of the Linux kernel TCP/IP stack, comparing its packet‑processing and connection‑setup performance with user‑space stacks such as mTCP and F‑Stack, explains how hash‑table locking and spin‑lock contention cause poor CPS scaling, and argues why user‑space implementations often achieve higher throughput despite their own trade‑offs.
This article investigates a rare TCP four‑handshake disorder where out‑of‑order FIN and ACK packets cause a server to wait for a timeout before closing, detailing packet captures, kernel code analysis, eBPF monitoring, and the discovery that the shutdown() call versus close() triggers the issue.
This article explains how Linux kernel parameters, memory size, and file descriptor limits determine the maximum number of TCP connections a server or client can handle, provides configuration examples for increasing those limits, and discusses practical considerations such as port ranges and connection overhead.
This article explains the fundamentals of sockets as a network communication abstraction, covering process communication, TCP/UDP protocols, socket descriptors, key system calls, the TCP three‑way handshake and four‑way termination, Linux kernel basics, and provides complete C examples for a server and client.
This article presents a complete Netty TCP client demo built with Spring Boot, detailing the project architecture, module layout, business flow, key code implementations—including a local BlockingQueue, message processing with Redis locks, client initialization, handler logic, and testing endpoints—providing a practical reference for backend developers.
This article presents a complete Netty TCP long‑connection demo built with Spring Boot 2.2.0 and Redis, explains the project architecture, module layout, business flow using a local BlockingQueue instead of RocketMQ, and provides detailed source code for the queue holder, processing logic, client implementation, handler, and test controllers.
This article provides a comprehensive overview of computer networking fundamentals, including C/S and B/S architectures, OSI layers, TCP/UDP protocols, socket programming, code examples, and the concepts of synchronous, asynchronous, blocking, and non‑blocking I/O in Linux.
This article examines the technical reasons behind TCP's design as a stream-oriented transport protocol, contrasting it with a packet-oriented approach, and explores the implications for lower and upper layers, packet sizing, application-layer framing, and alternative solutions such as UDP, QUIC, and custom protocols.
TCP and UDP are core transport-layer protocols of the Internet; this article explains their basic concepts, characteristics, reliability mechanisms, flow and congestion control, three-way handshake and four-way termination for TCP, and highlights the strengths and weaknesses of each protocol for various applications.
This article explains the TCP/IP protocol suite, detailing its four layers—link, network, transport, and application—along with key protocols such as IP, TCP, UDP, ARP, ICMP, DNS, and the mechanisms of packet encapsulation, routing, flow and congestion control, and connection management.
An in‑depth guide walks through TCP basics, why raw TCP lacks message boundaries, how HTTP and RPC build on TCP, and compares their service discovery, connection handling, and serialization, revealing why both protocols coexist in modern client‑server architectures.
This article explains the fundamentals of the Domain Name System (DNS), covering domain and name‑server concepts, the hierarchical resolution process, recursive and iterative queries, performance‑enhancing techniques such as UDP usage, caching, and switching to public DNS servers, and details DNS record types and packet structure.
This article explains the fundamentals of TCP, why pure TCP communication faces boundary issues, how HTTP and RPC are built on TCP as application‑layer protocols, and compares their architectures, service discovery, serialization, and performance to clarify when each should be used.
This article explains TCP connection basics, the three‑way handshake and four‑way termination, compares short and long connections, discusses keep‑alive mechanisms, and outlines when to use each approach in network and HTTP communication.
This article explains how the Linux kernel maintains the SYN (half‑connection) and Accept (full‑connection) queues during the TCP three‑way handshake, describes their size limits, overflow handling, and common defenses against SYN‑flood attacks.
This article explains what Netty is, why it’s essential for Java back‑end development, details its core components and high‑performance mechanisms such as the Reactor model, Zero‑Copy and object pooling, and shows how Netty handles TCP framing issues with practical decoding solutions.
TCP connections can be either short-lived, closing after a single request‑response cycle, or long-lived, staying open for multiple exchanges; this article explains their handshake processes, advantages, drawbacks, typical use cases, reasons long connections drop, and practical strategies such as keepalive and reconnection to maintain reliability.
This article explains the concept of network packet loss, walks through the sending and receiving mechanisms of Ethernet frames, and provides a comprehensive, layer‑by‑layer checklist—including hardware NIC, driver, kernel, IP, TCP/UDP, and application‑level diagnostics—plus concrete Linux commands and configuration tweaks to locate and fix the root cause.
This article explains how a mobile app’s search query travels across the internet, detailing the roles of DNS resolution, CDN caching, HTTP communication, TCP connections, and load‑balancing mechanisms, and shows how each layer contributes to delivering results to the user.
This article investigates a MySQL 8.0 TDSQL client experiencing connection interruptions during batch streaming, analyzes error 1161 (ER_NET_WRITE_INTERRUPTED) root causes in the MySQL source code, presents debugging steps with log and packet captures, and offers practical mitigation recommendations.
This article explains how unstable network conditions cause TCP disconnections in video conferencing, and provides detailed guidance on TCP/IP heartbeat mechanisms, packet loss retransmission, socket keep‑alive configuration, libwebsockets integration, and non‑blocking connect timeout control with code examples.
This article explains the transport layer’s core protocols—TCP and UDP—detailing their functions, differences, port numbers, connection establishment, reliability mechanisms, flow and congestion control, and how applications use client‑server models to communicate over networks.
This article explains the fundamentals of TCP connections, detailing the three‑way handshake, four‑step termination, the differences between short‑lived and persistent (long) connections, their advantages, keep‑alive mechanisms, and practical guidelines for choosing the appropriate connection type in various network scenarios.
This article provides a comprehensive guide on building a network port scanner using Python, covering implementation principles, code examples, and practical usage instructions.
This article explains how unstable network conditions cause TCP disconnections in video conferencing, then details TCP/IP heartbeat mechanisms, ACK handling, keepalive parameter tuning, libwebsockets integration, packet loss retransmission, and non‑blocking socket connect timeout control with code examples.
This article explains what microservices are, when they should be used, their pros and cons, communication patterns, why Node.js is a good fit, and provides a detailed NestJS‑based implementation with code examples for building, testing, and exposing a user‑management microservice through an API gateway.
This article provides a comprehensive overview of TCP and UDP protocols, covering TCP header fields, flow and congestion control mechanisms, three-way handshake and four-way termination, reliability guarantees, as well as a detailed comparison with UDP, including connection orientation, broadcast support, and header overhead.
Facing frequent packet loss and network jitter that disrupts video conferences, this article examines TCP/IP stack heartbeat and retransmission mechanisms, demonstrates how to configure Windows keepalive parameters, and provides code examples for custom socket options and non‑blocking connect timeouts to maintain session continuity within 60 seconds.
This comprehensive guide walks you through the OSI seven‑layer model, explains TCP and UDP fundamentals, details the three‑way handshake and four‑way termination, compares long and short connections, introduces heartbeat packets, and demonstrates how to build a custom protocol and a socket connection pool in Node.js.
This guide explains how to install iperf on Windows and Linux, configure it for TCP and UDP bandwidth testing, adjust UDP buffer settings, and interpret the resulting performance metrics, providing practical command examples and visual output for accurate network performance analysis.
This article explains the OSI seven‑layer model, the principles and handshake processes of TCP and UDP, the differences between them, the concept of long‑living socket connections with heartbeats, custom application‑layer protocols, and how to implement a reusable socket connection pool in Node.js.
This article walks developers through network protocol fundamentals, explaining the OSI seven‑layer model, TCP three‑handshake and four‑teardown processes, UDP characteristics, long‑vs‑short connections, heartbeat mechanisms, custom protocol design, and a practical Node.js socket connection‑pool implementation.
This article explains the OSI seven‑layer model, the differences between TCP and UDP, the three‑way handshake and four‑step termination processes, long‑living socket connections, heartbeat mechanisms, custom application‑layer protocols, and how to implement a socket connection pool using Node.js.
The SRE team diagnosed an in‑flight Wi‑Fi outage for the DeWu e‑commerce app by reproducing the problem, capturing packets with ping, traceroute and tcpdump, discovered a firewall rule misclassifying the domain as a download site, and resolved it through a vendor‑issued policy update, restoring connectivity on both ATG and SATCOM links.
This article explains Suricata's packet‑decoding pipeline, detailing how Ethernet frames, IP datagrams, TCP segments and UDP datagrams are parsed from raw traffic, and shows the relevant source‑code structures used in the open‑source IDS.
An in‑depth tutorial demonstrates building a Netty‑based TCP client with Spring Boot, covering project architecture, module layout, message‑queue simulation, detailed Java code for client creation, connection handling, and testing endpoints, providing a complete, production‑ready demo for IoT socket communication.
This article explains how Linux limits the number of open files and TCP connections on a server, details the key kernel parameters (fs.file-max, soft/hard nofile, fs.nr_open), provides configuration examples, and analyzes how memory and port ranges determine realistic connection capacities for both servers and clients.
This guide introduces Swoole, a high‑performance asynchronous PHP framework for IoT, and walks through installing the extension, building TCP and WebSocket servers, performing asynchronous file I/O, and leveraging coroutines with complete code examples.
This article presents a complete Netty‑based TCP client/server demo for IoT long‑connection messaging, explains the project architecture, module layout, business flow, and provides detailed Java code for a local message queue, multithreaded processing, client creation, handler logic, and testing endpoints.
This article explains how to identify the root causes of increased network latency on Linux servers by using tools such as hping3, traceroute, wrk, tcpdump, and Wireshark, demonstrating step‑by‑step measurements, analysis of TCP delayed acknowledgments, and practical recommendations for mitigating latency in production environments.
This article explains how TCP Window Full warnings indicate a full receiver window, how to interpret Wireshark's Expert Information, locate the relevant packets, calculate bytes in flight, and use graphs to diagnose and verify the impact on transfer speed.
This article explains the structure of HTTP/1.1 request and response messages, the limitations of TCP such as head‑of‑line blocking, the evolution from SPDY to HTTP/2 with binary framing, multiplexed streams, header compression, server push, ALPN negotiation, and practical Wireshark capture techniques for HTTP/2 traffic.
This article walks through a real‑world case of slow file copying between Beijing and Shanghai data centers, explains why Wireshark reports “TCP Window Full”, shows how to locate the relevant packets, calculate bytes‑in‑flight, and assess the impact on transfer speed using I/O graphs and window‑scaling analysis.
This article examines a real‑world case where TCP Window Full warnings appear during a Beijing‑to‑Shanghai file copy, explains how Wireshark derives the alert, shows how to manually verify bytes‑in‑flight, and discusses the impact on transfer speed and how to interpret related TCP metrics.
This comprehensive guide delves into TCP’s core mechanisms—including header fields, segmentation and reassembly, the three‑way handshake and four‑step termination, sliding‑window flow and congestion control, retransmission strategies, and connection design patterns—providing a solid foundation for network engineers and developers.
This article explains Linux's socket networking framework, details BSD Socket APIs, the abstraction and VFS layers, protocol families, and provides comprehensive guides with code samples for creating, configuring, and using TCP and UDP sockets in C.
This article explains why home networks use private 192.168.x.x addresses, how NAT devices translate private IPs to a single public IP, the detailed SNAT/DNAT processes, the role of ports in NAPT, and how these mechanisms enable inbound connections through techniques like NAT hole punching and intranet penetration.
While TCP’s 16‑bit port range suggests a theoretical limit of 65,535 connections, real‑world server concurrency depends on factors like memory, file descriptor limits, port reuse, and operating‑system constraints, allowing modern Linux servers to support hundreds of thousands or even millions of simultaneous connections.
This comprehensive guide walks you through the TCP/IP protocol suite, covering the four-layer model, data link, network, transport, and application layers, and explains key protocols such as IP, ARP, ICMP, TCP, UDP, DNS, as well as connection management, flow control, and congestion control techniques.
This article explains how TCP full and half‑open connection queues work on Linux, why they overflow when the number of connections grows, and provides practical commands and kernel parameter adjustments such as backlog, somaxconn, and tcp_max_syn_backlog to resolve the issue.
This article presents a comprehensive Netty TCP demo project, covering its architecture, module layout, business flow, detailed Java code for message queuing, client execution, handler implementation, testing endpoints, and deployment considerations, providing a practical learning resource for backend developers.
This article explains how to diagnose low network throughput by examining sender, receiver, and intermediate bottlenecks, understanding TCP flow and congestion windows (rwnd and cwnd), using Linux ss commands, and interpreting Wireshark visualizations to pinpoint the root cause.
This article compiles a detailed interview guide covering TCP/UDP differences, three‑way handshake and four‑way termination, flow and congestion control, select/poll/epoll mechanisms, zero‑copy techniques, Redis advantages and persistence, MySQL MVCC and repeatable‑read semantics, as well as core C++ topics and common algorithm questions.
This article explains the fundamentals of network protocols, the OSI seven‑layer model, TCP three‑handshake and four‑teardown processes, differences between TCP and UDP, socket long‑connections, custom protocol design, and how to implement a reusable socket connection pool in Node.js.
The article explains how HTTP/3 abandons TCP in favor of the QUIC protocol built on UDP, detailing TCP's head‑of‑line blocking, handshake latency, middlebox rigidity, and how QUIC’s reliability, multiplexing, and fast handshakes address these issues while also noting deployment challenges.
The article explains that the 65,535 TCP port limit does not bound a Linux server’s concurrent connections, detailing how TCP connections are identified, the theoretical maximum of 2⁴⁸ connections for a server, and the practical constraints imposed by memory and file‑descriptor limits.
The article explains how TCP connections are identified by a four‑tuple, why the theoretical maximum client connections are 65,535 due to port limits, how servers can theoretically handle up to 2⁴⁸ connections, and why real‑world concurrency is constrained by memory, file descriptors and port reuse rather than the 65535 port count.
This article walks through a complete TCP connection example in Node.js, detailing server and client code, the three-layer Node.js architecture (JS, C++, C), the initialization process, Libuv’s event‑loop phases, task scheduling, I/O models, and how Node.js maintains non‑blocking, concurrent connections.
The article explains how modern browsers handle TCP connections and HTTP requests, covering persistent connections, the limits of HTTP/1.1 pipelining, the advantages of HTTP/2 multiplexing, and browser-imposed limits on simultaneous connections per host.
The article explains that during TCP's three‑way handshake, if a client receives a SYN‑ACK with an unexpected acknowledgment number, it must send an RST to abort the stale connection, because silently discarding the packet would cause long retransmission delays and prevent the new connection from being established.
This article explains what happens when a client attempts a TCP connection to an IP address that does not exist or to a valid IP where the target port is not listening, covering ARP failures, SYN retransmissions, RST responses, and the importance of solid networking fundamentals for interview preparation.
An in‑depth look at HTTP’s origins, its client‑driven request‑response design, the evolution of headers, length‑ and delimiter‑based streams, and the successive enhancements from HTTP/0.9 through HTTP/1.1 to HTTP/2, SPDY, and HTTP/3, explaining the motivations behind each change.
This guide walks through setting up a three‑host Linux environment, using Docker, hping3, sar, tcpdump and iptables to reproduce a SYN‑Flood DDoS attack, analyze its impact with network tools, and apply kernel and firewall tweaks to mitigate the attack.
This article walks through setting up a Starwift cloud‑native data warehouse on JD Cloud, configuring network access, installing the ClickHouse client on macOS, and demonstrates both TCP and HTTP Rust integrations with example code, while noting common dependency conflicts.
This article explores the design motivations behind HTTP, tracing its evolution from the early TCP‑based request‑response model through HTTP/0.9, 1.0, 1.1, to modern HTTP/2 and HTTP/3, highlighting key features like headers, caching, connection reuse, and protocol optimizations.
This article explores Linux kernel TCP connection handling by examining socket data structures, port range and file descriptor tuning, core functions like tcp_v4_rcv, and lookup mechanisms, while offering practical tips to boost client-side concurrent connections beyond traditional limits.
This article explains the fundamentals of Linux network latency, demonstrates how to measure round‑trip time using ping, traceroute, hping3 and wrk, walks through a Docker‑based test setup, and shows how to analyze packet captures with tcpdump and Wireshark to uncover causes such as TCP delayed ACK.
This article explains the essential concepts of TCP and UDP, covering the OSI model layers, socket communication, reliable transmission mechanisms such as stop‑and‑wait and sliding‑window, congestion control, connection establishment, and practical differences between TCP and UDP, providing a comprehensive networking fundamentals overview.
This article explains how TCP/IP functions as a collection of standard components—such as DNS, IP, ARP, TCP, UDP, and TLS—using a step‑by‑step example of a browser accessing zhihu.com, and clarifies each protocol's role, interactions, and quirks.
An in‑depth comparison of HTTP Keep‑Alive (application‑layer persistent connections) and TCP Keepalive (kernel‑level health checks), covering their implementation layers, usage, configuration, timeout handling, and impact on performance, with clear diagrams and code examples to help developers master both mechanisms.
The article explains how TCP connections are identified by a four‑tuple, clarifies the theoretical maximum of 65,535 client ports versus the far larger possible server connections, and discusses practical limits imposed by memory, file descriptors, and system configuration on Linux servers.