How it works: redundancy
In short: two appliances form a pair. One is active, the other is a standby with a synchronous copy of the database. A third, small node, the witness, only votes. An appliance is active only while it holds leases from two of the three nodes, so two appliances are never active at the same time, also when the network between them is cut. Only the active appliance holds the virtual address (VIP) that users and switches use.
Leases and votes
Section titled “Leases and votes”Each of the three nodes grants a lease of 5 seconds to at most one appliance at a time. Heartbeats with votes go every 0.5 s.
- An appliance is active while it holds valid leases from a majority, two of three, counting its own vote. Two appliances can never hold a majority together, so there is never a second active one. When the link between them is cut, the one that still reaches the witness stays active.
- The holder counts its lease from the moment it asked, less a margin of 0.3 s, so it always lets go before any voter may grant the other appliance. Every 50 ms the active appliance checks that its leases still add up; if not, it gives up the role at once.
- Each vote says how long the current lease still runs. The standby asks for the role the moment the lost appliance’s leases run out, and decides as soon as the votes add up.
- All of this uses a monotonic clock. The wall clock never decides who is active.
Failover in a few seconds, without flapping
Section titled “Failover in a few seconds, without flapping”The lease length is a deliberate choice between fast and stable. A lost active appliance is replaced about 5 seconds after its last heartbeat, by design. In return, a short stall or a lost router does not cause a failover: the active appliance keeps its role while its links to the voters are silent for up to 4.2 seconds.
- No take-back. An appliance that returns finds the leases held and stays standby. The pair does not switch twice.
- A crashed agent gives its leases back. A restarted agent grants and asks for nothing for one lease length, and says it does not want the role, so the other appliance takes over at once instead of waiting for the leases to run out.
- A hung agent never keeps the VIP. A watchdog stops it within a second, and a clean-up after every exit removes the VIP before the other appliance’s leases can add up.
Measured on the development bench: after a host loss the standby became active 4.6 to 5.4 seconds later. After a killed or hung agent, takeover took 3.6 to 4.7 seconds. The VIP never had two holders.
An outdated standby is never promoted
Section titled “An outdated standby is never promoted”A standby that missed changes never becomes active by itself. When the standby falls behind, the active appliance has it marked at the witness and on the appliances; a marked appliance gets no vote and does not ask for the role. Commits on the active appliance continue without the standby only after the mark is stored. An administrator can force an outdated appliance active when the other one is gone for good; that is refused while the other appliance is still linked, and every such decision is audited as an alert.
The VIP: Layer 2 or routed
Section titled “The VIP: Layer 2 or routed”Layer 2. The VIP sits on the active appliance’s adapter with the appliance’s own hardware address. Before taking it, the new active appliance probes the address (RFC 5227) and waits while another host still answers, then sends gratuitous ARPs (unsolicited neighbor advertisements for IPv6). No first-hop redundancy protocol and no virtual MAC address.
Routed. The appliances can sit in different subnets. The active appliance announces the VIP as a /32 by eBGP to the routers in its subnet, exactly while it holds the address, with BFD (300 ms x 3) to detect a lost neighbor quickly. Only a default route is accepted from the routers; a floating static default keeps the appliance reachable when the network sends none. Losing one of two routers does not interrupt the VIP.
Security of the pair
Section titled “Security of the pair”- One port. All traffic between the three nodes is TLS 1.3 on TCP 4747, with mutual certificates and the hybrid post-quantum key exchange X25519MLKEM768 only. A peer that offers only a classical key exchange is refused.
- A certificate authority of its own. The pair’s CA issues ML-DSA-65 certificates and can issue nothing else: name constraints, path length zero, its own key usages for members and for the database copy, so the database’s key cannot join the voting link. Each member’s key is pinned, so an old copy of a node cannot come back as that member. Certificates renew on their own, and the CA can be rotated while the pair keeps working.
- Pairing by code. A new node shows a single-use pairing code on its console (80 bits, 15 minutes, replaced after 3 wrong tries). Both sides prove the code bound to that very TLS connection, so a proof captured on one connection is worthless on another, and a man in the middle never learns the code. Nodes never ask to join; a join request is refused and audited.
- Audited. Every role change, VIP move, pairing, certificate, mark and refused connection is in the audit trail.
What is not built yet
Section titled “What is not built yet”- Installing the pair on the appliance, and pairing, status, force and CA rotation in the product’s pages and console.
- The standby behavior of the other processes: knowing that their database is read-only until promotion.
- The witness image.
- How the standby receives the vault’s master key and the signing keys, which each appliance seals to its own TPM: being designed.
- Sending from the VIP as source address, a BGP password, and a check before a change that each appliance can hold the VIP.