Clustering Guide
Maree-DB clustering provides high availability, fault tolerance, and horizontal read scaling. Start with a 3-node cluster for high availability; scale to 7+ nodes for Byzantine fault tolerance. Enterprise licence required.
Cluster Architecture Overview
Maree-DB uses a consensus-based replication protocol where all write operations are committed to a quorum of nodes before acknowledging success. A 3-node cluster tolerates 1 node failure. A 7-node cluster with BFT mode active tolerates 2 Byzantine (malicious or corrupted) node failures.
| Cluster Size | Quorum | Crash Faults Tolerated | Byzantine Faults Tolerated | BFT Mode |
|---|---|---|---|---|
| 3 nodes | 2 | 1 | 0 | Not required |
| 5 nodes | 3 | 2 | 0 | Not required |
| 7 nodes | 5 | 3 | 2 | Required |
| 10 nodes | 7 | 4 | 3 | Required |
Setting Up a 3-Node Cluster
This example uses three servers: node1 (192.168.1.10), node2 (192.168.1.11), node3 (192.168.1.12).
Install Maree-DB on all three nodes
Follow the Installation Guide on each server. Do not start the server yet.
Configure each node
Start all nodes
Verify cluster formation
Adding a Node
New nodes can be added to a running cluster without downtime. The new node bootstraps by syncing from the current leader.
Removing a Node
--force when you are certain the node is permanently unavailable.Rolling Upgrades
Upgrade the cluster to a new Maree-DB version without downtime by upgrading one node at a time. The cluster remains operational throughout.
Byzantine Fault Tolerant (BFT) Mode
BFT mode protects against nodes that are actively malicious, corrupted, or compromised — not just crashed. This is relevant for high-security deployments, financial infrastructure, and multi-organisation clusters where node trustworthiness cannot be guaranteed.
Auto-Discovery
On trusted local networks, enable auto_discover = true in [cluster] configuration. Maree-DB nodes broadcast their presence via mDNS and automatically form a cluster without manual peer configuration.
peers explicitly and disable auto_discover.Cluster Monitoring Dashboard
The built-in monitoring dashboard is accessible via the REST port at http://leader-node:8080/cluster. It provides real-time visibility into:
- Node health and replication lag per node
- Leader election history
- Partition distribution across nodes
- Write throughput and latency per node
- TamperLock chain consistency across replicas
- BFT consensus vote counts (BFT mode only)