Configure Failover
Deploy allows you to store the repository in a relational database instead of on the filesystem. If you use an external database, then you can set up failover handling by creating multiple instances of Deploy that will use the same external database.
The scenario described in this topic is not an active/active setup, only one instance of Deploy can access the external database at a time. The failover setup uses only the internal worker for each Deploy instance.
For more information about active/hot-standby in Deploy, see Configure active/hot-standby mode.
Requirements
- Both nodes must use the same Java version.
Initial setup
To set up the main node (called node1
) and a failover node (called node2
):
- Follow the instructions to configure the Deploy repository on
node1
. - Start the Deploy server and verify that it starts without errors. Create at least one configuration item for testing purposes (you will check for this item on
node2
). - Stop the server.
- Copy the entire installation folder (
XL_DEPLOY_SERVER_HOME
) tonode2
. - Start the Deploy server and verify that you can see the configuration items that you created on
node1
.
You can remove the CIs created for testing purposes.
- Stop the server.
- Start the server on
node1
.
Switching to another node
When the main node (node1
) fails, you must manually start the Deploy server on the failover node (node2
). If there were pending or running tasks on the main node, first copy the contents of its XL_DEPLOY_SERVER_HOME/work
directory to the failover node. The failover node will attempt to recover the tasks.
If you want to switch back to the main node after it recovers, you must first shut down Deploy on the failover node.