Sphere
Log in Join
☆ 8

TCP handshake taking 200ms on a LAN request

Two VMs on the same vSwitch, both Ubuntu 22.04. A simple HTTP request from A to B takes about 205ms every time, and tcpdump shows the SYN to SYN-ACK part taking about 200ms. Once connected, data flows fast. I have ruled out the app, curl of a trivial endpoint shows it. MTU is 1500 both sides. What causes a delayed SYN-ACK?

⚑ Report

4 replies

☆ 0
C coffee ·2026-10-26#1

200ms smells like a delayed ACK or a retransmission timer. Check tcpdump carefully, is the SYN-ACK actually delayed, or was the initial SYN dropped and you are seeing a retransmit after 200ms (TCP_RTO_MIN is often 200ms on Linux)? Look for two SYNs from the client.

⚑ Report
☆ 0
R rm ·2026-11-01#2

There were two SYNs, the first got no response. Turns out B had rp_filter (reverse path filtering) dropping the SYN because of an asymmetric route, traffic to A went out a different interface. Set net.ipv4.conf.all.rp_filter=0 and the handshake became instant.

⚑ Report
☆ 0
B blocking ·2026-11-08#3

Asymmetric routing plus rp_filter is a great catch. The 200ms was the retransmit, not a deliberate delay. If you can fix the routing so it is symmetric, that is better than disabling rp_filter, but turning it off is a common quick fix for multi-homed VMs.

⚑ Report
☆ 0
P pwned ·2026-11-15#4

Quick way to confirm rp_filter drops: watch the IP stats and TcpExt counters, or just tcpdump on B interface. If the SYN arrives but no reply is generated, it is being dropped in the kernel before the app sees it.

⚑ Report
Log in to reply.