Skip to content

Tiny requests work. Why do large responses hang over the VPN?

The Network Was Up. The Requests Were Not. · Part 5 of 6 · 6 min read

Read the worked explanation ↓

Interview question. A service in one cloud sends HTTPS requests to a partner database through a site-to-site VPN. Login, small JSON responses and TCP connection setup work. A 2 MB query result freezes partway through, and retransmission counters rise. The team increases the HTTP timeout from five seconds to thirty, but the large response still fails. Where would you look?

A path MTU problem is high on my list. The maximum transmission unit is the largest IP packet that a particular link can carry without further fragmentation at that layer. A path can contain several links and tunnels with different limits. The relevant path MTU is constrained by the smallest one along the route, after accounting for tunnel encapsulation.

This is one of those failures where seeing a successful TCP handshake is a trap. A handshake uses small packets. A small API response may also fit without approaching the problematic size. Large data transfers force the sender to put near-maximum-sized packets onto the path. If those packets cannot cross a tunnel and the sender does not learn why, the connection can appear to hang even while both applications are healthy.

A 1500-byte underlay link with 80 bytes of encapsulation carries at most a 1420-byte inner IP packet, a larger DF packet is dropped unless path MTU feedback reaches the sender.
A 1500-byte underlay link with 80 bytes of encapsulation carries at most a 1420-byte inner IP packet, a larger DF packet is dropped unless path MTU feedback reaches the sender.
Think first

A VPN tunnel traverses a 1,500-byte underlay. The observed encapsulation overhead is 72 bytes, and IPv4/TCP have 40 bytes of combined headers for the test. Compute an illustrative maximum inner packet and TCP payload size. Describe the evidence you need to confirm a PMTU black hole and deploy an MSS mitigation safely.

Take a few minutes to form an approach, then compare it with the worked explanation.

Check the exercise numbers

For the exercise’s 72-byte tunnel overhead, the maximum illustrative inner packet is 1,500 − 72 = 1,428 bytes. Subtracting the stated 40 bytes of IPv4/TCP headers leaves 1,388 bytes of TCP payload. These differ from the worked example’s 80-byte overhead; real options, encapsulation and path changes still need measurement.

Reveal the worked explanation

Follow the packet sizes, not the HTTP message size

Consider a simplified IPv4 path whose physical underlay MTU is 1,500 bytes. The VPN adds 80 bytes of overhead in this scenario. That leaves 1,420 bytes for the inner IP packet. If the inner packet uses ordinary 20-byte IPv4 and 20-byte TCP headers with no additional options, a safe illustrative TCP payload limit is 1,380 bytes. Real tunnels and TCP options can change this number, so measure rather than hardcode it.

Now suppose the sender is using a 1,460-byte TCP MSS, the normal calculation for an untunneled 1,500-byte IPv4 path with those same basic headers. The resulting inner IP packet is 1,500 bytes. Add the 80-byte VPN overhead and the outer packet is too large for that underlay link.

In IPv4, if the inner packet has the Don't Fragment bit set, a router that cannot forward it at that size should report the problem using an ICMP Destination Unreachable, Fragmentation Needed message. The sender can then reduce the effective path MTU and transmit smaller segments. On IPv6, routers do not fragment forwarded packets and use ICMPv6 Packet Too Big feedback. These details differ, but the principle is the same: the sender has to discover the actual supported packet size.

What if a security device blocks the needed ICMP feedback? The sender may keep retransmitting packets that are too large. The receiver never sees them and the sender does not get actionable information. That's a classic PMTU black hole. Packetization-layer MTU probing can sometimes recover without depending entirely on ICMP, but implementation support, configuration and timing vary.

The investigation I would perform

First compare traffic over the VPN with the same operation on a known healthy path. Confirm whether the failure correlates with response size, packet size or an application behavior such as a database cursor timing out. If a 40 KB compressed response succeeds while an uncompressed 2 MB response hangs, the result is consistent with an MTU issue but does not prove one. The transfer size affects how many near-MSS packets the connection sends.

Next capture packet sizes and retransmissions at both ends, and where permitted at the tunnel gateways. Look for repeated large inner packets and their absence downstream. Check for ICMP Fragmentation Needed or ICMPv6 Packet Too Big messages and whether firewalls drop them on the return path. An application trace alone cannot see that signal. Tools such as tracepath and controlled DF probes can help, but may follow a different route from TCP.

Also examine configured tunnel MTU, effective route MTU, TCP MSS negotiation, MSS clamping at VPN gateways and whether the route changes between different network paths. A route may have a lower MTU after failover, even if the usual path supports the original size. Encapsulation overhead can change when encryption modes or additional overlays are introduced.

Don't assume every large-payload hang is PMTU. A reverse proxy may buffer huge responses, flow control may stall, an application may stop reading or a firewall may enforce a maximum response size. The PMTU hypothesis becomes strong when packet captures show size-dependent disappearance along the path, not merely because the JSON was big.

Choose a fix that survives route changes

If the tunnel path has a known lower inner MTU, configure the relevant interface and routes consistently and ensure TCP MSS values do not exceed what the path can carry. MSS clamping at the appropriate edge can be a practical mitigation for TCP flowing through a fixed tunnel. It must be tested in both directions, especially when only server-to-client responses fail. The correct value includes the actual encapsulation and header overhead.

A longer-term fix is to allow validated path MTU feedback to traverse necessary security boundaries instead of blocking all ICMP indiscriminately. Where supported, packetization-layer probing provides resilience when ICMP is filtered or a route changes. Fixing path discovery is preferable to forcing every application to use an unnecessarily tiny segment forever.

I would not solve this by disabling fragmentation safeguards indiscriminately. Fragmenting tunneled packets can shift cost, increase loss sensitivity and create additional security or operational problems. Nor would I accept "raise the timeout" as a fix. Waiting longer for an undeliverable packet only converts a clear transport failure into a slower incident.

Afterward test both directions, normal and failover routes, IPv4 and IPv6 where used, and varying payload sizes. Monitor retransmissions and completion rates. The thing to prove is that maximum-sized packets on the actual path can be delivered or reliably resized, not merely that the test login endpoint returns 200.

Go deeper

Classical PMTUD for IPv4 is documented in RFC 1191, while RFC 4821 describes packetization-layer path MTU discovery for TCP. RFC 8899 extends robust probing concepts for datagram transports. PMTUD involves validating ICMP Packet Too Big information and avoiding reliance on untrusted forged messages. TCP MSS is a data payload size advertised during the handshake, not the same quantity as IP MTU. Tunnels consume an outer header budget, and inner/outer fragmentation behavior can differ. The 1,500/80/1,420/1,380 arithmetic here is an intentionally simplified example.

Check your reasoning

  • Distinguish outer underlay MTU from inner packet MTU and TCP MSS.
  • Calculate the effect of VPN encapsulation overhead with clear assumptions.
  • Explain DF and ICMP Packet Too Big or Fragmentation Needed feedback.
  • Find missing large packets and blocked PTB using permitted measurements.
  • Apply safe MSS/path-discovery fixes and test failover and IPv6 behavior.

Common mistake: A successful three-way handshake proves that all TCP data sizes traverse the tunnel.

How should you address large-response hangs over a tunnel when small requests work?

Read the answer explanation

Measure tunnel overhead and PMTU feedback, then repair path discovery or MSS — Small packets can cross a path that silently discards larger packets when PMTU feedback is lost.

Apply it elsewhere

A QUIC-based file transfer intermittently stalls only after a mobile client changes networks. Explain why transport-specific packetization and changing path MTU must be considered rather than assuming TCP MSS clamping fixes the QUIC path.

Compare your approach

Distinguish MTU from MSS and full HTTP response size, calculate tunnel overhead with units, explain ICMP feedback and black holes, validate using packet-size evidence and test failover and IPv6 behavior.

One more constraint

Does a successful TCP three-way handshake prove that near-MTU application data packets can traverse the same tunnel?

Quick revision

A VPN adds encapsulation overhead, reducing the largest inner IP packet it can carry. Small handshakes may succeed while near-MTU data packets fail. With a 1,500-byte underlay and 80 bytes of outer overhead, the illustrative inner MTU is 1,420 bytes, or about 1,380 bytes TCP payload with 40 bytes of inner headers. If oversized DF packets are dropped and ICMP feedback is blocked, the sender may retransmit indefinitely. Inspect packet size, PTB feedback and route MTU, then fix PMTUD or clamp MSS appropriately.

References