Operating a replica set: opt-in, metrics, and an RF=3 Docker demo in Squirix preview.9
Описание и применение
Операторы Squirix preview.9 должны включить репликацию и отказоустойчивость, настроить mTLS и проверить готовность через эндпоинты здоровья и метрики Prometheus.
Задача
Operators need to enable, verify, and monitor Squirix replica set failover and metrics in a Docker Compose environment.
Результат
The cluster achieves automatic failover, quorum reads, and exposes detailed replication metrics, enabling operators to monitor leader status, lag, and state transfers.
Рабочий процесс
- 1. Create Squirix.settings.json with ReplicaCount=3, PersistenceEnabled=true, ReplicationEnabled=true, AutomaticFailoverEnabled=true, QuorumReadsEnabled=true.
- 2. Configure mTLS certificates and CA bundle for inter-node authentication.
- 3. Validate configuration:
squirix-server validate-config --settings ./Squirix.settings.json --strict. - 4. Start each node with
squirix-server run --settings ./Squirix.settings.json --persist --data-dir ./data --enable-replicationensuring all nodes are running before checking readiness. - 5. Verify health endpoints
/health,/health/ready,/health/ready/detailsand Prometheus metrics/metricsfor replication status. - 6. Use
squirix-server doctor --settings ./Squirix.settings.json --persist --data-dir ./datato inspect topology stamp and metadata without starting the node.
Доказательства
Setting ReplicaCount to three chooses how many copies hold a key. It does not enable durable storage, grant permission to replicate, or turn on elections.
Replication has its own opt-in: Squirix:Cluster:ReplicationEnabled, default false, or the standalone-host flag --enable-replication.
Automatic failover adds two settings, both off by default: AutomaticFailoverEnabled and QuorumReadsEnabled.
The first activation of a fresh replica group needs every configured member, not just a majority.
Readiness catches conditions such as unfinished journal recovery, a failed journal pipeline, or a detected ring mismatch.
- Дата записи: 2026-11-01T07:58:43.680Z