Overview

The load balancer is the entry point to your high availability installation and optimally distributes requests to the server nodes in your system. You will need to setup your load balancer.

How Does It Work?

Once the Artifactory node receives the request from the load balancer, the Artifactory router is responsible to forward each request to the JFrog services (Xray, Mission Control, Distribution and Pipelines) accordingly.

For a complete system overview see the system architecture page.

JFrog Subscription Levels

SELF-HOSTED
ENTERPRISE 
ENTERPRISE+


Setting up Your Load Balancer

JFrog supports using a reverse proxy, which is a type of proxy server that retrieves resources from one or more servers. In HA configurations, you will need to use a load balancer instead of a reverse proxy. One load balancer is required per JFrog Platform Deployment (JPD). The load balancer should be configured to the Artifactory instances in your JPD. For more information, see Using a Load Balancer in High Availability Setups.

If you have enabled TLS in your JFrog Platform Deployment, your JFrog Router blocks all non-TLS connections. Therefore, you will need to set up a secure connection between your Load Balancer and your JFrog Platform Deployment as well.
To do that you will need to add the JPD TLS certificate to your load balancer key store. For more information, see Managing TLS Certificates.

Configuring Health Check

Use the following end points for configuring the health check for your load balancer for the JFrog Platform.

System Health Ping

Description: Get a simple status response about the state of Artifactory.
Returns 200 code with an 'OK' text if Artifactory is working properly, if not will return an HTTP error code with a reason.
Since: 2.3.0
Security: Requires a valid user (can be anonymous). 
Usage: GET /api/system/ping
Produces: text/plain
Sample Output:

GET /api/system/ping
OK

Response status codes:

200 - Successful request with an 'OK' text if Artifactory is working properly, if not will return an HTTP error code with a reason.


Readiness Probe

Description: The readiness probe, which essentially replaces the system/ping (above), gets a simple status response about the state of Artifactory using the new Kubernetes style readiness probe (the system/ping will remain in place for legacy systems still depending on it). The probe can be used to measure the system latency, provides customers with an important metric to monitor according to their standard.
Since: 7.31.x
Security: Requires a valid user (can be anonymous). 
Usage: GET /api/v1/system/readiness
Produces: text/plain
Sample Output:

GET /api/system/readiness
OK

Response status codes:

200 - Successful request with an 'OK' text if Artifactory is working properly, if not will return an HTTP error code with a reason


Liveness Probe 

Description: Get a status response to know when a container is ready to start accepting traffic.
Since: 7.31.x
Security: Requires a valid user (can be anonymous). 
Usage: GET /api/v1/system/liveness
Produces: text/plain
Sample Output:

GET /api/system/liveness
OK

Response status codes:

200 - Successful request with an 'OK' text if working properly; if not will return an HTTP error code with a reason


Sample Output

GET /router/api/v1/system/health

Healthy Response:
200 OK
Content-Type: application/json
{
  "router": {
    "node_id": "abcef-1324-wxyz",
    "state": "HEALTHY",
    "message": "OK"
  },
  "services": [
    {
      "service_id": "jfsvc@123",
      "node_id": "hijkl-56789-mnopq",
      "state": "HEALTHY",
      "message": "OK"
    },
    ...
  ]
}