Artifactory Active/Passive Architecture
Artifactory Active/Passive architecture allows achieving High Availability (HA) and fast disaster recovery.
Artifactory supports two types of HA architectures
The first option is strongly recommended.
Deployment on Fault-tolerant Storage
Using a fault-tolerant disk mounted on another machine allows fast recovery with short MTR (Mean Time to Recovery). Once Artifactory is deployed on NAS or SAN it becomes highly available as long as the other machine can immediately mount the storage, bootstrap Artifactory from it and start accepting requests and not from the failing one.
To achieve this setup quickly and efficiently, it is recommended to use the built-in Virtual Machine Failover feature offered by virtualization software providers as part of their HA solution.
Cross-server Data Synchronization
In case this is not possible (or redundancy is required), fault-tolerance can be achieved by correctly replicating the data folder to a warm standby.
The setup of up-to-date passive replication server for active Artifactory server requires database replication and file system directories sync.
Syncing the Data and Configuration Directories
It is required to rsync two directories under $ARTIFACTORY_HOME: data and etc.
To achieve this, perform the rsync command on $ARTIFACTORY_HOME, excluding the directories that are not required.
Set out below is a simple example of such a command:
In such a case the rsync-excludes.txt file appears as follows:
NOTE! that the rsync should be executed from the passive stand-by server.
Syncing the Database
NOTE! that the database replication must run before executing rsync.
Each database provides its own procedures for the sync. Please consult the specific database vendor documentation for further reference.
For example, MySQL Replication HowTo guide can be found here.
It is also possible to use a full dump/restore procedure on the database to synchronize the database and filestore state. In this situation, it is recommended to perform the dump in a single routine with rsync (in case of File System Storage Types).
Time Synchronization on Standby Server
Time synchronization on the standby server is very important to sync timewise between the metadata stored in the database and the data stored on the file system.
A straightforward method to achieve this, is to make sure the database is in a state that is prior to the file system (data/filestore) state.
This allows you to:
Since the sync operations are not atomic, there might be a gap between the data from rsync and data from database replication.
The following should be noted: