From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: Braden Bassingthwaite <bbassingthwaite@digitalocean.com>,
kadlec@netfilter.org, netfilter-devel@vger.kernel.org,
coreteam@netfilter.org, ncardwell@google.com, maximmi@nvidia.com
Subject: Re: SYNPROXY affecting initial BBR throughput
Date: Fri, 11 Apr 2025 13:05:04 +0200 [thread overview]
Message-ID: <Z_j3YPsT-EwAWjcT@calendula> (raw)
In-Reply-To: <20250411101240.GB26507@breakpoint.cc>
On Fri, Apr 11, 2025 at 12:12:40PM +0200, Florian Westphal wrote:
> Braden Bassingthwaite <bbassingthwaite@digitalocean.com> wrote:
> > I am using SYNPROXY with XDP and have discovered an issue with the current
> > SYNPROXY implementation. When used in conjunction with BBR (TCP Congestion
> > Control), connections over WANs have drastically reduced bandwidth (< 1
> > Mbps) for the first 10s of a connection, and will accelerate to their
> > expected bandwidth of ~ 500 Mbps.
> >
> > I believe this is because SYNPROXY will internally send a SYN and SYN/ACK
> > after the 3HS is completed. This causes the initial RTT of the connection
> > to be artificially low < 50 microseconds when it should be > 100ms in our
> > experiments.
> >
> > BBR uses a RTT sliding window of 10s and during that window, it will
> > leverage the minRTT. For our WAN connections, the artificially low RTT
> > affects the window size and drastically reduces the available bandwidth for
> > that period for these connections.
> >
> > Ideally SYNPROXY would somehow signal to the TCP stack that it should
> > ignore this SYN->SYN/ACK RTT since it's not a valid measurement, and would
> > rely on subsequent RTTs.
>
> SYNPROXY is designed as a middlebox, both sender and responder are
> considered to be on a different physical host, so its not possible to
> signal that initial rtt measurment should be discarded.
Rough idea: In nftables, it is possible to define a synproxy object.
Would it work to have a sidecar userspace program to refresh the
missing rtt measurement between synproxy router and backend server?
I am assuming one synproxy object to represent each backend server.
> If you are already using BPF, did you consider
> https://lore.kernel.org/all/20240115205514.68364-1-kuniyu@amazon.com/
>
> instead of SYNPROXY?
>
> (or just use normal tcp stacks syncookie mode, i don't see why you
> have to do upfront xdp cookies if its all on the same host ...).
prev parent reply other threads:[~2025-04-11 11:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAFejGzLnjCKfhx2FnjWnnCnO1x1nH1mKnia41a_7OtrqbFbRLg@mail.gmail.com>
2025-04-11 10:12 ` SYNPROXY affecting initial BBR throughput Florian Westphal
2025-04-11 11:05 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_j3YPsT-EwAWjcT@calendula \
--to=pablo@netfilter.org \
--cc=bbassingthwaite@digitalocean.com \
--cc=coreteam@netfilter.org \
--cc=fw@strlen.de \
--cc=kadlec@netfilter.org \
--cc=maximmi@nvidia.com \
--cc=ncardwell@google.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox