v.21.3Improvement

MySQL Source Configuration: Randomized Replica List for Round-Robin Endpoint Selection

When loading config for mysql source ClickHouse will now randomize the list of replicas with the same priority to ensure the round-robin logics of picking mysql endpoint. This closes #20629. #20632 (Alexander Kazakov).
ClickHouse now randomizes the list of MySQL replicas with the same priority when loading configuration for MySQL source, ensuring round-robin selection of MySQL endpoints.

Why it matters

This feature addresses the issue of uneven load distribution when connecting to multiple MySQL replicas with identical priority. By randomizing the replica order, it enables a true round-robin logic, improving load balancing and reliability when reading from MySQL source replicas.

How to use it

When configuring MySQL as a source in ClickHouse, simply list multiple replicas with the same priority in the configuration. ClickHouse will automatically randomize their order during config loading to enable round-robin picking without any additional user action.