Skip to content

[imio/helm-plausible-analytics] ClickHouse with multiple replicas and shards #27

@vittoriocanilli

Description

@vittoriocanilli

I am setting up Plausible with ClickHouse having multiple replicas and shards:

clickhouse:
 auth:
    username: plausible_user
    password: plausible_password
    database: plausible_events_db
  shards: 2
  replicaCount: 3
  resourcesPreset: "medium"
  pdb:
    create: true
    maxUnavailable: 1
  zookeeper:
    enabled: true
    replicaCount: 3
    resourcesPreset: "small"
    pdb:
      create: true
      maxUnavailable: 1

I am using the headless endpoint http://plausible_user:plausible_password@plausible-analytics-clickhouse-headless.<namespace>:8123/plausible_events_db as CLICKHOUSE_DATABASE_URL and everything seems to work.

When I try to delete one of the ClickHouse pods to simulate what would happen during a rescheduling through the Kubernetes cluster's nodes, the pod gets recreated correctly, but the data on the sites on my Plausible dashboard is no more consistent as before: sometimes the graphs have data, sometimes they are empty, sometimes they are not rendered because of a HTTP 500 error.

In this chart's default values I see that you use only one replica and one shard for ClickHouse:

clickhouse:
  shards: 1
  replicaCount: 1

mentioning a Plausible discussion to highlight that Plausible does not support clusters.

I am quite new with ClickHouse: does that actually mean that Plausible can only run with ClickHouse if it has one shard and one replica? Just to understand if it is a limitation of Plausible or of this chart. Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions