enable SO_REUSEPORT sockets, allow cleaner reuse of time_waits (#13307)

Refer here https://lwn.net/Articles/542629/
This commit is contained in:
Harshavardhana 2021-09-27 09:27:16 -07:00 committed by GitHub
parent 68a2d6fc40
commit 3c70eca758
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.