v.20.4Improvement

Use Background Thread Pool for Distributed Sends

Use background thread pool (background_schedule_pool_size) for distributed sends #10263 (Azat Khuzhin)
Enable background_schedule_pool_size thread pool for DISTRIBUTED SENDS to improve concurrency and performance.

Why it matters

This feature moves the processing of distributed sends to a configurable background thread pool instead of using the main query threads. It helps to reduce query latency and improve resource utilization by parallelizing network sends for distributed tables.

How to use it

Set the configuration parameter background_schedule_pool_size in the server config to enable and tune the size of the background thread pool handling DISTRIBUTED SENDS. This allows distributed inserts and sends to execute asynchronously in the background.