TCP Health Monitor Failures Caused by Source Port Exhaustion and Connection Collisions
book
Article ID: 425869
calendar_today
Updated On:
Products
VMware Avi Load Balancer
Issue/Introduction
Setup:
TCP health monitors intermittently fail with connection reset errors.
Virtual Service (VS) traffic experiences intermittent disruption because TCP health monitors intermittently transition to a DOWN state. Packet captures confirm that these monitor failures are triggered by TCP connection resets (RST) occurring during the TCP handshake phase.
As a result, affected pool members are marked unhealthy, which leads to traffic impact at the Virtual Service level.
Cause
The backend device (F5) reports that it is handling more than 65,000 concurrent TCP connections originating from the same source IP. This condition leads to source port exhaustion, where the available ephemeral source port range is fully utilized.
When a new TCP connection attempt is initiated while an existing or half-closed connection is still occupying the same 4-tuple (source IP, source port, destination IP, destination port), the F5 detects the collision and responds by sending a TCP RST before the handshake can complete.
This behavior is expected from the TCP stack under port exhaustion conditions and explains the observed resets impacting TCP health monitors.
Resolution
Connection Behavior (Multiplexing Disabled)
Each client connection creates a new backend connection (1:1 mapping)
Backend connections close only when frontend connections close
High client concurrency leads to excessive backend connections