High Availability
Overview
High Availability (HA) mode allows the Intelligence Hub to run across multiple nodes, ensuring continuous operation and failover. Only one node is active at a time; standby nodes are ready to take over if the primary node fails. This is managed through heartbeats and file synchronization.
Heartbeats and File Synchronization
- Heartbeats: Each node periodically signals its status. If the primary node stops sending heartbeats, a standby node automatically takes over.
- File Synchronization: Configuration files, Extension cache, and Pipeline State are regularly synced to ensure a standby node can seamlessly assume the primary role.
Setup
To add a new node, copy the intelligencehub-certificatestore.pksc12
file to the node’s application data directory.
This initial step of copying the certificate store file allows the secondary hub to store secrets using the same encryption schema as the primary hub. This ensures both hubs can securely exchange and access encrypted data like secrets, passwords, or certificate keys. For example, when a new connections requiring a system secret is created in the primary hub, both the connection and system secret will be securely synchronized to the secondary hub.
Finally, assign a unique node ID to each new node.
Command Line Usage
Start the HA runner using the command line. The main commands are:
create
: Initializes the failover service, syncs initial configuration and state files, and sets the node ID as the preferred primary node.- The preferred primary node is always selected as primary when available.
start
: Starts a node in HA mode, joining the failover group.help
: Displays usage information.
Example Usage
java -cp "intelligencehub-runtime.jar;lib/*" com.highbyte.intelligencehub.runtime.HAMain [options] <create|start|help>
Option | Description | Example Value |
---|---|---|
-j , --jdbcURI |
JDBC URI for the node (can use environment variables) | jdbc:postgresql://localhost:5432/dbName?user=username&password=password env:URI |
-n , --nodeId |
Unique node ID for the HA instance |
You can use environment variables for arguments by prefixing with env:
(e.g., -j env:URI
).
Example Commands
java -cp "intelligencehub-runtime.jar;lib/*" com.highbyte.intelligencehub.runtime.HAMain create -n node1 -j jdbc:postgresql://localhost:5432/dbName?user=username&password=password
java -cp "intelligencehub-runtime.jar;lib/*" com.highbyte.intelligencehub.runtime.HAMain start -n node1 -j env:URI
Agents
Agents provide the interface for communication between the Intelligence Hub node and the High Availability environment. Currently, only the PostgreSQL agent is supported.
Help
For help, run:
java -cp "intelligencehub-runtime.jar;lib/*" com.highbyte.intelligencehub.runtime.HAMain help