Troubleshooting Intermittent HTTPS Timeouts and MTU Black Holes
Scenario Prompt:
“Microservices communicating over a new IPSec VPN tunnel connect successfully for health checks (HTTP GET /health returns 200), but large POST requests with payloads > 1500 bytes hang indefinitely and time out. What is the root cause and how do you verify it?”
Substantive Technical Concepts to Hit:
Path MTU Discovery (PMTUD) Black Hole
IPSec tunneling encapsulates packets, adding 50-70 bytes of overhead. If the outer packet exceeds the 1500-byte MTU and intermediate routers drop ICMP "Fragmentation Needed" packets, large packets are silently blackholed.
Testing with Ping Sweep
Run ping -M do -s 1422 <destination_ip> to find the exact maximum transmission unit that passes through the tunnel without fragmentation.
TCP MSS Clamping
Apply iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu on the gateway to force clients to negotiate smaller packet segments.
Health Check Deception
Small health check packets fit inside a single 1500-byte frame and never trigger fragmentation, explaining why health checks pass while data requests fail.
- Are ICMP Type 3 Code 4 (Destination Unreachable / Fragmentation Needed) packets being blocked by a security group or firewall?
- Is the issue strictly limited to payloads larger than ~1400 bytes?
- Do we control the gateway routers to apply TCP MSS clamping?