How to configure F5 Load Balancer configuration for Artifactory HA (sample configuration)

The following is an example of how to configure F5 as a load balancer with Artifactory.

1.    Use a cookie based session stickiness on the /webapps uri. Set the F5 session cookie to MY_COOKIE

2.    In order to monitor if a particular pool member is available, use tcp port monitor. 

3.    The time between pings for the monitor can be set to any value of your choice. typical values are 15-60 second intervals with server marked down after 2 or 3 missed pings.

4.   The F5 reselects a new pool member for an attached client when a pool member goes down.

5.   F5 publishes a REST API. You can read more about it here: https://devcentral.f5.com/icontrolrest/getting-started

6.   Following is a snippet of a config file F5 VIP

 

ltm monitor tcp /Common/ISD_tcp {    defaults-from /Common/tcp    destination *:*    interval 30    time-until-up 0    timeout 91}ltm persistence cookie /Common/ci_app_cookie {    app-service none    cookie-name MY_COOKIE    defaults-from /Common/cookie    expiration 0    method insert}ltm pool /Common/ci_app_http_qa2 {    members {        /Common/10.49.9.24:27901 {            address 10.49.9.24        }        /Common/10.49.9.29:27901 {            address 10.49.9.29        }        /Common/10.49.9.72:27901 {            address 10.49.9.72        }        /Common/10.49.9.88:27901 {            address 10.49.9.88        }    }    monitor /Common/ISD_tcp    service-down-action reselect}ltm virtual /Common/ci_app_http_qa2 {    destination /Common/10.49.7.94:80    ip-protocol tcp    mask 255.255.255.255    persist {        /Common/ci_app_cookie {            default yes        }    }    pool /Common/ci_app_http_qa2    profiles {        /Common/ISD_xforward { }        /Common/tcp { }    }    source 0.0.0.0/0    source-address-translation {        type automap    }    translate-address enabled    translate-port enabled}