Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Ability to have multiple shards per cluster #60

Open
silashansen opened this issue May 20, 2021 · 1 comment
Open

Ability to have multiple shards per cluster #60

silashansen opened this issue May 20, 2021 · 1 comment

Comments

@silashansen
Copy link

silashansen commented May 20, 2021

It seems to me there is some confusion around cluster and shards.

When looking at the example config:

clickhouse_shards:                           (to me this seems it should been "clickhouse_clusters")
   your_shard_name:                          (this should have been the cluster name)
    - { host: "db_host_1", port: 9000 }      (this is a replica)

The current variable structure seems to be missing a level of abstraction.
It shold have three levels:

clusters:
  shards:
    replicas:

but currently on has two:

shards:
  replicas:

The configuration structure for remote_servers / clusters looks like this:

<remote_servers>
  <cluster1> <-- this is a cluster, not a named shard. Currently the role is calling this level shards.
    </shard> <-- this is a shard and it has no name (variable says shard_name)
      <replica>... <host>, <port> ..</replica>
      <replica>... <host>, <port> ..</replica>
    </shard>
    </shard>
      <replica>... <host>, <port> ..</replica>
      <replica>... <host>, <port> ..</replica>
    </shard>
  </cluster1>
  <cluster2>
    ...
  </cluster2>
</remote_servers>

I've looked through the remote_servers.j2 template and it actually seems to be impossible to create this configuration from the current structure of the variables - unless I'm missing something. I'm not exactly an ansible wizard yet :)

@hruljov
Copy link
Contributor

hruljov commented Dec 16, 2021

#67

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants