How to configure an F5 load balancer for Artifactory 7.x?

How to configure an F5 load balancer for Artifactory 7.x?

AuthorFullName__c
Kfir Avraham
articleNumber
000004989
ft:sourceType
Salesforce
FirstPublishedDate
2021-01-31T13:24:41Z
lastModifiedDate
2024-03-10T07:46:25Z
VersionNumber
4
From Artifactory version 7.x, Artifactory is being deployed with multiple microservices.
For more information please refer to our wiki page about System Architecture.
 
For the configuration of the Load Balancer the entry point should be set to communicate with Artifactory (port 8081 by default) and Artifactory’s Router service (port 8082).
 
In order to pass the request to the relevant service accordingly (e.g to port 8081 or 8082) 
  1. Create two Pools. For example:
    • artifactory”  for the node members with port 8082 (to Artifactory's Router service)
    • artifactory-direct” for the node members with port 8081 (to Artifactory service)
  2. Add an iRule (to the Virtual Server configured in F5) as follows:
    when HTTP_REQUEST {
     if { [HTTP::uri] starts_with "/artifactory/" } {
        pool artifactory-direct
     } elseif { [HTTP::uri] starts_with "/" } {
        pool artifactory
    }
    }
With the iRule above, requests containing “/artifactory” will be directed to the “artifactory-direct” Pool (to the Artifactory service, port 8081), otherwise, any other request will be directed to the “artifactory” Pool (to the Router service, port 8082)