Operations questions
How many nodes to run, what happens when one fails, how to add nodes to the cluster and how to back it up or upgrade it.
How many nodes do I need?
One to develop and test, and three for production, because then each range keeps answering if one of the three machines fails. With five or more you gain capacity. It is in Choose a topology.
What happens if a node fails?
Each range has replicas on other nodes. One of them becomes leader and the range keeps taking reads and writes while a majority of its replicas answer. Fault tolerance goes through it. The drivers retry the operation that was in progress, and if the node does not come back, the balancer creates the missing replicas on other nodes so that each range gets back its number of copies.
How do I add a node?
Create an enrolment token from a node of the cluster with teseladb admin token create. The steps are in
Nodes. Then start the binary on the new machine with --join and that token, and the node
gets its certificate and starts receiving ranges.
Which systems does it run on?
In production, on Linux x86_64 or aarch64, native or in Docker, with NVMe disks. More in Hardware and OS requirements. If the kernel has no io_uring, TeselaDB uses I/O threads and writes so in the log. On macOS it works for development, with no latency guarantees.
How do I back up?
With teseladb admin backup --at now --out <folder>, which copies every range at the same timestamp while the cluster
keeps writing. A restore goes onto a new cluster. Backup and restore explains it.
Can I upgrade without stopping service?
Yes. You replace the binary node by node. If the new release announces a more recent MongoDB version, you then raise
featureCompatibilityVersion once every node has it. Follow Upgrade between versions.
What do I watch to know the cluster is healthy?
Each node publishes its metrics at /metrics, on port 27200, while the command teseladb admin nodes gives you the
state of each node that belongs to the cluster. Start with Key metrics to watch.