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

Add tcp fast open #825

Closed
wants to merge 1 commit into from
Closed

Add tcp fast open #825

wants to merge 1 commit into from

Conversation

xism4
Copy link
Contributor

@xism4 xism4 commented Oct 17, 2023

It was implemented because Velocity comes with this system, and it should speed up the opening of connections between server-backend at level 3 for systems that support Netty's epoll

Minecraft clients support this feature.

https://en.wikipedia.org/wiki/TCP_Fast_Open

@BoomEaro
Copy link

I decided to look into this more and came to the conclusion that it makes no sense:

  1. The ChannelOption.TCP_FASTOPEN constant has nothing to do with setting the TFO mode.
    The value set there configures the maximum number of outstanding (waiting to be accepted) TFO connections. (https://netty.io/4.1/api/io/netty/channel/ChannelOption.html#TCP_FASTOPEN)
  2. The game client never sets the TCP_FASTOPEN_CONNECT constant to enable TFO. (proxy also should do this for downstream to enable this feature)
  3. Spigot and paper does not support TFO by default.
  4. TFO mode should be configured only here on linux systems: /proc/net/ipv4/tcp_fastopen
  5. Client and server should support this at the system level and at the application level. Windows does not support this (most minecraft users are windows users)

It’s just not clear to me why velocity has this support, while neither paper nor windows users will be able to use it. In addition, for TFO to work, you need to explicitly configure the BOTH mode (for proxy) in the system configuration. (by default enabled only CLIENT mode)

@xism4
Copy link
Contributor Author

xism4 commented Oct 29, 2023

I will close this since this needs backend impl for Spigot and forks

@xism4 xism4 closed this Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants