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 implementaion. #356
Conversation
Introduced tcp-fastopen as the new directive. It takes 1 argument for the maximum queue length.
Thank you for the PR! Looks like a nice addition. One little question: is there any reason not to have the feature turned on by default? If not, how about setting the default (in |
No. I think it is also turned on by default.
👍 |
@kazuho Changed the default value and behavior. How about this? |
Thank you for the changes! Merged to master with safeguards for platforms other than Linux added. |
I have a openvz virtual server, with very old kernel. $ uname -r
2.6.32-042stab106.4 h2o refuses to start example config given in source code. $ h2o -v
h2o version 1.3.0
$ h2o -c examples/h2o/h2o.conf
failed to set TCP_FASTOPEN:Protocol not available
[examples/h2o/h2o.conf:3] failed to listen to port ANY:8080: Protocol not available Most VPS providers don't update kernel often to boast their uptime. |
yeah OpenVZ VPS would have restrictions.. you can easily check if server environment is OpenVZ based by checking if this file exists |
@2vek Oh that's bad. Until we fix the issue, I think setting see also: https://h2o.examp1e.net/configure/base_directives.html#tcp-fastopen |
Oh, sorry. The consideration seems to be not enough. |
@cubicdaiya It's not your fault. I suggested turning this knob on by default. IMO it might be better to report an warning and continue (instead of reporting an error and exitting) when setting TCP_FASTOPEN fails. |
@2vek @centminmod I anticipate that the issue has been fixed with the merger of the pull-req above. Please open a new issue if you still have issues. Thank you for your help. |
👍 It is better now, just tested
Thanks. |
Introduced
tcp-fastopen
as the new directive. It takes 1 argument for the maximum queue length.By default, the value of
tcp-fastopen
is zero (In this case, TCP Fast Open is disabled). Because TCP Fast Open is not always available.Sample configuration