Operating a replica set: opt-in, metrics, and an RF=3 Docker demo in Squirix preview.9
Description and use
Squirix preview.9 operators must enable replication and failover, configure mTLS, and verify readiness via health endpoints and Prometheus metrics.
Problem
Operators need to enable, verify, and monitor Squirix replica set failover and metrics in a Docker Compose environment.
Outcome
The cluster achieves automatic failover, quorum reads, and exposes detailed replication metrics, enabling operators to monitor leader status, lag, and state transfers.
Workflow
- 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.
Evidence
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.
- Record date: 2026-11-01T07:58:43.680Z