🦔 PostHog provides open-source web & product analytics, session recording, feature flagging and A/B testing that you can self-host. Get started - free.
The current table reads from the default cluster, which contains two (US) or eight (EU) shards. Since the events_recent table is not sharded, reading from distributed_events_recent duplicates results.
We want to use a distributed table to hit replicas with low lag (the setting needs to be configured yet).
Problem
The current table reads from the default cluster, which contains two (US) or eight (EU) shards. Since the
events_recent
table is not sharded, reading fromdistributed_events_recent
duplicates results.We want to use a distributed table to hit replicas with low lag (the setting needs to be configured yet).
Changes
Use the
posthog_single_shard
cluster.👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
Yes! Updated the Docker ClickHouse config file so it creates a the new cluster.