Skip to content

Commit

Permalink
Update dskit, add -server.http-read-header-timeout option (#6517)
Browse files Browse the repository at this point in the history
* Update dskit.

Signed-off-by: Peter Štibraný <[email protected]>

* CHANGELOG.md

Signed-off-by: Peter Štibraný <[email protected]>

* Apply suggestion.

Signed-off-by: Peter Štibraný <[email protected]>

---------

Signed-off-by: Peter Štibraný <[email protected]>
  • Loading branch information
pstibrany authored Oct 31, 2023
1 parent 8417764 commit 59b9622
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* [ENHANCEMENT] Memcached: introduce new experimental configuration parameters `-<prefix>.memcached.write-buffer-size-bytes` `-<prefix>.memcached.read-buffer-size-bytes` to customise the memcached client write and read buffer size (the buffer is allocated for each memcached connection). #6468
* [ENHANCEMENT] Ingester, Distributor: added experimental support for rejecting push requests received via gRPC before reading them into memory, if ingester or distributor is unable to accept the request. This is activated by using `-ingester.limit-inflight-requests-using-grpc-method-limiter` for ingester, and `-distributor.limit-inflight-requests-using-grpc-method-limiter` for distributor. #5976 #6300
* [ENHANCEMENT] Query-frontend: return warnings generated during query evaluation. #6391
* [ENHANCEMENT] Server: Add the option `-server.http-read-header-timeout` to enable specifying a timeout for reading HTTP request headers. It defaults to 0, in which case reading of headers can take up to `-server.http-read-timeout`, leaving no time for reading body, if there's any. #6517
* [BUGFIX] Ring: Ensure network addresses used for component hash rings are formatted correctly when using IPv6. #6068
* [BUGFIX] Query-scheduler: don't retain connections from queriers that have shut down, leading to gradually increasing enqueue latency over time. #6100 #6145
* [BUGFIX] Ingester: prevent query logic from continuing to execute after queries are canceled. #6085
Expand Down
12 changes: 11 additions & 1 deletion cmd/mimir/config-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,23 @@
"kind": "field",
"name": "http_server_read_timeout",
"required": false,
"desc": "Read timeout for HTTP server",
"desc": "Read timeout for entire HTTP request, including headers and body.",
"fieldValue": null,
"fieldDefaultValue": 30000000000,
"fieldFlag": "server.http-read-timeout",
"fieldType": "duration",
"fieldCategory": "advanced"
},
{
"kind": "field",
"name": "http_server_read_header_timeout",
"required": false,
"desc": "Read timeout for HTTP request headers. If set to 0, value of -server.http-read-timeout is used.",
"fieldValue": null,
"fieldDefaultValue": 0,
"fieldFlag": "server.http-read-header-timeout",
"fieldType": "duration"
},
{
"kind": "field",
"name": "http_server_write_timeout",
Expand Down
4 changes: 3 additions & 1 deletion cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2559,8 +2559,10 @@ Usage of ./cmd/mimir/mimir:
HTTP server listen network, default tcp (default "tcp")
-server.http-listen-port int
HTTP server listen port. (default 8080)
-server.http-read-header-timeout duration
Read timeout for HTTP request headers. If set to 0, value of -server.http-read-timeout is used.
-server.http-read-timeout duration
Read timeout for HTTP server (default 30s)
Read timeout for entire HTTP request, including headers and body. (default 30s)
-server.http-tls-ca-path string
HTTP TLS Client CA path.
-server.http-tls-cert-path string
Expand Down
2 changes: 2 additions & 0 deletions cmd/mimir/help.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,8 @@ Usage of ./cmd/mimir/mimir:
HTTP server listen address.
-server.http-listen-port int
HTTP server listen port. (default 8080)
-server.http-read-header-timeout duration
Read timeout for HTTP request headers. If set to 0, value of -server.http-read-timeout is used.
-server.log-request-headers
Optionally log request headers.
-server.log-request-headers-exclude-list string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,15 @@ grpc_tls_config:
# CLI flag: -server.graceful-shutdown-timeout
[graceful_shutdown_timeout: <duration> | default = 30s]
# (advanced) Read timeout for HTTP server
# (advanced) Read timeout for entire HTTP request, including headers and body.
# CLI flag: -server.http-read-timeout
[http_server_read_timeout: <duration> | default = 30s]
# Read timeout for HTTP request headers. If set to 0, value of
# -server.http-read-timeout is used.
# CLI flag: -server.http-read-header-timeout
[http_server_read_header_timeout: <duration> | default = 0s]
# (advanced) Write timeout for HTTP server
# CLI flag: -server.http-write-timeout
[http_server_write_timeout: <duration> | default = 2m]
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/golang/snappy v0.0.4
github.com/google/gopacket v1.1.19
github.com/gorilla/mux v1.8.0
github.com/grafana/dskit v0.0.0-20231030022856-30221e73f47e
github.com/grafana/dskit v0.0.0-20231030143953-cd0341d354c7
github.com/grafana/e2e v0.1.1
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/json-iterator/go v1.1.12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@ github.com/gosimple/slug v1.1.1 h1:fRu/digW+NMwBIP+RmviTK97Ho/bEj/C9swrCspN3D4=
github.com/gosimple/slug v1.1.1/go.mod h1:ER78kgg1Mv0NQGlXiDe57DpCyfbNywXXZ9mIorhxAf0=
github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc h1:PXZQA2WCxe85Tnn+WEvr8fDpfwibmEPgfgFEaC87G24=
github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc/go.mod h1:AHHlOEv1+GGQ3ktHMlhuTUwo3zljV3QJbC0+8o2kn+4=
github.com/grafana/dskit v0.0.0-20231030022856-30221e73f47e h1:78Seyn40QzROIdIyVhbOzaEn1xGl3DC+37zh+ZLOUAo=
github.com/grafana/dskit v0.0.0-20231030022856-30221e73f47e/go.mod h1:8dsy5tQOkeNQyjXpm5mQsbCu3H5uzeBD35MzRQFznKU=
github.com/grafana/dskit v0.0.0-20231030143953-cd0341d354c7 h1:N6/jEkWJsKb1kWSOx8AlgVIMmsVDnfVSEEIlwHnuKf4=
github.com/grafana/dskit v0.0.0-20231030143953-cd0341d354c7/go.mod h1:8dsy5tQOkeNQyjXpm5mQsbCu3H5uzeBD35MzRQFznKU=
github.com/grafana/e2e v0.1.1 h1:/b6xcv5BtoBnx8cZnCiey9DbjEc8z7gXHO5edoeRYxc=
github.com/grafana/e2e v0.1.1/go.mod h1:RpNLgae5VT+BUHvPE+/zSypmOXKwEu4t+tnEMS1ATaE=
github.com/grafana/goautoneg v0.0.0-20231010094147-47ce5e72a9ae h1:Yxbw9jKGJVC6qAK5Ubzzb/qZwM6rRMMqaDc/d4Vp3pM=
Expand Down
13 changes: 8 additions & 5 deletions vendor/github.com/grafana/dskit/server/server.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 59b9622

Please sign in to comment.