replication-guide

Installation
SKILL.md

Replication Guide

When to use this skill

Load when users ask about replication setup, lag, failover, or Keeper/ZooKeeper.

ReplicatedMergeTree Basics

  • Engine: ReplicatedMergeTree('/clickhouse/tables/{shard}/{database}/{table}', '{replica}')
  • Requires ZooKeeper or ClickHouse Keeper
  • All replicas are equal — any replica can accept writes
  • Replication is asynchronous by default

Monitoring Replication

  • system.replicas — per-table status: absolute_delay, queue_size, is_leader, is_readonly
  • system.replication_queue — pending operations: fetches, merges, mutations
  • Key health indicators:
    • absolute_delay = 0 — fully caught up
    • is_readonly = 0 — accepting writes
    • queue_size < 10 — healthy queue
    • active_replicas = total_replicas — all replicas online
Related skills
Installs
2
GitHub Stars
217
First Seen
Apr 19, 2026