v.21.9Improvement

Enable use_hedged_requests setting to reduce tail latencies in large clusters

Enable use_hedged_requests setting that allows to mitigate tail latencies on large clusters. #26380 (alexey-milovidov).
Introduces the use_hedged_requests setting to reduce tail latencies in large ClickHouse clusters by sending duplicate requests.

Why it matters

This feature addresses the issue of high tail latencies in distributed queries across large clusters. By enabling hedged requests, users can mitigate slow responses from some nodes, improving overall query performance and reducing wait times.

How to use it

Enable the feature by setting use_hedged_requests=1 in the session, query, or user settings. This activates the sending of duplicate requests to multiple replicas, returning the fastest response to minimize latency.