ClickHouse with multiple replicas and shards #5439
Replies: 1 comment
-
|
Hi, I don't know if you find a solution. The SQL query they share might need to be updated to match the latest DB structure from plausible's repo (https://github.com/plausible/analytics/blob/master/priv/ingest_repo/structure.sql) and replacing it with: and adding a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am setting up Plausible on a Kubernetes cluster, where PostgreSQL is hosted on an Azure instance and ClickHouse is hosted on the same Kubernetes cluster, having multiple replicas and shards:
I am using the BitNami ClickHouse chart and I have set the headless service's endpoint
http://plausible_user:plausible_password@plausible-analytics-clickhouse-headless.<namespace>:8123/plausible_events_dbasCLICKHOUSE_DATABASE_URLand 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, when I refresh the page: sometimes the graphs have data, sometimes they are empty, sometimes they are not rendered because of a HTTP 500 error.
I have found a discussion that highlights 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 if I am doing something wrong with my setup. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions