diff options
Diffstat (limited to 'utils/network.go')
-rwxr-xr-x | utils/network.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/network.go b/utils/network.go index c9db0e68..e57854a8 100755 --- a/utils/network.go +++ b/utils/network.go @@ -12,6 +12,14 @@ import ( "github.com/valyala/tcplisten" ) +// - SO_REUSEPORT. This option allows linear scaling server performance +// on multi-CPU servers. +// See https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/ for details. +// +// - TCP_DEFER_ACCEPT. This option expects the server reads from the accepted +// connection before writing to them. +// +// - TCP_FASTOPEN. See https://lwn.net/Articles/508865/ for details. // CreateListener crates socket listener based on DSN definition. func CreateListener(address string) (net.Listener, error) { dsn := strings.Split(address, "://") |