ARTIFACTORY: Optimizing and Monitoring Artifactory Repository Replication

ARTIFACTORY: Optimizing and Monitoring Artifactory Repository Replication

AuthorFullName__c
Fadi Rouhana
articleNumber
000005784
ft:sourceType
Salesforce
FirstPublishedDate
2023-06-14T06:48:20Z
lastModifiedDate
2023-06-13
VersionNumber
1
Introduction:
Artifactory supports replication of repositories between two Artifactory instances to support development by different teams distributed over distant geographical sites. If you experience delays in replication, there are multiple optimization techniques available. This knowledge base article provides insights into optimizing repository replication in Artifactory, including fine-tuning system properties and utilizing storage-level synchronization options.

1. Fine-Tuning System Properties:
When replication takes longer than expected, adjusting certain system properties can improve performance. By modifying these properties in the artifactory.system.properties file, you can optimize the replication process. Here are the relevant system properties to consider:
 
  • artifactory.async.poolMaxQueueSize: Adjust the maximum queue size (default: 100,000).
  • artifactory.replication.event.queue.size: Modify the event queue size (default: 50,000)
  • artifactory.replications.eventbased.workers: Increase the number of event based replication workers (default: 8)
  • artifactory.replication.eventbased.maxQueueItems: Increase the maximum queue items for event based replication (default: 500)

As a starting point, you might want to multiply the values of these properties by 1.5. Please ensure that you add these updated property values to the artifactory.system.properties file located at $ARTIFACTORY_HOME/etc/artifactory.system.properties. A restart is required for the changes to take effect.

2. Storage-Level Synchronization:
To offload replication tasks to the storage device and improve performance, consider utilizing storage-level synchronization options. This approach involves replicating only metadata while ensuring data availability on the target binary store. It is recommended for environments with two Artifactory instances configured with replication. The binary provider configured on Artifactory provides integrated support for storage-level synchronization. For more information, refer to the following link: https://jfrog.com/help/r/jfrog-artifactory-documentation/repository-replication (Section: Optimizing Repository Replication Using Storage Level Synchronization Options)

3. Monitoring Replication:
To monitor replication progress and check the replication queue size, you may use the Monitoring Replication page in the Administration module. This page provides detailed information about replications associated with the selected JPDs. You can filter the list by source or destination repository. For detailed information, you may refer to the following link: https://jfrog.com/help/r/jfrog-platform-administration-documentation/monitoring-replication

4. Replication Discrepancies:
To manually check the replication status between different repositories, you can use the script available on our GitHub repository. This script allows you to compare replication statuses and identify any discrepancies. To automate the process, you may schedule the script to run using a tool like cron and save the output to a designated location. Access the script and additional information through the following link: https://github.com/jfrog/artifactory-scripts/tree/master/replicationDiff