Add a flag to enable or disable aio_write (#10394)

* Add a flag to enable or disable aio_write

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix e2e test for aio_write

Signed-off-by: z1cheng <imchench@gmail.com>

* Remove redundant spaces to fix the 2e test

Signed-off-by: z1cheng <imchench@gmail.com>

---------

Signed-off-by: z1cheng <imchench@gmail.com>
This commit is contained in:
Chen Chen 2023-09-11 20:56:12 +08:00 committed by GitHub
parent ac2923bf44
commit d96b3f0082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 67 additions and 0 deletions

View file

@ -424,6 +424,10 @@ type Configuration struct {
// Example '60s'
ProxyProtocolHeaderTimeout time.Duration `json:"proxy-protocol-header-timeout,omitempty"`
// Enables or disables the directive aio_write that writes files files asynchronously
// https://nginx.org/en/docs/http/ngx_http_core_module.html#aio_write
EnableAioWrite bool `json:"enable-aio-write,omitempty"`
// Enables or disables the use of the nginx module that compresses responses using the "gzip" method
// http://nginx.org/en/docs/http/ngx_http_gzip_module.html
UseGzip bool `json:"use-gzip,omitempty"`
@ -938,6 +942,7 @@ func NewDefault() Configuration {
SSLSessionTickets: false,
SSLSessionTimeout: sslSessionTimeout,
EnableBrotli: false,
EnableAioWrite: true,
UseGzip: false,
UseGeoIP: true,
UseGeoIP2: false,