-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[FEATURE] TCP Fast Open #184
Comments
Since Mio and Tokio don't have plan on supporting TFO, I am going to write a separate crate ( |
Removed `trust-dns` feature gate, uses trust-dns-resolver as default
TFO on macOS (seems) the second send call must wait until the first recv has called. Don't know why.
Why spend time on tfo? |
Yup. So I have given up. |
@zonyitoo 请问这个特性有进展吗?
我觉得还是作为一个可选项加进来比较好,因为有时候不需要用到移动网络。
|
TFO is dead. This issue should be closed. |
Nope. I haven't spent any time on it recently. But I have already done in my local branch. TFO requires lots of changes in API and haven't supported officially by mainstream network libraries in Rust, such as libstd, async-std, tokio, mio. It is quite nasty to make the current API to be compatible with TFO. IMHO, TFO is dead. I don't see any massive production use case with TFO, maybe because TFO have to be supported by the OS, and it requires applications to support it explicitly by calling different APIs. Back to this issue, I won't doubt that TFO may have benefits on connection latency, but it shouldn't be a lot that you can "feel" without having pressure tests. The performance test in this paper shows the following conclution:
So it should benefit in high RTT networks, and the network between locals and servers are usually have high RTTs. In other words, TFO may have benefits in this project. But I would prefer using On the other hand, in this article, https://squeeze.isobar.com/2019/04/11/the-sad-story-of-tcp-fast-open/ ,
|
我大概清楚了,十分感谢您的解答 :) |
Any PRs are welcome. But consider the downside of TFO, I don't think it is urgent. |
After a day, I am getting interested in pushing this forward. No matter it is useful or not, just for fun. |
😅😅作为一个Optional Features怎么样?如果需要用到才在编译时加入 (另外想请教一下,ss-rust的二进制文件比较大,能不能在编译时执行strip?我现在用了这个方法:rust-lang/cargo#3483 (comment) 这是正确的做法吗?) |
It is 2021 now, what kind of device couldn't provide 2MB free space? |
谢谢 👍
这不是空间的问题,只是想习惯性的削减一下体积 |
Compile with |
感谢提醒哈,我原本是以为对性能无影响才想要strip的。。。 |
TCP Fast Open is supported in shadowsocks-libev. Since it is one of the most popular shadowsocks servers implementation, it would better to be compatible with it.
TODO
TCP_FASTOPEN_CONNECT
in Kernel >= 4.11 would be a lot more convenient. Add TCP_FASTOPEN_CONNECT for Linux after 4.11 rust-lang/libc#1633winapi
crate.TCP_FASTOPEN
definition: Missing TCP_FASTOPEN retep998/winapi-rs#856ConnectEx
, fallback toconnect
temporaryThe text was updated successfully, but these errors were encountered: