ClickHouse / ClickHouse

ClickHouse® is a real-time analytics DBMS
https://clickhouse.com
Apache License 2.0
37.44k stars 6.89k forks source link

Repeating "<secure>1</secure>" tag for each server in a cluster #60099

Open xogoodnow opened 8 months ago

xogoodnow commented 8 months ago

While configuring ClickHouse-server to use TLS, the tag "1" is repeated for every server. Since it is not possible to have a cluster with tls and non-tis nodes (All nodes in a cluster must either be set up with TLS or without TLS) it would be more convenient to specify the "1" once (Like the configuration for ClickHouse-keeper ) So instead of this:

<remote_servers>
    <cluster_1S_2R>
        <shard>
            <replica>
                <host>chnode1.marsnet.local</host>
                <port>9440</port>
                <user>default</user>
                <password>ClickHouse123!</password>
                <secure>1</secure>
            </replica>
            <replica>
                <host>chnode2.marsnet.local</host>
                <port>9440</port>
                <user>default</user>
                <password>ClickHouse123!</password>
                <secure>1</secure>
            </replica>
        </shard>
    </cluster_1S_2R>
</remote_servers>

it would be something like this:

<remote_servers>
    <cluster_1S_2R>
    <secure>1</secure> 
        <shard>
            <replica>
                <host>chnode1.marsnet.local</host>
                <port>9440</port>
                <user>default</user>
                <password>ClickHouse123!</password>

            </replica>
            <replica>
                <host>chnode2.marsnet.local</host>
                <port>9440</port>
                <user>default</user>
                <password>ClickHouse123!</password>

            </replica>
        </shard>
    </cluster_1S_2R>
</remote_servers>
alexey-milovidov commented 8 months ago

That is a good idea, and I'm surprised it does not already work this way. The same should apply to port, user.

xogoodnow commented 8 months ago

Glad you agree, Valid point, I did not think of that :).