**This is an old revision of the document!** ----
====== Primary and backup configuration ====== How to setup Trisul Hub and Probe in a High Availability configuration. This guide describes how a backup probe and hub can be setup to take over in case of a primary failure. ===== Setup ===== You need an identically sized backup installation of Trisul that can takeover the load in the event of a primary failure. {{:admin:haprimarybackup.png?600|}} ===== Data replication ===== The primary hub and probe nodes contains the database and configuration. We use a script based on RSYNC to replicate this database incrementally over to the backup node. - Download the script sync.sh - Edit the script to enter the IP Address of the Backup script - In a SCREEN session run the backup script **On the primary node** <code> screen ./rsync.sh </code> ===== Heartbeat check ===== The backup node needs to keep checking the liveness of the primary node using a heartbeat. **On the backup node** <code> screen ./host_alive.sh </code> ===== Takeover ===== The keepalive uses a PING to check the reachability of the primary node. When a configured number of PINGs fail, the backup starts the Trisul HUB ad PROBE processes and this takes over the primary function. ===== Recovery ===== The recovery process is not automatic. After the primary node is restored, you stop the Trisul processes on the backup and start the process on the primary node.