Skip to content
ADHDecode
  1. Home
  2. Articles
  3. TCP

TCP Articles

44 articles

TCP Keepalive: Detect Dead Connections with tcp_keepalive

TCP Keepalive is a mechanism to detect when a connection has gone "stale" or "dead" without being explicitly closed, ensuring resources aren't held up i.

4 min read

TCP Kernel Parameters: Essential sysctl Tuning Guide

The TCP kernel parameters aren't just knobs to tweak; they're the fundamental rules that govern how your machine talks on the network, and most of them .

4 min read

TCP Load Balancing with LVS: Layer 4 Setup

LVS can actually do more than just simple round-robin; it can perform content-aware load balancing at Layer 7 if you feed it the right information.

3 min read

TCP in Microservices: Service Mesh and Direct Connections

TCP in Microservices: Service Mesh and Direct Connections — practical guide covering tcp setup, configuration, and troubleshooting with real-world examp...

2 min read

TCP MTU Path Discovery: Find and Fix Fragmentation Issues

This whole mess starts when your packets are too big for some hop on the network and get dropped, not because the network is broken, but because a piece.

5 min read

TCP Nagle Algorithm: Disable TCP_NODELAY for Low Latency

Disabling TCPNODELAY, which is often referred to as disabling the Nagle algorithm, can actually increase latency in certain scenarios, contrary to what .

4 min read

TCP Diagnostics with netstat and ss: Find Connection Issues

TCP Diagnostics with netstat and ss: Find Connection Issues — practical guide covering tcp setup, configuration, and troubleshooting with real-world exa...

4 min read

TCP Performance Tuning on Linux: sysctl and Socket Options

Linux's TCP stack is surprisingly opinionated about how much data it should buffer, and often, its defaults are way too conservative for high-performanc.

3 min read

TCP SO_REUSEADDR and SO_REUSEPORT: Allow Port Reuse

SOREUSEADDR and SOREUSEPORT let multiple processes bind to the same IP address and port combination, but they do it in fundamentally different ways, wit.

3 min read

Troubleshoot TCP in Production: Capture and Analyze

TCP connections are silently failing in production, and you're seeing intermittent packet loss or connection resets that don't make sense.

3 min read

TCP Protocol Fundamentals: Reliability, Order, Flow Control

The TCP protocol doesn't actually guarantee delivery; it guarantees efforts towards delivery, using a clever dance of acknowledgments and retransmission.

2 min read

TCP Proxy with HAProxy: L4 Load Balancing Config

HAProxy can do more than just HTTP load balancing; it's a beast at L4 TCP load balancing too, and it's surprisingly simple to get going.

2 min read

TCP Security Best Practices: SYN Cookies and Hardening

SYN cookies are a clever defense against SYN flood attacks, a common denial-of-service tactic where an attacker bombards a server with TCP SYN packets, .

3 min read

TCP Selective Acknowledgment SACK: Efficient Retransmit

TCP Selective Acknowledgment SACK is a mechanism that allows a TCP receiver to inform the sender about which segments have been received and which are m.

3 min read

TCP Server-Client Architecture: Build Reliable Services

TCP Server-Client Architecture: Build Reliable Services — Imagine a TCP server and client. It's not just about sending data; it's about guaranteeing del...

2 min read

TCP Slow Start and CWND: Congestion Window Explained

TCP's congestion window, CWND, isn't just a buffer size; it's the dynamically adjusted throttle that prevents the internet from grinding to a halt.

3 min read

SSH over TCP: How Secure Shell Uses TCP

SSH uses TCP's reliable, ordered, and error-checked delivery to ensure your commands and data arrive intact, even if the network is a bit messy.

3 min read

TCP SYN Flood Protection: Enable SYN Cookies

TCP SYN Flood Protection: Enable SYN Cookies — practical guide covering tcp setup, configuration, and troubleshooting with real-world examples.

3 min read

TCP_NODELAY Option: Disable Nagle for Real-Time Apps

The TCPNODELAY option isn't about disabling Nagle; it's about telling Nagle to stop waiting for a full segment before sending data.

3 min read

tcpdump for TCP: Capture and Debug TCP Flows

tcpdump is your best friend when TCP is acting up, letting you see the raw handshake, data, and teardown exactly as it happens on the wire.

4 min read

TCP Threading vs Async: Choose the Right Concurrency Model

TCP Threading vs Async: Choose the Right Concurrency Model — practical guide covering tcp setup, configuration, and troubleshooting with real-world exam...

3 min read

TCP Three-Way Handshake: SYN, SYN-ACK, ACK Explained

The TCP three-way handshake isn't just about establishing a connection; it's a sophisticated negotiation that guarantees reliable data transfer by ensur.

2 min read

TCP TIME_WAIT: Reduce and Manage Connection Recycling

The TIMEWAIT state is the lingering ghost of a closed TCP connection, and its proliferation can cripple your server's ability to accept new connections.

