You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(query-backend): hedge GetRange calls to reduce tail latency
Symbol table fetches (locations, mappings, functions, strings,
stacktraces) call GetRange against object storage and are a primary
source of tail latency on the read path. This adds opt-in speculative
hedging: after a configurable delay, a second parallel GetRange is
issued; whichever response arrives first is used and the other is
cancelled.
The hedge wraps only the GetRange call, not the decode — the winning
response body is decoded once. A new Cleanup field on retry.Hedged
ensures the losing response body is always closed, preventing connection
leaks when both calls succeed.
Config flag (default 0 = disabled):
--query-backend.block-read-hedge-after=<duration>
Copy file name to clipboardExpand all lines: pkg/querybackend/backend.go
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -21,14 +21,16 @@ import (
21
21
)
22
22
23
23
typeConfigstruct {
24
-
Addressstring`yaml:"address"`
25
-
GRPCClientConfig grpcclient.Config`yaml:"grpc_client_config" doc:"description=Configures the gRPC client used to communicate between the query-frontends and the query-schedulers."`
GRPCClientConfig grpcclient.Config`yaml:"grpc_client_config" doc:"description=Configures the gRPC client used to communicate between the query-frontends and the query-schedulers."`
f.DurationVar(&cfg.ClientTimeout, "query-backend.client-timeout", 30*time.Second, "Timeout for query-backend client requests.")
33
+
f.DurationVar(&cfg.BlockReadHedgeAfter, "query-backend.block-read-hedge-after", 0, "If non-zero, issue a speculative second GetRange request for symbol tables after this duration. 0 disables hedging.")
0 commit comments