Self-hosted replicated Clickhouse #3814
-
Hello, I'm migrating our old Plausible setup to a newer one, where we use Clickhouse replication. It's mostly simple-ish, but I have a few questions for that. First: Can I disable automatic DB migrations on start by Plausible? I plan to do them by hand before updates, but I'm a bit concerned about forgetting one day, and the auto-migrations wreaking havoc (for example converting from ReplicatedMergeTree to non-replicated MergeTree). I use the Distributed database engine, so DDL queries get replicated with the benefits (automatic sync) and downsides (wreaking a replica wreaks all of them). Second: What is the purpose of the "domains_lookup" table exactly? Seems like the goal is some sort of domain lookup cache from the name and its structure, but since it's using the Memory engine (presumably on purpose), I especially want to know what happens if has different content in 2 subsequent queries by Plausible? Will just cause a slightly slower event handling when querying different replicas with different table content, or will it actually cause data inconsistency somehow? Third: Is it still unsafe to run multiple instances of Plausible for the same domain? I remember trying that a while ago and running into issues (can't remember exactly, it was 2.5 years ago by now), so I was curious if that was definitely-safe nowadays (obviously, I mean assuming the same PSQL and Clickhouse databases) (This is all assuming latest versions of Plausible, Clickhouse, and PGSQL) Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 17 replies
-
Yes.
It's used in the v1 -> v2 data migration to lookup site ids for domain names.
I personally haven't tried it yet so can't say for sure. |
Beta Was this translation helpful? Give feedback.
-
Hi @Tristan971 Can I ask if you managed to create use Clickhouse replication ? |
Beta Was this translation helpful? Give feedback.
-
Plausible isn't really usable without replicated ClickHouse support. Is this something you guys are considering to support? I am plagued by issues because the self-hosted code assumes that ClickHouse isn't replicated. Surely this is a bad way to use a database? I previously sponsored but stopped when you said earlier it wasn't something you wanted to do. |
Beta Was this translation helpful? Give feedback.
👋 @Tristan971
Yes.
It's used in the v1 -> v2 data migration to lookup site ids for domain names.
I personally haven't tried it yet so can't say for sure.