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

Kfir Avraham
2021-01-31 13:24

From Artifactory version 7.x, the 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 on port 8081), otherwise, any other request will be directed to the “artifactory” Pool (to the Router service on port 8082)