minio/internal/http
Harshavardhana 5792be71fa
fix: add timeouts to avoid goroutine leaks in net/http (#14995)
Following code can reproduce an unending go-routine buildup,
while keeping connections established due to lack of client
not closing the connections.

https://gist.github.com/harshavardhana/2d00e6f909054d2d2524c71485ad02e1

Without this PR all MinIO deployments can be put into
denial of service attacks, causing entire service to be
unavailable.

We bring in two timeouts at this stage to control such
go-routine build ups, new change

- IdleTimeout (to kill off idle connections)
- ReadHeaderTimeout (to kill off connections that are too slow)

This new change also brings two hidden options to make any
additional relevant changes if desired in some setups.
2022-05-30 06:24:51 -07:00
..
stats avoid atomics for self contained reader/writers (#13531) 2021-10-28 17:03:00 -07:00
close.go rename all remaining packages to internal/ (#12418) 2021-06-01 14:59:40 -07:00
dial_dnscache.go update and use rs/dnscache implementation instead of custom (#13348) 2021-10-05 10:13:04 -07:00
dial_linux.go run gofumpt cleanup across code-base (#14015) 2022-01-02 09:15:06 -08:00
dial_others.go update and use rs/dnscache implementation instead of custom (#13348) 2021-10-05 10:13:04 -07:00
headers.go allow forcibly creating metadata on buckets (#14820) 2022-04-27 04:44:07 -07:00
listen_nix.go update and use rs/dnscache implementation instead of custom (#13348) 2021-10-05 10:13:04 -07:00
listen_others.go update and use rs/dnscache implementation instead of custom (#13348) 2021-10-05 10:13:04 -07:00
listener.go run gofumpt cleanup across code-base (#14015) 2022-01-02 09:15:06 -08:00
listener_test.go cleanup dsync tests and remove net/rpc references (#14118) 2022-01-18 12:44:38 -08:00
server.go fix: add timeouts to avoid goroutine leaks in net/http (#14995) 2022-05-30 06:24:51 -07:00
server_test.go add configurable 'shutdown-timeout' for HTTP server (#13771) 2021-11-29 09:06:56 -08:00