Interview Prep/Networking/Kubernetes, Containers, MTU & Performance Basics

What is Path MTU Discovery and what is an MSS clamp?

AdvancedConceptKubernetes, Containers, MTU & Performance Basics
Answer

Senders set the Don't Fragment bit; a router that cannot forward the packet returns ICMP "fragmentation needed" with its MTU, and the sender lowers its segment size. If ICMP is filtered, the sender never learns and the connection black-holes.

MSS clamping rewrites the TCP MSS option during the handshake so endpoints never send too-large segments:

iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
All Networking questions Roadmap: Networking for DevOps

More on Kubernetes, Containers, MTU & Performance Basics