Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 694194

Summary: www-servers/nginx - add support for TFO (TCP fast open)
Product: Gentoo Linux Reporter: tomas charvat <tc>
Component: Current packagesAssignee: Thomas Deutschmann (RETIRED) <whissi>
Status: RESOLVED INVALID    
Severity: normal CC: ago, dev-zero
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description tomas charvat 2019-09-12 18:25:23 UTC
Nginx support FTO, however it is disabled in gentoo.

FTO is feature supported by multiple packages, another packages are net-dns/nsd, however there is FTO enabled by default, Apache, Unbound.

It seems to me, that general USE flag +fto would be useful.

Here is guide how to enable FTO on Nginx
https://www.unixteacher.org/blog/speed-up-web-delivery-with-nginx-and-tfo/

FTO has to be also enabled in kernel and set properly.

As most of android devices come with FTO enabled, nginx and apache could eassily benefit if TFO would be enabled.
Comment 1 tomas charvat 2019-09-12 18:29:23 UTC
its TFO not FTO, sorry for typo
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2019-09-13 12:27:21 UTC
Closing as invalid:

There is no real compile option to enable TFO in nginx.

Like you can see, configure will check if your system supports TFO (/auto/unix). In this case it will define NGX_HAVE_TCP_FASTOPEN in $S/objs/ngx_auto_config.h.

To make use of TFO, you need to enable TFO via sysctl, add fastopen option to nginx.conf and finally you need a client which actually uses TFO (keep in mind that even latest Firefox has TFO disabled by default; and just enabling in client application isn't enough -- you need sysctl option set for outgoing connections, too).
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2019-09-13 14:47:38 UTC
PS: Keep in mind while testing, that you will see TFO only in action with HTTP traffic. But because nowadays most sites are using HTTPS, you won't really see TFO.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2019-09-17 10:26:01 UTC
*** Bug 694610 has been marked as a duplicate of this bug. ***