Learn about Centmin Mod LEMP Stack today
Register Now

Beta Branch enable TCP Fast Open support if system supports it

Discussion in 'Centmin Mod Github Commits' started by eva2000, Apr 10, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    34,581
    7,650
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,766
    Local Time:
    4:40 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    enable TCP Fast Open support if system supports it

    If system supports TCP Fast Open, enable support for it on system and within Nginx web server TCP Fast Open - Wikipedia.

    Once enabled in Nginx, you need to setup only one instance listen directive with fastopen=256 paramter as per Module ngx_http_core_module. Example add to listen line for /usr/local/nginx/conf/conf.d/virtual.conf

    Continue reading...

    123.09beta01 branch
     
    Last edited: Apr 10, 2017
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    34,581
    7,650
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,766
    Local Time:
    4:40 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    More info at TCP Fast Open: expediting web services [LWN.net]
    Just note both client and web server end need to support TCP Fast Open and that only happens on Linux systems on both ends. So Windows based visitors won't support TCP Fast Open even if web server - Centmin Mod Nginx supports TCP Fast Open.

    You can possibly test this with webpagetest.org as they have a new test location with Linux based client side instead of the normal Windows or Android client side for Dulles, VA - Linux experimental

    upload_2017-4-10_13-35-10.png

    This forum's server has had TCP Fast Open enabled for past 2.5 years now. Example - improved Speed Index and perceived visual render time due to elimination of one RTT (Round Trip Time).

    wpt-tfo-linuxtest-01.png

    versus Windows test location

    upload_2017-4-10_13-40-52.png

    compared

    wpt-tfo-linuxtest-filmstrip-01.png

    Though it maybe that Webpagetest Linux test server is less congested or more performant as from tests on other sites, Linux test Webpagetest end point tested faster for Speedinfex too.
     
    Last edited: Apr 10, 2017
  3. eva2000

    eva2000 Administrator Staff Member

    34,581
    7,650
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,766
    Local Time:
    4:40 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    • Informative Informative x 1
  4. pamamolf

    pamamolf Well-Known Member

    3,102
    294
    83
    May 31, 2014
    Ratings:
    +527
    Local Time:
    9:40 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    We must do that manually?

    What should we add and where?

    Also is the edit related to the power of the server and need any adjustments?
     
  5. eva2000

    eva2000 Administrator Staff Member

    34,581
    7,650
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,766
    Local Time:
    4:40 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    • Like Like x 1
  6. tjk

    tjk Member

    76
    16
    8
    Jun 27, 2015
    Ratings:
    +26
    Local Time:
    2:40 AM
    Hey @eva2000 I just did a fresh install using betainstall7, and I don't have this directive in my virtual.conf file.

    Also, will this go back and update the file for installs that have been running the beta code for a bit, after we update the code?

    Thanks!
     
  7. eva2000

    eva2000 Administrator Staff Member

    34,581
    7,650
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,766
    Local Time:
    4:40 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    there was a bug fix i just made for this a few hours ago, so if you run centmin.sh menu option 23 submenu option 2 and then recompile nginx via centmin.sh menu option 4 it should auto set it in virtual.conf
     
  8. tjk

    tjk Member

    76
    16
    8
    Jun 27, 2015
    Ratings:
    +26
    Local Time:
    2:40 AM
    Worked on new install and older install, thanks!
     
    • Like Like x 1
  9. rdan

    rdan Premium Member Premium Member

    4,195
    1,014
    113
    May 25, 2014
    Ratings:
    +1,438
    Local Time:
    2:40 PM
    Mainline
    10.2
  10. rdan

    rdan Premium Member Premium Member

    4,195
    1,014
    113
    May 25, 2014
    Ratings:
    +1,438
    Local Time:
    2:40 PM
    Mainline
    10.2
    How can I confirm it works as expected?
     
  11. eva2000

    eva2000 Administrator Staff Member

    34,581
    7,650
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,766
    Local Time:
    4:40 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Also you can use wireshark inspect tcpdump of connection between linux client and linux server both enabled with TFO on either ends on system + within client browser. Look for TFO cookie in wireshark. Though from testing webpagetest.org's linux test server either doesn't have TCP Fast Open enabled on their linux server end or not enabled within Chrome linux browser they use as I am not seeing teh TFO cookie or from server side stats.
     
    • Informative Informative x 1
  12. rdan

    rdan Premium Member Premium Member

    4,195
    1,014
    113
    May 25, 2014
    Ratings:
    +1,438
    Local Time:
    2:40 PM
    Mainline
    10.2
    Very nice result :D
    upload_2017-4-12_2-0-18.png

    upload_2017-4-12_2-1-36.png
     
  13. rdan

    rdan Premium Member Premium Member

    4,195
    1,014
    113
    May 25, 2014
    Ratings:
    +1,438
    Local Time:
    2:40 PM
    Mainline
    10.2
    Aw still useless on Windows :/
    upload_2017-8-18_19-48-33.png
     
  14. frk7z

    frk7z New Member

    2
    1
    3
    Aug 19, 2017
    Ratings:
    +3
    Local Time:
    1:40 AM
    At least on windows, firefox nightly supports "tcp fast open" by default, stable is disabled by default due a bug, but you can activate that if you want. To check the option go to about:config and search this "network.tcp.tcp_fastopen_enable"
     
    • Informative Informative x 2
  15. eva2000

    eva2000 Administrator Staff Member

    34,581
    7,650
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,766
    Local Time:
    4:40 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Yeah windows Chrome doesn't have support, Linux and Android Chrome does. I had it enabled on Android Chrome for years now without problem.
     
..