- Newest
- Most votes
- Most comments
Your packet capture analysis is spot on. This is a known architectural behavior of NLB: the NLB waits for the first bytes of the client payload before it injects the PROXY protocol v2 header. With server-speaks-first protocols like MySQL or SMTP, this creates a TCP deadlock that only breaks when a timeout forces traffic.
Your workaround—disabling PROXY protocol and relying on Target Group Client IP Preservation (preserve_client_ip.enabled=true)—is the correct and widely accepted standard solution for this exact scenario.
It is still worth opening an AWS support case. While support will likely confirm it works as designed, filing it as a feature request adds weight to the demand for native server-speaks-first support with PROXY protocol on NLBs.
Reference for the IP preservation configuration: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation
The behavior you're observing appears to be related to a known limitation with how PROXY Protocol v2 interacts with certain AWS networking components. While your specific scenario involves NLB directly, there is documented guidance indicating that PROXY Protocol v2 is not supported in certain AWS service mesh configurations, which suggests broader compatibility considerations with this protocol version in AWS networking infrastructure.
For server-speaks-first protocols like MySQL and SMTP, the timing of when the PROXY protocol header is injected becomes critical. The 5-second delay you're seeing between handshake completion and header forwarding is problematic because these protocols expect the server to send its greeting immediately after the TCP handshake completes, but the server is waiting for the PROXY header first.
Your workaround of using Client IP Preservation instead of PROXY Protocol is actually the recommended approach for this type of scenario. Client IP Preservation uses a different mechanism that doesn't require header injection, making it more suitable for server-speaks-first protocols where timing is critical.
If you continue to experience issues or need PROXY Protocol specifically for your use case, you should open a case through the AWS Support Center at https://console.aws.amazon.com/support/ to add correspondence about this behavior. When doing so, include your packet captures and configuration details, as this level of technical detail will help the support team investigate whether this represents expected behavior given the protocol constraints or if there are additional configuration options that might help your specific scenario.
Sources
App Mesh connectivity troubleshooting - AWS App Mesh