4 min read

TCP Timestamps Option: PAWS and RTT Measurement

TCP Timestamps option TSOPT is a crucial, yet often misunderstood, mechanism that enables two key functionalities: Protection Against Wrapped Sequence n.

4 min read

TLS over TCP: How TLS Wraps Your TCP Connection

TLS over TCP: How TLS Wraps Your TCP Connection — practical guide covering tcp setup, configuration, and troubleshooting with real-world examples.

3 min read

TCP vs QUIC: Why UDP-Based QUIC Beats TCP for Web

QUIC might seem like a strange choice for building a reliable transport protocol because it runs over UDP, a protocol that offers no reliability guarant.

2 min read

TCP vs UDP: Choose Based on Reliability and Latency Needs

TCP vs UDP: Choose Based on Reliability and Latency Needs — practical guide covering tcp setup, configuration, and troubleshooting with real-world examp...

4 min read

TCP Window Scaling: Enable for High-Bandwidth Long-Delay Links

TCP Window Scaling is a mechanism that allows the TCP receive window size to be larger than 64KB, which is the original maximum defined in RFC 793.

3 min read

TCP Analysis in Wireshark: Decode Streams and Errors

Wireshark can decode TCP streams, letting you see the actual conversation between two hosts, but it's often more useful for finding what went wrong.

5 min read

TCP BBR Congestion Algorithm: Enable and Tune for Throughput

BBR's core innovation isn't about making congestion control smarter, but about bypassing congestion control altogether when possible.

2 min read

TCP Buffer Sizes: Tune rmem and wmem for High Throughput

The most surprising thing about TCP buffer tuning is that more isn't always better, and the optimal values depend heavily on network latency, not just r.

3 min read

TCP Concurrent Server Design: Threads vs epoll

Threads and epoll are two fundamentally different approaches to building concurrent network servers, and the "better" choice depends entirely on the wor.

3 min read

TCP Congestion Control: CUBIC, BBR, and RENO Compared

TCP's congestion control algorithms are the unsung heroes of the internet, and the fact that your browser can download a large file without the connecti.

2 min read

TCP Connection Pooling: Reuse Connections for Performance

TCP connection pooling allows applications to reuse existing TCP connections instead of establishing new ones for every request, significantly reducing .

3 min read

TCP Connection States: ESTABLISHED, TIME_WAIT, CLOSE_WAIT

ESTABLISHED, TIMEWAIT, and CLOSEWAIT are states a TCP connection can be in. tcpdump -i lo 'tcp port 8080 and tcptcpflags & tcp-ack | tcp-ack

3 min read

TCP in Container Networking: Docker, Kubernetes, Cilium

TCP's behavior inside container networking stacks, especially when managed by orchestrators like Kubernetes and advanced CNI plugins like Cilium, often .

4 min read

TCP in Enterprise Architecture: Load Balancing and Proxies

TCP load balancing is less about distributing traffic and more about managing state across a fleet of services, often in ways that break common assumpti.

2 min read

TCP epoll and kqueue: High-Performance I/O Multiplexing

epoll and kqueue aren't just about doing I/O faster; they fundamentally change how you think about managing network connections.

6 min read

TCP File Transfer: Tools and Performance Optimization

TCP file transfer is surprisingly inefficient for large files because it's fundamentally designed for interactive, small-packet communication.

3 min read

TCP Flow Control: Sliding Window and Receiver Buffer

TCP flow control is actually a mechanism designed to prevent a fast sender from overwhelming a slow receiver, but the way it achieves this is by making .

3 min read

TCP Four-Way Termination: Graceful Connection Close

TCP Four-Way Termination: Graceful Connection Close — practical guide covering tcp setup, configuration, and troubleshooting with real-world examples.

2 min read

TCP Half-Open Connections: Detect and Clean Up

A TCP half-open connection is a connection where one side thinks it's still connected, but the other side has already closed its end, leading to resourc.

4 min read

TCP High Connection Scaling: Tune for 1M+ Connections

The surprising truth about scaling to a million TCP connections is that it's less about the sheer number of connections and more about how efficiently t.

5 min read

HTTP over TCP: Connection Lifecycle and Pipelining

HTTP, despite its name, isn't a transport protocol; it's an application-layer protocol that uses TCP for reliable, ordered delivery of messages.

4 min read
ADHDecode

Complex topics, finally made simple

Courses

  • Networking
  • Databases
  • Linux
  • Distributed Systems
  • Containers & Kubernetes
  • System Design
  • All Courses →

Resources

  • Cheatsheets
  • Debugging
  • Articles
  • About
  • Privacy
  • Sitemap

Connect

  • Twitter (opens in new tab)
  • GitHub (opens in new tab)

Built for curious minds. Free forever.

© 2026 ADHDecode. All content is free.

  • Home
  • Learn
  • Courses
Esc
Start typing to search all courses...
See all results →
↑↓ navigate Enter open Esc close