Add option for reuseport in nginx listen section (#1919)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2018-01-17 21:12:46 -02:00 committed by GitHub
parent 9e9468aa31
commit b50cdc0256
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 10 deletions

View file

@ -455,6 +455,13 @@ type Configuration struct {
// Supported codes are 301,302,307 and 308
// Default: 308
HTTPRedirectCode int `json:"http-redirect-code"`
// ReusePort instructs NGINX to create an individual listening socket for
// each worker process (using the SO_REUSEPORT socket option), allowing a
// kernel to distribute incoming connections between worker processes
// Default: false
// Reason for the default: https://trac.nginx.org/nginx/ticket/1300
ReusePort bool `json:"reuse-port"`
}
// NewDefault returns the default nginx configuration