From 3c70eca75898548c0e4b383138f8dbce8db0d494 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 27 Sep 2021 09:27:16 -0700 Subject: [PATCH] enable SO_REUSEPORT sockets, allow cleaner reuse of time_waits (#13307) Refer here https://lwn.net/Articles/542629/ --- internal/http/listen_nix.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/http/listen_nix.go b/internal/http/listen_nix.go index 6efa253e2..ef464e25b 100644 --- a/internal/http/listen_nix.go +++ b/internal/http/listen_nix.go @@ -27,11 +27,12 @@ import ( ) var cfg = &tcplisten.Config{ + ReusePort: true, DeferAccept: true, FastOpen: true, - // Bump up the soMaxConn value from 128 to 4096 to + // Bump up the soMaxConn value from 128 to 65535 to // handle large incoming concurrent requests. - Backlog: 4096, + Backlog: 65535, } // Unix listener with special TCP options.