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

Enable CURLOPT_TCP_FASTOPEN by default #3662

Closed
candrews opened this Issue Mar 9, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@candrews
Copy link

candrews commented Mar 9, 2019

CURLOPT_TCP_FASTOPEN currently defaults to 0 (disabled) (see https://curl.haxx.se/libcurl/c/CURLOPT_TCP_FASTOPEN.html). I believe this default should be changed to 1 (enabled).

Firefox has used TCP Fast Open since 2018 with version 60 and Chrome has used it since 2016. I believe that means it's sufficiently well supported and widely deployed to be safe to enable by default in Curl.

@bagder

This comment has been minimized.

Copy link
Member

bagder commented Mar 10, 2019

That's not correct. TFO was never enabled by default in Firefox and the last time I heard (and I worked on that team during most of the TFO efforts were going on), the code would be removed (except for the parts that can be reused for early data with QUIC). The reason is quite simply the wide-spread problems. A fair amount of connect attempts get slower with TFO simply because some middle-boxes don't understand it and thus throw away packages or delay them. In the end it turned out only a rather small share of the connections actually would benefit from TFO.

Add to that the risk of added tracking abilities given to servers to track clients over connections/IP changes, it isn't at all a given benefit for clients to enable TFO by default.

@jay

This comment has been minimized.

@jay jay closed this Mar 10, 2019

@bagder

This comment has been minimized.

Copy link
Member

bagder commented Mar 10, 2019

And here's the Firefox bug where it was set to disabled by default: https://bugzilla.mozilla.org/show_bug.cgi?id=1398201

@candrews

This comment has been minimized.

Copy link
Author

candrews commented Mar 11, 2019

Thank you for that information, I greatly appreciate it and apologize for the inaccuracy when I created this issue.

I had seen that Firefox and Chrome had both enabled it, but I didn't notice that both had also disabled it.

@bagder

This comment has been minimized.

Copy link
Member

bagder commented Mar 11, 2019

In the mean time I also got it confirmed that it is disabled by default in iOS as well.

@candrews

This comment has been minimized.

Copy link
Author

candrews commented Mar 11, 2019

This is off topic, and I apologize in advance for that - I just can't figure out where I should be asking this, and I can't find evidence of anyone else asking yet either.

One of the reasons browsers (such as Chrome and Firefox) aren't using TFO is due to privacy / user tracking concerns. A user could visit a site at home, go to a coffee shop, and the OS would reuse that TFO cookie and now the site's servers know that the coffee shop and home connections were from the same user.

Should the OS clear TFO cookies when the active network changes? Specifically, I'm thinking that (on Linux, at least) Network Manager should clear TFO cookies when the user switches from connects/disconnects from a wired/wireless network. I believe that would eliminate the tracking concern.

Does that make sense?

Also, I've been unable to figure out how to clear the TFO cookies in Linux; do you happen to know how to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.