Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider support TCP Fast Open on servers #203

Open
zonyitoo opened this issue Apr 30, 2021 · 2 comments
Open

Consider support TCP Fast Open on servers #203

zonyitoo opened this issue Apr 30, 2021 · 2 comments

Comments

@zonyitoo
Copy link

zonyitoo commented Apr 30, 2021

This is a feature request for supporting TCP Fast Open.

I know TCP Fast Open was currently not proved to have the exprected effects that it was designed for, but some of its goals are very suitable for shadowsocks' application senario:

  1. TFO would have benefits for unstable networks, such as mobile networks. Connections between shadowsocks' local server and remote server should be considered as unstable too.
  2. TFO would have significate benefit for connections which have long RTTs.

    As expected, TFO improves the PLT when the RTT is high for all the sites we tested. When the RTT is small and the network delay is only a small fraction of PLT, the resource processing time would exceed network time, so the gains from TFO are expected to be small. But even for pages heavy on content and with short emulated RTT (i.e. 20ms), TFO accelerates PLT by 4–5%. Conversely, for simpler pages such as wikipedia, the browser spends most of its time waiting for network transfers rather than processing the retrieved content, and thus TFO offers significant improvements of 16% and 41% with 100ms and 200ms RTTs respectively. The 200ms RTT figures roughly correspond to the expected performance on mobile devices since mobile RTTs are typically on the order of 100–200ms

https://research.google.com/pubs/archive/37517.pdf

@JonathanDCohen
Copy link

Thanks for the request! Note that really this sort of thing should go in https://github.com/Jigsaw-Code/outline-ss-server where we have our Shadowsocks implementation.

There are concerns with TFO, namely middleboxes which don't support it and tracking concerns with the TFO cookie. HTTP/2 gets some of the gains back with multiplexing and HTTP/3 largely implements the good parts of TFO. See for example https://squeeze.isobar.com/2019/04/11/the-sad-story-of-tcp-fast-open/

The Outline server is implemented in Go -- you can see more discussion about supporting TFO in Go in this Issue. All said I'd expect that this is a pretty low-priority feature for us.

@bemasc and @alalamav have more insight into the networking code than I do, so they may have more information or differing opinions from me.

@zonyitoo
Copy link
Author

zonyitoo commented May 5, 2021

Well, since Go can easily interoperate with C, it is quite easy to implement TFO without any official support from the standard library (net). For example, here are some code snippets from the v2ray project.

@sbruens sbruens transferred this issue from Jigsaw-Code/outline-server Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants